/* styles.css - Updated Responsive Stylesheet */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary: #002147;
  --bg-light: #f5f8fa;
  --text-dark: #333;
  --radius: 8px;
  --transition: 0.3s ease-out;
}

body {
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: #fff;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
p  { font-size: 1rem; }

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
}
.header-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}
.logo {
  height: 60px;
  width: 60px;
  object-fit: cover;
  border-radius: 50%;
}
.name {
  font-size: 1.75rem;
  flex-grow: 1;
}

/* Navigation & Toggle */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-list a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* Hero */
.hero {
  background: var(--bg-light);
  text-align: center;
  padding: 4rem 1rem;
}
.hero h2 {
  margin-bottom: 0.5rem;
}
.hero p {
  margin-bottom: 1.5rem;
  color: #555;
}
.book-appt {
  font-size: 1.25rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  color: #fff;
  background-color: var(--primary);
  border: none;
  border-radius: var(--radius);
  transition: var(--transition);
}
.book-appt:hover {
  box-shadow: 5px 5px 12px rgba(0,0,0,0.5);
}
.book-appt:active {
  opacity: 0.7;
}

/* Services */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem auto;
}
.services h2 {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--primary);
}

.service-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
  will-change: opacity, transform;
}

.service-section.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.service-section:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: 0.15s;
  background-color: var(--bg-light);
  z-index: 2;
}

.service-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.service-content img {
  width: 100%;
  height: auto;
  max-width: 350px;
  border-radius: 6px;
  object-fit: cover;
}
.service-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.service-content p {
  color: #555;
}

/*Specialties & Carousel*/
.carousel {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background-color: white;
  border-radius: 12px;
}

.carousel-slides {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  height: auto;
}

.specialty-top-div{
  background-color:rgb(245, 248, 250); 
  padding-bottom: 100px;
  padding-top: 20px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: 200ms opacity ease-in-out;
  transition-delay: 0ms;
}

.slide[data-active] {
  opacity: 1;
  transition-delay: 200ms;
  pointer-events: auto;
  position: relative;
}

.car-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.6);
  border: none;
  font-size: 2.5rem;
  padding: 0.5rem 1rem;
  color: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 10;
  border-radius: 0.5rem;
}

.car-button.prev {
  left: 10px;
}
.car-button.next {
  right: 10px;
}

.car-button:hover,
.car-button:focus {
  color: #000000;
  background-color: rgba(182, 182, 182, 0.2);
}

.car-button.prev:hover{
  box-shadow: 3px 3px 2px 1px rgba(77, 77, 77, 0.2);
}


.car-button.next:hover{
  box-shadow: -3px 3px 2px 1px rgba(77, 77, 77, 0.2);
}

.specialty-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  background-color: white;
}

.specialty-content img {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  object-fit: cover;
}

.specialty-content h3 {
  margin-bottom: 0.5rem;
  color: #003366;
  font-size: 1.75rem;
}

.specialty-content p {
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
}

/* ---------- Mobile Carousel Styles ---------- */
@media (max-width: 768px) {
  /* 1) Make carousel fill its container */
  .carousel {
    width: 100%;
    padding: 0 1rem;
  }

  /* 2) Stack image + text vertically */
  .specialty-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  .specialty-content img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* 3) Shrink & reposition carousel buttons */
  .car-button {
    font-size: 2rem;
    padding: 0.25rem 0.5rem;
  }
  .car-button.prev {
    left: 5px;
  }
  .car-button.next {
    right: 5px;
  }

  /* 4) Ensure slides take full width and flow in the document  
     (so you don’t get invisible collapsed zones) */
  .slide {
    position: relative;
    opacity: 1 !important;
    pointer-events: auto;
  }
  .slide:not([data-active]) {
    display: none;
  }
}

.specialties-title {
  color: var(--primary);            /* or rgb(0,33,71) */
  text-align: center;               /* always center */
  margin: 2rem auto;                /* vertical spacing */
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1.2;                 /* tighter line height */
  max-width: 90vw;                  /* prevent overflow */
  white-space: nowrap;              /* keep it on one line when possible */
}

/* If you really need a break at very tiny widths, allow wrapping there: */
@media (max-width: 350px) {
  .specialties-title {
    white-space: normal;
    font-size: 2.75rem;
  }
}


/* Info Cards */
.info-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 3rem 0;
  justify-content: center;
}
.info-card {
  flex: 1 1 45%;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0s;
  margin-left: 3rem;
  margin-right: 3rem;
}
.info-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  background-color: var(--bg-light);
  z-index: 2;
}
.info-card h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}
.doctor-photo {
  height: 75px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 1rem 0;
}

/* Popup Overlay */
#popup.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#popup.popup-overlay.open {
  display: flex;
}
.popup-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
  text-align: center;
}
.popup-card .close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Media Queries */
@media (max-width: 800px) {
  .services {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  html { font-size: 112%; }
  body { padding: 0 0.5rem; }

  .hero h2 { font-size: 1.75rem; }
  .hero p  { font-size: 1rem; }

  .book-appt {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
  }

  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
    background: var(--primary);
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
  }
  .nav-list.open { display: flex; }
  .nav-list li { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.2); }

  .service-content { flex-direction: column; text-align: center; }
  .info-cards { flex-direction: column; }
}

@media (max-width: 500px) {
  .services { gap: 1rem; }
  .service-section { margin: 0.5rem 0; padding: 1rem 0.5rem; }
}
