* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

[hidden] { display: none !important; }
body { 
  font-family: var(--font-body); 
  color: var(--color-text); 
  background: var(--color-bg); 
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { 
  font-family: var(--font-heading); 
  line-height: 1.2; 
  color: var(--color-primary-dark); 
  font-weight: 700;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { 
  width: 100%; 
  max-width: var(--container-max); 
  margin-inline: auto; 
  padding-inline: var(--space-4); 
}

.section { padding-block: var(--space-8); }
.section--alt { background: var(--color-surface); }
.section-title { 
  font-size: clamp(1.8rem, 3vw, 2.5rem); 
  margin-bottom: var(--space-5);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-gold);
  border-radius: var(--radius-pill);
  margin-top: var(--space-2);
}

.grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { 
  .grid--3 { grid-template-columns: repeat(3, 1fr); } 
  .grid--4 { grid-template-columns: repeat(4, 1fr); } 
}

/* Luxury Buttons */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: var(--space-2); 
  padding: 12px 24px; 
  border-radius: var(--radius-pill); 
  font-weight: 600; 
  font-size: 0.95rem;
  border: 1px solid transparent; 
  cursor: pointer; 
  transition: var(--transition-smooth); 
  text-decoration: none;
}

.btn--primary { 
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%); 
  color: #ffffff; 
  box-shadow: 0 4px 16px rgba(15, 67, 43, 0.25);
}
.btn--primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 24px rgba(15, 67, 43, 0.35); 
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: #ffffff;
}

.btn--outline { 
  border: 1.5px solid var(--color-primary); 
  color: var(--color-primary); 
  background: transparent; 
}
.btn--outline:hover {
  background: var(--color-primary-glaze);
  transform: translateY(-2px);
}

.btn--gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, #D4AF37 100%);
  color: #ffffff;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(182, 141, 64, 0.4);
}

.btn:active {
  transform: scale(0.97) !important;
}
.btn:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

.btn--block { width: 100%; }

/* Cards & Surfaces */
.card { 
  background: var(--color-surface); 
  border: 1px solid var(--color-border); 
  border-radius: var(--radius-lg); 
  padding: var(--space-6); 
  box-shadow: var(--shadow-sm); 
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(182, 141, 64, 0.45);
}

.badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  padding: 4px 14px; 
  border-radius: var(--radius-pill); 
  font-size: 0.8rem; 
  font-weight: 600; 
}
.badge--pending { background: #FBF1DC; color: var(--color-pending); }
.badge--confirmed { background: #E3F1E6; color: var(--color-success); }
.badge--cancelled { background: #FBE7E5; color: var(--color-danger); }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.tilt { transition: transform .25s ease; transform-style: preserve-3d; will-change: transform; }

/* Safe scroll reveal: items are visible by default, only reveal-hidden when observer is actively managing them */
.reveal-hidden { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(0.16, 1, 0.3, 1), transform .6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .tilt, html { transition: none !important; scroll-behavior: auto !important; }
  .reveal-hidden { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ==========================================================
   TOPBAR & HEADER NAVIGATION (Desktop & Mobile)
   ========================================================== */

/* Top utility bar */
.header-topbar {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 6px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar-icon {
  width: 14px;
  height: 14px;
  stroke: var(--color-gold);
  flex-shrink: 0;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  transition: color 0.2s ease;
}
.topbar-link:hover {
  color: var(--color-gold);
}
.topbar-link--whatsapp .topbar-icon {
  fill: #25D366;
  stroke: none;
}

/* The header partial is injected into a dedicated <div id="site-header">
   mount point (see assets/js/partials.js) that sits alongside — not around —
   the rest of the page's content. Left as a normal block box, that div's own
   height is only as tall as its two children (.header-topbar + <header>), so
   position:sticky's containing block runs out almost immediately: the header
   would stop sticking and scroll away entirely after ~130px of scroll on
   every single page. display:contents removes the mount div's own box from
   layout (its children still render normally) so the sticky <header> is
   contained by the full page instead, matching normal "sticky header as a
   direct child of body" behavior. No selector anywhere targets #site-header
   itself for styling, so this is purely a layout-container fix. */
#site-header { display: contents; }

/* Main Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--color-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(15, 35, 25, 0.04);
  transition: var(--transition-smooth);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: var(--space-4);
}

/* Accessibility Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Brand Logo & Emblem */
.header-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-symbol {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid rgba(197, 160, 89, 0.45);
  box-shadow: 0 2px 10px rgba(15, 67, 43, 0.08);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--transition-bounce), box-shadow var(--transition-smooth);
}
.header-brand:hover .brand-symbol {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(197, 160, 89, 0.35);
}
.brand-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}
.brand-logo-horizontal {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.brand-creds {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .header-brand {
    gap: 8px;
  }
  .brand-symbol {
    width: 40px;
    height: 40px;
  }
  .brand-icon-img {
    width: 32px;
    height: 32px;
  }
  .brand-logo-horizontal {
    height: 36px;
    max-width: 170px;
  }
}
@media (max-width: 380px) {
  .brand-logo-horizontal {
    height: 30px;
    max-width: 140px;
  }
}

/* Hamburger toggle for Mobile */
#nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
#nav-toggle:hover {
  background: rgba(197, 160, 89, 0.1);
  border-color: var(--color-gold);
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transform-origin: center;
}
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navigation Menu */
.site-header nav {
  display: flex;
  align-items: center;
}

#nav-list {
  list-style: none;
  display: flex;
}

/* Mobile Nav Drawer (< 1040px) */
@media (max-width: 1039px) {
  #nav-toggle { display: flex; }
  .header-actions { display: none; }
  
  #nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 0 var(--space-4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--color-gold);
  }
  #nav-list.nav-open {
    max-height: calc(100vh - 120px);
    padding: var(--space-4);
    overflow-y: auto;
  }
  #nav-list li {
    border-bottom: 1px solid var(--color-border);
  }
  #nav-list li.mobile-cta-item {
    border-bottom: none;
    padding-top: var(--space-4);
  }
  .nav-link {
    display: block;
    padding: 12px 6px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
  }
}

/* Desktop Horizontal Nav (>= 1040px) */
@media (min-width: 1040px) {
  #nav-toggle { display: none; }
  .mobile-cta-item { display: none !important; }

  .site-header nav {
    gap: var(--space-4);
  }

  #nav-list {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .nav-link {
    padding: 8px 13px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius-pill);
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
  }

  .nav-link:hover {
    color: var(--color-primary);
    background: var(--color-primary-glaze);
  }

  .nav-link--highlight {
    color: var(--color-primary);
    font-weight: 600;
  }

  .header-btn-appointment {
    padding: 10px 20px;
    font-size: 0.88rem;
    white-space: nowrap;
    gap: 6px;
  }
}

/* Utility Visibility Classes */
.desktop-only { display: none; }
@media (min-width: 900px) {
  .desktop-only { display: inline-flex; }
}

/* Upgraded Luxury Footer */
.site-footer { 
  background: #111A15; 
  color: #E2E8E4;
  border-top: 2px solid var(--color-gold); 
}
.site-footer .footer-wrapper { padding-top: var(--space-8); padding-bottom: var(--space-6); }
.footer-grid { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: var(--space-6); 
  margin-bottom: var(--space-7); 
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 0.9fr 1.1fr 1fr; }
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.footer-brand-symbol {
  background: #FFFFFF;
  border: 1.5px solid var(--color-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.footer-subheading { 
  font-size: 1.35rem; 
  color: #FFFFFF; 
  line-height: 1.2;
}
.footer-qualification {
  font-size: 0.8rem;
  color: var(--color-gold);
  font-weight: 600;
}
.footer-tagline { 
  font-size: 0.92rem; 
  color: #A3B1A7; 
  line-height: 1.6;
  margin-bottom: var(--space-3); 
}
.footer-seal-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #FAF8F5;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(197, 160, 89, 0.45);
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  max-width: 100%;
}
.footer-seal-img {
  width: 64px;
  height: auto;
  flex-shrink: 0;
  display: block;
}
.footer-seal-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-seal-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.footer-seal-motto {
  font-size: 0.72rem;
  color: var(--color-copper);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.footer-reg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(182, 141, 64, 0.12);
  border: 1px solid rgba(182, 141, 64, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--color-gold-light);
}

.footer-heading { 
  font-size: 0.88rem; 
  font-weight: 700; 
  margin-bottom: var(--space-4); 
  text-transform: uppercase; 
  letter-spacing: 0.08em; 
  color: #FFFFFF;
  position: relative;
  display: inline-block;
}
.footer-heading::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-gold);
  margin-top: 4px;
}

.footer-list { 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  font-size: 0.92rem; 
}
.footer-link { 
  color: #A3B1A7; 
  transition: var(--transition-smooth); 
}
.footer-link:hover { 
  color: var(--color-gold); 
  padding-left: 4px;
}

.footer-location-item {
  margin-bottom: var(--space-3);
  font-size: 0.88rem;
}
.footer-location-item strong {
  display: block;
  color: #FFFFFF;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.footer-location-item p {
  color: #A3B1A7;
  line-height: 1.45;
}

.footer-contact-item {
  margin-bottom: var(--space-2);
  font-size: 0.9rem;
}
.contact-label {
  display: block;
  color: #A3B1A7;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-contact-link { 
  color: var(--color-gold-light); 
  font-weight: 700; 
  font-size: 1.05rem;
}
.footer-contact-link:hover {
  color: #FFFFFF;
}

.social-icons { display: flex; gap: var(--space-3); }
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E2E8E4;
  transition: var(--transition-smooth);
}
.social-icons a:hover {
  background: var(--color-gold);
  color: #111A15;
  transform: translateY(-2px);
}

.footer-bottom { 
  border-top: 1px solid rgba(255, 255, 255, 0.08); 
  padding-top: var(--space-5); 
  text-align: center; 
  font-size: 0.84rem; 
  color: #7A897E; 
}
.footer-bottom a { color: #A3B1A7; }
.footer-bottom a:hover { color: var(--color-gold); }

/* Lightbox (shared — used by certificates and gallery photos) */
.lightbox-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(8, 25, 16, 0.94); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none; 
  flex-direction: column;
  align-items: center; 
  justify-content: center; 
  z-index: 2000; 
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.open { 
  display: flex; 
  opacity: 1;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img { 
  max-width: 100%; 
  max-height: 75vh; 
  border-radius: var(--radius-md); 
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 14px;
  color: var(--color-bg);
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-close { 
  position: absolute; 
  top: -24px; 
  right: -24px; 
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff; 
  font-size: 1.6rem; 
  cursor: pointer; 
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.lightbox-close:hover {
  background: var(--color-gold);
  color: var(--color-forest-deep);
  transform: scale(1.1);
}


.text-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.text-center .hero-eyebrow, .text-center .section-title { width: 100%; justify-content: center; margin-inline: auto; }

.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-glaze); color: var(--color-primary); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; flex-shrink: 0; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }

/* Floating Interactive Actions (WhatsApp & Scroll-to-Top) */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}
.floating-actions > * {
  pointer-events: auto;
}

.scroll-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease, background 0.2s ease;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.scroll-top-btn:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.whatsapp-floating-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  animation: pulseWhatsApp 3s infinite;
}
.whatsapp-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}
.whatsapp-floating-btn:active {
  transform: scale(0.95);
}

.whatsapp-tooltip {
  position: absolute;
  right: 68px;
  white-space: nowrap;
  background: rgba(17, 26, 21, 0.94);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(197, 160, 89, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.whatsapp-floating-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes pulseWhatsApp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6), 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

@media (max-width: 600px) {
  .floating-actions {
    bottom: 18px;
    right: 18px;
    gap: 10px;
  }
  .whatsapp-floating-btn {
    width: 50px;
    height: 50px;
  }
  .scroll-top-btn {
    width: 40px;
    height: 40px;
  }
  .whatsapp-tooltip {
    display: none;
  }
}
