* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f9fcff;
  color: #0f4c5c;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* --- 2. DESKTOP STYLES (Default) --- */
/* This ensures links are ALWAYS visible on desktop */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none; /* In case it's wrapped in an <a> */
}

/* Hide Hamburger on Desktop */
.hamburger {
    display: none; 
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    display: block;
    transition: 0.3s;
}

/* --- 3. MOBILE STYLES (Max-width 768px) --- */
@media screen and (max-width: 768px) {
    
    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    /* By default, hide the menu off-screen or display none */
    .nav-links {
        display: none; /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
    }

    /* This class is added by JS to show the menu */
    .nav-links.active {
        display: flex; 
    }

    /* Adjust button spacing on mobile */
    .nav-btn {
        margin-left: auto;
        margin-right: 15px;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* --- General Resets --- */
/* --- 1. General & Layout ---


/* HERO */
.hero {
  display: flex;
  align-items: center;
  padding: 100px 8%;
  gap: 50px;
}

.hero-left {
  flex: 1;
}

.hero-left h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #0a4fcf;
}

.hero-left p {
  margin-bottom: 30px;
  line-height: 1.8;
}

.primary-btn {
  padding: 12px 30px;
  border-radius: 30px;
  background: #0a4fcf;
  color: white;
  border: none;
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.wobble-shape {
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, #1cb5e0, #0a4fcf);
  border-radius: 60% 40% 70% 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wobble 6s infinite ease-in-out;
}

.wobble-shape span {
  color: white;
  font-size: 1.4rem;
  text-align: center;
  padding: 30px;
}

@keyframes wobble {
  0%,100% { border-radius: 60% 40% 70% 30%; }
  50% { border-radius: 40% 60% 30% 70%; }
}

/* ABOUT */
/* --- YOUR EXISTING DESKTOP STYLES --- */
/* 1. Global Reset (CRITICAL) */
* {
  box-sizing: border-box;
}

.about {
  padding: 120px 8%;
  background: white;
  width: 100%; /* Ensures section fills screen but doesn't overflow */
  overflow: hidden; /* Safety net to hide any accidental spillover */
}

.about h2 {
  font-size: 2.4rem;
  margin-bottom: 50px;
  color: #0a4fcf;
}

.about-grid {
  display: grid;
  /* 2. Minmax prevents grid blowout */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.9;
}

/* 3. Text safety */
.about-text {
  word-wrap: break-word;
}

.see-more {
  color: #1fb6a6;
  font-weight: 600;
  text-decoration: none;
}

.about-image {
  background: #eaf6f6;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
}

.about-image img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px;
}

/* Mobile Layout */
/* --- MOBILE RESPONSIVE FIX --- */
@media (max-width: 768px) {
  .about {
    /* 1. Force padding so text never touches the edge */
    padding: 50px 20px !important; 
    
    /* 2. Stop horizontal scrolling */
    width: 100%;
    overflow-x: hidden;
  }

  .about-grid {
    /* 3. Switch to Flexbox for a simpler vertical stack on mobile */
    display: flex;
    flex-direction: column;
    
    /* 4. Kill any negative margins pulling content left */
    margin: 0 !important;
    width: 100%;
    gap: 40px;
  }

  .about h2 {
    font-size: 2rem;
    text-align: center; /* Centers the "About Us" title */
  }

  /* Ensures images fit within the padded area */
  .about-image {
    width: 100%;
    height: auto;
    margin: 0;
  }
  
  .about-image img {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
  }
  
  .about-text {
    width: 100%;             /* Ensures container fits the screen */
    display: block;          /* Resets any grid/flex weirdness on the text container */
  }

  .about-text p, 
  .about-text li, 
  .about h2 {
    /* 1. Forces text to wrap normally */
    white-space: normal !important; 
    
    /* 2. Breaks long words (like URLs) so they don't push off-screen */
    overflow-wrap: break-word; 
    word-wrap: break-word; 
    
    /* 3. Adds hyphenation to make text look better in narrow columns */
    hyphens: auto; 
  }

}

/* SERVICES */
.services {
  padding: 120px 8%;
}

.services h2 {
  text-align: center;
  margin-bottom: 70px;
  color: #0a4fcf;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.service-box {
  background: white;
  padding: 40px;
  border-left: 6px solid #0a4fcf;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 100px 8%;
  background: #0a4fcf;
  color: white;
  text-align: center;
}

/* CONTACT */
/* ================= CONTACT SECTION ================= */
.contact {
  padding: 120px 8%;
  background: #f9fcff;
}

.contact h2 {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 60px;
  color: #0a4fcf;
}

/* FORM */
#contactForm {
  max-width: 650px;
  margin: 0 auto;
  background: white;
  padding: 50px 45px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);

  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* INPUTS */
#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid #d9e5ec;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

/* TEXTAREA */
#contactForm textarea {
  min-height: 150px;
  resize: none;
}

/* FOCUS EFFECT */
#contactForm input:focus,
#contactForm textarea:focus {
  border-color: #1fb6a6;
  box-shadow: 0 0 0 3px rgba(31, 182, 166, 0.15);
}

/* BUTTON */
#contactForm button {
  margin-top: 10px;
  padding: 14px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #1cb5e0, #0a4fcf);
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* BUTTON HOVER */
#contactForm button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 76, 92, 0.3);
}

/* STATUS TEXT */
#formStatus {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 5px;
  color: #0f4c5c;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .contact {
    padding: 90px 6%;
  }

  #contactForm {
    padding: 35px 25px;
  }

  .contact h2 {
    font-size: 2rem;
  }
}


/* FOOTER */
.footer {
  background: #0a4fcf;
  color: white;
  padding: 60px 8% 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  opacity: 0.7;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero,
  .about-grid,
  .services-grid,
  .stats,
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}





/* APPOINTMENT */
.appointment {
  min-height: 100vh;
  padding: 100px 8%;
  background: #f4fbff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appointment-container {
  background: white;
  max-width: 700px;
  width: 100%;
  padding: 60px;
  border-radius: 25px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.08);
}

.appointment h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.4rem;
  color: #0f4c5c;
}

.subtitle {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0.8;
}

#appointmentForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#appointmentForm input,
#appointmentForm select,
#appointmentForm textarea {
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid #d5e6ee;
  font-size: 0.95rem;
  outline: none;
}

#appointmentForm textarea {
  min-height: 120px;
  resize: none;
}

#appointmentForm input:focus,
#appointmentForm select:focus,
#appointmentForm textarea:focus {
  border-color: #1fb6a6;
  box-shadow: 0 0 0 3px rgba(31,182,166,0.15);
}

.date-time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

#appointmentForm button {
  margin-top: 10px;
  padding: 15px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #1cb5e0, #0a4fcf);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

/* POPUP */
.popup {
  position: fixed;
  top: 30px;
  right: 30px;
  background: #0a4fcf;
  color: white;
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 2000;
}

.popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .appointment-container {
    padding: 40px 25px;
  }
}





/* Back Arrow Button */
.back-arrow {
  position: fixed;
  top: 25px;
  left: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #0b3c5d; /* hospital blue */
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
}

.back-arrow:hover {
  transform: translateX(-5px);
  background: #0a4fcf;
  color: #ffffff;
}

/* Mobile adjustment */
@media (max-width: 600px) {
  .back-arrow {
    top: 15px;
    left: 15px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}








/* Newsletter */
.footer-newsletter {
  max-width: 360px;
}

.footer-newsletter h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #ffffff;
}

.footer-newsletter p {
  font-size: 14px;
  color: #cfe9ff;
  margin-bottom: 16px;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 30px;
  border: none;
  outline: none;
  font-size: 14px;
}

.newsletter-form button {
  position: relative;
  padding: 12px 26px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #0a4fcf, #1cb5e0);
  color: white;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
}

/* Button text + spinner */
.newsletter-form .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.newsletter-form.loading .btn-text {
  display: none;
}

.newsletter-form.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Popup */
.newsletter-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2000;
}

.newsletter-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  background: white;
  padding: 40px 30px;
  border-radius: 18px;
  text-align: center;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: popupIn 0.4s ease;
}

.popup-content p {
  font-size: 16px;
  color: #0b2e4f;
  line-height: 1.6;
}

.checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a4fcf, #1cb5e0);
  color: white;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

@keyframes popupIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .newsletter-form {
    flex-direction: column;
  }
}

