/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #21334f;
  background-color: #f4f9fd;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.responsive-img {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Centering */
  display: block;
  margin: 0 auto;   /* centers horizontally */
  max-width: 600px; /* optional: prevent it from being too wide on large screens */
}


/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: #ffffff; /* White */
  color: #2166bf;           /* Your hero blue */
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;

}

.btn-primary:hover {
  background-color: #f1f5f9; /* Slightly off-white for hover */
  color: #174a8a;            /* Slightly darker blue text */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Adds depth */
  transform: translateY(-2px); /* Lift on hover */
}



/* ===== Header & Navigation ===== */
.site-header {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
}

.logo .capemed {
  color: #2166bf; /* Blue */
}

.logo .healthcare {
  color: #b22222; /* Blood red (Firebrick) */
}


.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* ===== Mobile Navigation Overlay ===== */
.site-nav {
  position: relative;
}

.nav-list {
  display: flex;
  gap: 1rem;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  margin-left: auto;   /* push it all the way to the right */
  position: relative;
  z-index: 1101;       /* stay above nav drawer */
}


.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #2166bf;
  z-index: 1101;   /* Higher than nav-list */
  position: relative; /* So it respects z-index */
}

/* ===== Menu Hover Effect ===== */
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: color 0.3s ease;
  color: #21334f; /* default text color */
}

.nav-list a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 3px;
  background-color: #2166bf; /* Hover underline color */
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-list a:hover::before {
  width: 100%;
}

.nav-list a:hover {
  color: #2166bf; /* Optional: change text color on hover */
}


@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100%;
    background-color: #ffffff;
    flex-direction: column;
    align-items: start;
    padding: 2rem 1rem;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 1000;
  }

  .site-nav.open .nav-list {
    right: 0;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* Backdrop for mobile menu */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 900;              /* below nav drawer (1000), above page */
}

/* Show backdrop only when menu is open */
.site-nav.open ~ .nav-backdrop {
  display: block;
}

/* Make sure toggler sits above drawer */
@media (max-width: 768px) {
  .nav-toggle { z-index: 1100; }
  .nav-list   { z-index: 1000; }
}

/* Optional: prevent body scroll when menu open */
.no-scroll { overflow: hidden; }







/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #17e7b9, #2166bf);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
  border-radius: 0 0 40px 40px;
}

.hero h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* Page Headers */
.page-header {
  background: linear-gradient(135deg, #17e7b9, #2166bf);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
  border-radius: 0 0 30px 30px;
}

.page-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.page-header p {
  margin-top: 0.5rem;
  font-size: 1.05rem;
}





/* ===== Small Square Grid Cards ===== */
.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  padding: 1rem;
}

.feature-card,
.service-card,
.specialty-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  text-align: center;
  align-items: center;
  width: 260px;
  height: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.feature-card img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px; /* Square corners */
  margin: 0 auto 1rem;
}



.feature-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  color: #333;
}
.feature-card p {
  font-size: 0.95rem;
  color: #666;
}



#back-to-top {
  position: fixed;
  top: 50%;             /* Center vertically */
  right: 20px;          /* Stick to right edge */
  transform: translateY(-50%); /* Adjust for perfect vertical centering */
  background-color: #2166bf;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  cursor: pointer;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#back-to-top:hover {
  background-color: #174a8a;
  transform: translateY(-50%) scale(1.1); /* Subtle grow on hover */
}





.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 999;
}

.whatsapp-logo {
  width: 30px;
  height: 30px;
}

.whatsapp-bubble {
  position: absolute;
  bottom: 70px; /* above the button */
  right: 0;
  background-color: #25D366;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Triangle pointer */
.whatsapp-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 15px;
  border-width: 6px;
  border-style: solid;
  border-color: #25D366 transparent transparent transparent;
}

/* Show bubble every 5s */
@keyframes bubbleAnimation {
  0%, 80%, 100% {
    opacity: 0;
    transform: translateY(10px);
  }
  10%, 60% {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatsapp-bubble {
  animation: bubbleAnimation 5s infinite;
}


/* ===== Footer Styles ===== */
.site-footer {
  background-color: #21334f;
  color: #fff;
  padding: 3rem 1rem 1rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #4da6ff;
}

.site-footer p,
.footer-links a,
.footer-contact li {
  color: #e6e6e6;
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: none;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.45rem;
}
.footer-links a:hover {
  color: #4da6ff;
}

/* Footer Contact */
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem 0;
}
.footer-contact li {
  margin-bottom: 0.5rem;
}
.footer-contact { 
  margin-bottom: 10px; /* space before social icons */
}

/* Social Links */
.footer-col .social-links {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.footer-col .social-links a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.footer-col .social-links a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.footer-col .social-links img.social-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #c9d2dc;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .footer-col .social-links {
    justify-content: center;
  }
}