/* Overrides: Services section readability */
/* Ensure the services section uses the main text color and readable muted text in both themes */
[aria-labelledby="servicesHeading"] {
  color: var(--text) !important;
}
[aria-labelledby="servicesHeading"] h2 {
  color: var(--text) !important;
}
[aria-labelledby="servicesHeading"] .lead {
  color: var(--text) !important;
  opacity: 0.98;
}
[aria-labelledby="servicesHeading"] p.text-muted {
  color: rgba(0,0,0,0.55) !important;
}

/* Dark theme overrides */
[data-theme='dark'] [aria-labelledby="servicesHeading"] ,
[data-theme='dark'] [aria-labelledby="servicesHeading"] .lead {
  color: rgba(255,255,255,0.92) !important;
}
[data-theme='dark'] [aria-labelledby="servicesHeading"] p.text-muted {
  color: rgba(255,255,255,0.64) !important;
}

/* Small screens: keep readable size */
@media (max-width:767px){
  [aria-labelledby="servicesHeading"] .lead{font-size:1rem !important}
}

/* Specific overrides for Services page cards to improve contrast in dark theme */
#servicesSection h1, #servicesSection .lead { color: var(--text) !important; }
#servicesSection .card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid rgba(0,0,0,0.04); }

[data-theme='dark'] #servicesSection .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(2,6,23,0.45);
}
[data-theme='dark'] #servicesSection h1, [data-theme='dark'] #servicesSection .lead, [data-theme='dark'] #servicesSection .card h5, [data-theme='dark'] #servicesSection .card p {
  color: rgba(255,255,255,0.9) !important;
}

/* Strengthen Services heading typography for both themes */
#servicesSection .section-accent{display:block;text-align:left}
#servicesSection .section-accent{font-weight:900;letter-spacing:-0.6px;margin-bottom:0.5rem;color:var(--text) !important}
[data-theme='dark'] #servicesSection .section-accent{color:rgba(255,255,255,0.98) !important}

/* Additional contrast improvements for service cards and headings */
#servicesSection .card h5,
#servicesSection .card .card-title,
#servicesSection .card .service-title {
  color: rgba(0,0,0,0.92) !important;
  opacity: 1 !important;
  font-weight: 700;
}
#servicesSection .card p,
#servicesSection .card .card-text {
  color: rgba(0,0,0,0.72) !important;
}

/* Slightly stronger card surface in light mode for separation */
#servicesSection .card {
  background: rgba(250,251,252,1) !important;
  border: 1px solid rgba(15,23,30,0.04) !important;
  box-shadow: 0 6px 18px rgba(10,20,30,0.03);
}

/* Dark theme: ensure headings and text are bright and cards feel elevated */
[data-theme='dark'] #servicesSection .card h5,
[data-theme='dark'] #servicesSection .card .card-title,
[data-theme='dark'] #servicesSection .card .service-title {
  color: rgba(255,255,255,0.96) !important;
  opacity: 1 !important;
  font-weight: 700;
}
[data-theme='dark'] #servicesSection .card p,
[data-theme='dark'] #servicesSection .card .card-text {
  color: rgba(255,255,255,0.78) !important;
}
[data-theme='dark'] #servicesSection .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.56) !important;
}

/* Make the accent underline/marker more visible in light theme */
#servicesSection .section-accent::after {
  content: '';
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 0.5rem;
  background: linear-gradient(90deg, rgba(2,86,165,0.92), rgba(0,150,136,0.85));
  border-radius: 3px;
}
[data-theme='dark'] #servicesSection .section-accent::after {
  background: linear-gradient(90deg, rgba(0,160,230,0.95), rgba(0,200,170,0.9));
}

/* Layout helper: keep footer at the bottom when page content is short */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* Ensure footer stays at natural flow but visually pinned to bottom when content is short */
footer { flex-shrink: 0; }

/* Service card background image styles - override Bootstrap .card defaults */
.service-card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 !important;
  border: none !important;
}

/* WhatsApp button styles */
.whatsapp-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg,#25D366,#128C7E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 1200;
  text-decoration: none;
}
.whatsapp-btn i{font-size:20px}
.whatsapp-btn:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(0,0,0,0.28)}

.whatsapp-inline{background:linear-gradient(135deg,#25D366,#128C7E);border-color:transparent;color:#fff}

@media (max-width:576px){
  .whatsapp-btn{right:12px;bottom:12px;width:48px;height:48px}
}

/* hide in print */
@media print{ .whatsapp-btn, .whatsapp-inline{display:none!important} }

/* Force background-image to display - override Bootstrap */
.service-card[style*="background-image"] {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #999 !important;
}

#servicesSection .service-card.card {
  background-color: transparent !important;
}

.service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

.service-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.service-content h5 {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.service-content p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Dark theme: adjust overlay for visibility */
[data-theme='dark'] .service-card {
  background-color: #071122;
}

[data-theme='dark'] .service-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.75) 100%);
}

/* Responsive: adjust card height and padding on smaller screens */
@media (max-width: 768px) {
  .service-card {
    min-height: 280px;
  }
  .service-content {
    padding: 1.25rem;
  }
  .service-content h5 {
    font-size: 1.15rem;
  }
}

@media (max-width: 576px) {
  .service-card {
    min-height: 240px;
  }
  .service-content {
    padding: 1rem;
  }
  .service-content h5 {
    font-size: 1rem;
  }
  .service-content p {
    font-size: 0.9rem;
  }
}

/* Remove any shadow applied to the site logo (navbar) */
.navbar-brand .brand-logo,
.navbar-brand img.brand-logo {
  box-shadow: none !important;
  filter: none !important;
}

/* Ensure the navbar logo keeps the same size in light and dark themes */
#siteLogo,
.navbar-brand .brand-logo,
.navbar-brand img#siteLogo {
  height: 48px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: inline-block;
  vertical-align: middle;
}

