/* Color palette and variables (single source of truth) */
:root {
  /* Base */
  --bg: #ffffff;
  --text-color: #0f172a;

  /* Surfaces */
  --surface: #ffffff;
  --surface-2: #fbfbfb; /* slightly darker for subtle elevation */
  --border: #e6eef2;

  /* Accent colors */
  --cta-primary: #8b0404; /* maroon for primary CTA */
  --on-cta: #ffffff; /* text color on CTA */
  --cta-secondary: #0aa4bf;  /* teal for secondary CTA */
  --accent: #0edbff;  /* cyan accent used sparingly */

  --muted: #6b7280;
  --muted-bg: #eef4f6; /* pale background used for badges */

  --hero-text: #ffffff;

  --shadow: rgba(15, 23, 42, 0.06);
}

/* Dark theme: toggle by setting html[data-theme='dark'] */
html[data-theme='dark'] {
  --bg: #071325; /* deep navy */
  --text-color: #e6eef2;

  --surface: #07181f;
  --surface-2: #0e2229;
  --border: rgba(255,255,255,0.06);

  --cta-primary: #b85a5a;
  --on-cta: #0b1220;
  --cta-secondary: #34c6d0;
  --accent: #6ce8ff;

  --muted: #9aa6b2;
  --muted-bg: rgba(255,255,255,0.03);

  --hero-text: #ffffff;

  --shadow: rgba(0,0,0,0.6);
} 
.btn.btn-outline {
  color: var(--cta-secondary);
  border-color: var(--cta-secondary);
}

.btn-outline:hover {
  background: var(--cta-secondary);
  color: var(--on-cta);
}
.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
/* Scroll snap: snap by sections */
html, body {height: 100%;}
body {scroll-snap-type: y mandatory; overflow-y: auto;}
section {scroll-snap-align: start}

/* Global */
*{box-sizing: border-box}
body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin:0;
  color:var(--text-color);
  background: var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition: background-color 220ms ease, color 220ms ease;
}
.container{max-width:1100px;margin:0 auto;padding:0 1rem}

/* Header */
.site-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  /* Keep the brand name maroon regardless of theme */
  color: #8b0404;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.site-title span {
  color: var(--cta-secondary);
  font-weight: 600;
  background: none;
} 

.site-header .brand{
  font-weight:800;
  display:inline-block;
  margin-right:2rem;
  /* color:var(--primary); */
  letter-spacing:0.2px;
  /* background: var(--surface); */
  padding:1rem 0;
  box-shadow: none;
  border-bottom: 2px solid transparent;
  box-shadow: 0 6px 18px var(--shadow);
    background: transparent;   /* 🔥 removes colored strip */
  padding: 0;                /* 🔥 removes tall block */
  box-shadow: none;          /* 🔥 removes underline illusion */

  text-decoration: none;
}
.site-header .brand-logo{
    height: 70px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

/* Header layout: align items and position nav and toggle */
.site-header .container{display:flex;align-items:center;gap:1rem;padding:0.75rem 1rem;margin:0}
.site-header nav.main-nav{margin-left:auto}

/* Theme toggle button (in header, to the right) */
.theme-toggle{
  background:transparent;
  border:1px solid var(--border);
  padding:6px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  cursor:pointer;
  color:#61656e; /* icon color */
  margin-left:0.75rem;
}
/* Very high-specificity override for the theme-switch id: ensure SVG paths/strokes are grey */
#theme-switch svg,
#theme-switch svg * {
  fill: #61656e !important;
  stroke: #61656e !important;
  color: #61656e !important;
}
html[data-theme='dark'] #theme-switch svg,
html[data-theme='dark'] #theme-switch svg * {
  fill: #61656e !important;
  stroke: #61656e !important;
  color: #61656e !important;
}

.theme-toggle:focus{outline:2px solid rgba(10,164,191,0.15);outline-offset:2px}
.theme-toggle .icon{display:block}
.theme-toggle .icon-sun{display:none}
html[data-theme='dark'] .theme-toggle .icon-sun{display:inline-block}
html[data-theme='dark'] .theme-toggle .icon-moon{display:none}

nav.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:1rem;align-items:center}
nav.main-nav a, nav.main-nav button.nav-link{color:var(--muted);text-decoration:none;padding:0.5rem 0.4rem;border-radius:6px}
nav.main-nav a:hover, nav.main-nav button.nav-link:hover{color:var(--text-color);background:rgba(14,219,255,0.06)}

/* Buttons */
.btn{display:inline-block;padding:0.6rem 1rem;border-radius:8px;color:white;text-decoration:none;font-weight:600;border:none}
.btn-outline{background:transparent;border:1px solid var(--border);color:var(--text-color)}
.btn + .btn{margin-left:0.5rem}

/* CTA specifics */
.cta-primary{background:var(--cta-primary)}
.cta-secondary{background:var(--cta-secondary)}


/* ===============================
   Treatments Dropdown
================================ */

.nav-item {position: relative; list-style: none}

.dropdown-toggle {background: none;border: none;font: inherit;cursor: pointer;color:var(--muted);display:flex;align-items:center;gap:6px;padding:0.4rem 0.6rem;border-radius:6px}

.dropdown-toggle:hover{color:var(--text-color);background:rgba(14,219,255,0.03)}

.dropdown-icon{font-size:0.7rem;transition:transform 0.3s ease}

.dropdown-menu{position:absolute;top:120%;left:0;min-width:260px;background:var(--surface);border-radius:10px;box-shadow:0 18px 40px var(--shadow);padding:8px 6px;opacity:0;transform:translateY(10px);pointer-events:none;transition:all 0.25s ease;z-index:1000;border:1px solid var(--border)}

.dropdown.open .dropdown-menu{opacity:1;transform:translateY(0);pointer-events:auto}
.dropdown.open .dropdown-icon{transform:rotate(180deg)}

.dropdown-menu a{display:block;padding:10px 16px;text-decoration:none;color:var(--text-color);font-size:0.95rem;border-radius:6px}
.dropdown-menu a:hover, .dropdown-menu a:focus{background:rgba(14,219,255,0.08);outline:none}
.dropdown-divider{height:1px;background:var(--border);margin:8px 0}
.view-all{font-weight:600;color:var(--primary);display:block;padding:10px 16px}

/* Hero (first screen, parallax) */
.hero{min-height:100vh;display:flex;align-items:center;padding:0;position:relative;background-size:cover;background-position:center;background-repeat:no-repeat}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg, rgba(11,0,0,0.35), rgba(0,20,30,0.15));mix-blend-mode:normal}
.hero .hero-inner{position:relative;padding:4rem 1rem;display:flex;flex-direction:column;gap:1rem;z-index:2}
.hero h1{font-size:2.3rem;margin:0;color:var(--hero-text)}
.hero .lead{color:rgba(255,255,255,0.95);font-size:1.05rem;max-width:62ch}
.hero-ctas .cta-primary{background:var(--cta-primary);border:1px solid rgba(0,0,0,0.08);color:white}
.hero-ctas .cta-secondary{background:var(--cta-secondary);color:white}
.hero-ctas .btn{margin-right:0.75rem}

/* Quick trust strip */
.trust-strip{background:linear-gradient(90deg, rgba(139,4,4,0.03), rgba(10,164,191,0.03));padding:0.8rem 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.trust-inner{display:flex;gap:1rem;align-items:center;justify-content:space-between}
.trust-item{display:flex;flex-direction:column;align-items:center;padding:6px 10px;color:var(--text-color)}
.trust-item strong{color:var(--cta-primary);font-size:1.05rem}
.trust-item span{font-size:0.85rem;color:var(--muted)}

@media (max-width:700px){
  .trust-inner{flex-wrap:wrap;gap:0.5rem}
  .hero h1{font-size:1.6rem}
  .hero .hero-inner{padding:2rem 1rem}
}

/* Features / cards */
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin:2rem 0}
.features .card{background:var(--surface);border-radius:10px;padding:0.75rem;border:1px solid var(--border);box-shadow:0 8px 20px var(--shadow)}
.features .card h3{margin:0 0 0.375rem 0;font-size:0.95rem}
.features .card p{margin:0;color:var(--muted);font-size:0.875rem}

/* Certifications */
.certifications{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:1.5rem;margin:1.5rem 0;align-items:center}
.cert-item{display:flex;flex-direction:column;align-items:center;gap:0.5rem}
.cert-item img{max-width:100%;height:auto;max-height:100px;object-fit:contain}
.cert-title{margin:0;font-size:0.75rem;color:var(--muted);text-align:center;word-wrap:break-word}

/* Services list / detail */
.treatments-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin-top:1rem}

.service-detail{
  max-width:1100px;
  margin:2rem auto;
  padding:1.25rem;
  background:var(--surface);
  border-radius:12px;
  border:1px solid var(--border);
  box-shadow:0 6px 18px rgba(11,12,16,0.04);
}

.service-header{margin-bottom:1rem}
.service-header h1{margin:0 0 0.35rem;font-size:1.9rem}
.service-excerpt{color:var(--muted);margin:0 0 0.75rem}
.service-actions{display:flex;gap:0.75rem;margin-bottom:1rem}

.service-columns{display:grid;grid-template-columns:360px 1fr;gap:1.25rem;align-items:start}
.service-media{background:linear-gradient(180deg,var(--surface),var(--surface-2));border-radius:10px;padding:0.6rem;border:1px solid var(--border);transition:box-shadow 0.18s ease}
.service-media:hover{box-shadow:0 10px 30px rgba(11,12,16,0.07)}
.service-media img{border-radius:8px;display:block;max-width:100%;height:300px;object-fit:cover}

.service-body{margin:0;color:var(--muted);line-height:1.75}
.service-body p{margin:0 0 1rem}

/* About section: place copy and image side-by-side on wide screens */
.about-inner{display:grid;grid-template-columns:1fr 320px;gap:1.25rem;align-items:center}
.about-image img{border-radius:8px;display:block;max-width:100%;height:auto}

@media (max-width:900px){
  .about-inner{grid-template-columns:1fr;gap:1rem}
  .about-image img{width:100%;height:auto}
}

.back-link{margin-top:1rem}
.back-link a{color:var(--muted);text-decoration:none}
.back-link a:hover{text-decoration:underline}

.admin-link a{font-size:0.9rem;color:var(--muted);display:inline-block;margin-top:0.5rem}

@media (max-width:900px){
  .service-detail{padding:1rem}
  .service-columns{grid-template-columns:1fr}
  .service-media{order:-1;height:auto}
  .service-media img{height:auto}
  .service-header{text-align:center}
  .service-actions{justify-content:center}
}

@media (max-width:480px){
  .service-media img{height:200px}
  .service-header h1{font-size:1.4rem}
}


/* Gallery
   - Responsive grid using auto-fit / minmax so columns adapt naturally.
   - Removed fixed row techniques and heights so the container grows/shrinks with content.
   - Each image wrapper (.gallery .thumb) controls visual size; no hardcoded heights on gallery/rows/images.
*/
.gallery, .gallery.masonry{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: stretch; /* ensures rows stretch to wrapper's height and resize naturally */
  /* NOTE: grid-auto-rows removed to allow natural, auto height rows */
}

/* Image wrapper: controls crop and visual box. Keeping overflow:hidden here only for cropping; parent sections should not use overflow:hidden. */
.gallery .thumb{
  padding: 0;
  border-radius: 8px;
  overflow: hidden; /* required to clip when using object-fit: cover inside wrapper */
  border: 1px solid var(--border);
  background: linear-gradient(180deg,var(--surface),var(--surface-2));
  /* Wrapper controls the aspect ratio — no fixed height on the gallery or rows */
  aspect-ratio: 4 / 3; /* changeable: set to 1/1 for squares, or remove if you prefer natural image heights */
  display: block;
}

/* Image itself keeps aspect via object-fit inside wrapper only */
.gallery .thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* maintain aspect inside the wrapper */
  display: block;
}

/* Gallery item wrapper with title */
.gallery-item{
  display: flex;
  flex-direction: column;
}

/* Image title below each gallery image */
.image-title{
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
  color: var(--text-color);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Avoid using overflow:hidden on parent sections (gallery-section/gallery-preview) so the container can grow vertically and push content (e.g., footer) down naturally. */

/* Posts list/cards */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin-top:1rem}
.post-card{background:linear-gradient(180deg,var(--surface),var(--surface-2));border-radius:10px;padding:0.9rem;border:1px solid var(--border);box-shadow:0 8px 20px var(--shadow);display:flex;gap:0.9rem;align-items:flex-start}
.post-media{width:220px;flex-shrink:0;overflow:hidden;border-radius:8px;border:1px solid var(--border);aspect-ratio:4/3;background:linear-gradient(180deg,var(--surface),var(--surface-2))}
.post-media img{width:100%;height:100%;object-fit:cover;display:block}
.post-image-link{display:block}
.post-image-link img{cursor:zoom-in;transition:transform 0.18s ease}
.post-image-link:hover img{transform:scale(1.03)}
.post-body{flex:1}
.post-title{margin:0 0 0.5rem 0;font-size:1.05rem}
.post-excerpt{margin:0 0 0.6rem 0;color:var(--muted)}
@media (max-width:700px){.post-card{flex-direction:column;align-items:stretch}.post-media{width:100%;aspect-ratio:16/9}}


/* Testimonials */
.testimonials blockquote{background:linear-gradient(180deg,var(--surface),var(--surface-2));padding:1rem;border-left:4px solid var(--accent);border-radius:6px}
.testimonials footer{font-size:0.9rem;color:var(--muted);margin-top:0.5rem}

/* Footer */
.site-footer{background:transparent;padding:2rem 0;margin-top:2rem;text-align:center;color:var(--muted)}

/* Responsive */
@media (max-width:800px){
  .hero h1{font-size:1.6rem}
  nav.main-nav ul{flex-direction:column;gap:0.25rem}
}

/* Treatments & cards - stacked by default, with 350x350 images */
.treatments-grid{display:grid;grid-template-columns:1fr;row-gap:0.75rem;column-gap:0.8rem;margin-top:1rem;justify-items:center}
@media (min-width:900px){
  /* Slightly smaller min column so cards pack tighter on wide screens */
  .treatments-grid{grid-template-columns:repeat(auto-fit,minmax(330px,1fr));align-items:start;justify-items:center}
}
.card-link{display:block;text-decoration:none}
.card-link .card{background:linear-gradient(180deg,var(--surface),var(--surface-2));border-radius:12px;padding:1rem;border:1px solid var(--border);transition:transform 0.18s ease, box-shadow 0.18s ease;cursor:pointer;width:360px;max-width:100%;min-height:450px;display:flex;flex-direction:column;align-items:center;gap:0.5rem}
.card-link .card:hover{transform:translateY(-6px);box-shadow:0 12px 30px rgba(11,12,16,0.06)}
.card-link .card h3{margin:0 0 0.25rem 0;text-align:center}
.card-link .card p{margin:0;color:var(--muted);text-align:center}
.card-media{width:350px;height:350px;overflow:hidden;border-radius:8px;margin-bottom:0.75rem}
.card-media img{width:100%;height:100%;object-fit:cover;display:block}

/* Why choose */
.why-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin-top:1rem}
.why-item{background:var(--surface);padding:0.8rem;border-radius:8px;border:1px solid var(--border);display:flex;align-items:center;gap:0.6rem}

/* Gallery rules consolidated above — using responsive grid + wrapper approach.
   Removed grid-auto-rows trick (was limiting row height and causing thin rows when images loaded).
   See earlier .gallery / .gallery .thumb rule for the updated implementation.
*/


/* Lightbox */
.lightbox{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,0.8);z-index:2000}
.lightbox.open{display:flex}
.lightbox-content img{max-width:90vw;max-height:85vh;border-radius:8px}
.lightbox-close{position:absolute;top:24px;right:24px;background:transparent;border:none;color:white;font-size:1.4rem}

/* Reveal on scroll */
.reveal-on-scroll{opacity:0;transform:translateY(18px);transition:opacity 0.6s ease, transform 0.6s ease}
.reveal-on-scroll.revealed{opacity:1;transform:none}

/* Lightbox navigation buttons */
.lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,0.45);border:none;color:white;font-size:2.2rem;padding:0.5rem 0.8rem;border-radius:6px;cursor:pointer}
.lightbox-prev{left:18px}
.lightbox-next{right:18px}
.lightbox-nav:focus{outline:2px solid rgba(14,219,255,0.2)}

@media (max-width:700px){
  .lightbox-nav{font-size:1.6rem;padding:0.35rem 0.6rem}
  .lightbox-content img{max-width:95vw;max-height:75vh}
}

/* Footer tweaks */
.site-footer{background:transparent;padding:2rem 0;margin-top:2rem;text-align:center;color:var(--muted)}

@media (max-width:700px){
  .treatments-grid{grid-template-columns:repeat(1,1fr)}
  .trust-inner{flex-wrap:wrap;gap:0.5rem}
}

@media (max-width:600px){.main-nav ul{flex-direction:column;gap:0.25rem}}

/* Contact page styles */
.contact-container{padding:2.2rem 0}
.contact-title{font-size:2rem;margin-bottom:1rem;text-align:center;color:var(--text-color)}
.contact-card{display:flex;gap:1.5rem;align-items:center;justify-content:space-between;background:var(--surface);border:1px solid var(--border);padding:1.25rem;border-radius:12px;max-width:900px;margin:0 auto}
.contact-list{display:flex;flex-direction:column;gap:0.9rem;flex:1}
.contact-item{display:flex;align-items:center;gap:0.9rem}
.contact-item .icon{font-size:1.4rem}
.contact-link{color:var(--cta-secondary);font-weight:600;text-decoration:none}
.contact-link:hover{text-decoration:underline}
.contact-qr{width:150px;flex-shrink:0;text-align:center}
.qr-caption{font-size:0.85rem;color:var(--muted);margin-top:0.45rem}
.address-link{white-space:pre-line}
.doctor-link{font-size:1.05rem;color:var(--text-color);font-weight:700}

/* Clinic hours style (moved from timings.html inline block) */
.clinic-hours{background:var(--surface);border-radius:12px;padding:1rem;max-width:480px;box-shadow:0 10px 30px rgba(0,0,0,0.04)}
.clinic-hours h3{margin:0 0 10px 0;font-size:1.02rem;color:var(--cta-primary)}
.clinic-hours .hours-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border);font-size:0.95rem}
.clinic-hours .hours-row:last-child{border-bottom:none}
.clinic-hours .day{font-weight:700;color:var(--muted)}
.clinic-hours .time{color:var(--text-color);text-align:right}
	.clinic-hours .divider{margin:0 6px;color:var(--muted)}
.clinic-hours .hours-row.closed .time{color:var(--cta-primary);font-weight:700}
.clinic-hours .hours-row.is-today{background:linear-gradient(90deg, rgba(10,164,191,0.04), rgba(10,164,191,0.02));border-radius:6px;padding:0.35rem}
.clinic-hours .today-badge{display:inline-block;margin-left:0.5rem;padding:0.12rem 0.5rem;border-radius:999px;font-size:0.74rem;font-weight:700}
.clinic-hours .today-badge.open{background:var(--cta-secondary);color:white}
	.clinic-hours .today-badge.closed{background:var(--muted-bg);color:var(--muted)}

/* Posts grid for testimonials -> posts */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.25rem;margin-top:1rem}
.post-card{background:var(--surface);border-radius:12px;border:1px solid var(--border);overflow:hidden;display:flex;flex-direction:column;box-shadow:0 8px 20px rgba(11,12,16,0.04)}
.post-media img{width:100%;height:160px;object-fit:cover;display:block}
.post-body{padding:1rem;display:flex;flex-direction:column;gap:0.6rem;flex:1}
.post-title{margin:0;font-size:1.05rem}
.post-excerpt{color:var(--muted);margin:0;font-size:0.95rem}
.post-meta{font-size:0.85rem;color:var(--muted)}
.post-actions{display:flex;gap:0.6rem;margin-top:auto}
.btn.cta-primary{background:var(--cta-primary);border-radius:8px;padding:0.5rem 0.8rem}
.btn.btn-outline{background:transparent;border:1px solid var(--border);padding:0.45rem 0.7rem}

@media (max-width:600px){
  .post-media img{height:120px}
}

.hours-title{display:block;margin-bottom:0.35rem;font-weight:700;color:var(--text-color)}
.hours-table{width:100%;border-collapse:collapse}
.hours-table td{padding:0.15rem 0;vertical-align:top}
.hours-table .day{width:110px;color:var(--muted);font-weight:600}
.hours-table .times{color:var(--text-color)}
.hours-row.is-today td{background:linear-gradient(90deg, rgba(10,164,191,0.04), rgba(10,164,191,0.02));border-radius:6px;padding:0.35rem}
.today-badge{display:inline-block;margin-left:0.5rem;padding:0.12rem 0.5rem;border-radius:999px;font-size:0.74rem;font-weight:700}
.today-badge.open{background:var(--cta-secondary);color:white}
	.today-badge.closed{background:var(--muted-bg);color:var(--muted)}

@media (max-width:700px){
  .contact-card{flex-direction:column;align-items:stretch}
  .contact-qr{margin:0 auto}
  .contact-title{font-size:1.6rem}
  .hours-table .day{width:95px}
}
