/* Core Premium Design System */
:root {
  --primary: #123524;       /* Deep Forest Green - High End */
  --primary-dark: #0A1C13;  /* Darkest Forest Green - ADDED */
  --primary-light: #2A5A43; /* Rich Organic Green */
  --secondary: #F4F1EB;     /* Alabaster / Beige */
  --accent: #CF9D40;        /* Luxury Gold */
  --text-dark: #1A201C;     /* Very Dark Slate */
  --text-light: #5C6E64;    /* Sage Grey */
  --white: #ffffff;
  --bg-light: #FDFCF9;      /* Ultra soft cream */
  --glass-bg: rgba(253, 252, 249, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;

  /* Ethereal Smooth Shadows */
  --shadow-sm: 0 4px 15px rgba(18, 53, 36, 0.03);
  --shadow-md: 0 15px 35px rgba(18, 53, 36, 0.05);
  --shadow-lg: 0 25px 60px rgba(18, 53, 36, 0.08);
  --shadow-glow: 0 10px 30px rgba(207, 157, 64, 0.3);

  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --primary: #86efac;       /* Lighter green for dark bg */
  --primary-dark: #f0fdf4;
  --primary-light: #2A5A43;
  --secondary: #0A1C13;     /* Deep dark forest */
  --accent: #CF9D40;
  --text-dark: #f8fcf8;     /* Off-white text */
  --text-light: #a8b2ac;
  --white: #123524;         /* Cards bg */
  --bg-light: #050d09;      /* Main bg */
  --glass-bg: rgba(10, 28, 19, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 15px 35px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { width: 90%; max-width: 1280px; margin: 0 auto; position: relative; z-index: 2;}

/* Buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 1rem 2.8rem;
  border-radius: 100px;
  font-weight: 500; font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
  border: 1px solid transparent; text-align: center;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: #0A1C13;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(18, 53, 36, 0.2);
}
.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Glassmorphism Navbar */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 5000;
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
  overflow: visible !important; /* CRITICAL: Ensure mobile menu isn't clipped */
}
.nav-content { 
  padding: 1.5rem 0; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  position: relative; /* Anchor for mobile nav Links */
  overflow: visible !important;
}
.logo { font-size: 2.2rem; font-weight: 700; color: var(--primary); letter-spacing: -0.03em; }
.logo span { color: var(--accent); }

/* Hamburger */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.hamburger span { width: 30px; height: 2px; background-color: var(--primary); border-radius: 2px; transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-weight: 400; color: var(--text-dark); position: relative; letter-spacing: 0.02em; }
.nav-links a.active { color: var(--accent); font-weight: 500; }
.nav-links a:not(.btn)::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -4px; left: 0; background-color: var(--accent); transition: width 0.3s ease; }
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-links .btn { padding: 0.8rem 2rem; font-size: 0.9rem; }
.nav-links .btn-primary { color: #ffffff !important; }
.nav-admin-btn {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-signup-btn {
  color: #fff !important;
}

/* Dropdown */
.dropdown { position: relative; padding-bottom: 5px; }
.dropdown-content {
  display: none; position: absolute; top: 100%; left: -20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  min-width: 220px; box-shadow: var(--shadow-lg); z-index: 1001;
  border-radius: 16px; border: 1px solid var(--glass-border);
  overflow: hidden; opacity: 0; transform: translateY(15px); transition: var(--transition);
}
.dropdown:hover .dropdown-content { display: block; opacity: 1; transform: translateY(0); }
.dropdown-content a { color: var(--text-dark); padding: 14px 24px; font-weight: 400!important; display: block; border-bottom: 1px solid rgba(0,0,0,0.03); }
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: var(--secondary); color: var(--primary); padding-left: 28px; }
/* Keep service submenu readable in every theme/view */
.dropdown-content a,
.nav-links .dropdown-content a {
  color: #1a201c !important;
}

/* Main Layout */
main { min-height: 80vh; }

/* Immersive Hero */
.hero {
  min-height: 90vh; display: flex; align-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg-light) 100%);
  padding: 6rem 0;
}
.hero::before {
  content: ''; position: absolute; top: -10%; right: -5%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(207,157,64,0.08) 0%, transparent 60%); border-radius: 50%; z-index: 0;
}
.hero-content { flex: 1; padding-right: 4rem; z-index: 2; position: relative; }
.hero h1 { font-size: 5rem; line-height: 1.05; margin-bottom: 1.5rem; text-shadow: 0 10px 30px rgba(18,53,36,0.08); }
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; color: var(--text-light); max-width: 500px; }
.hero-inner { display: flex; align-items: center; gap: 4rem; width: 100%; }
.hero-image {
  flex: 1; height: 650px;
  background: url('https://images.unsplash.com/photo-1544161515-4ab6ce6db874?auto=format&fit=crop&w=1000&q=80') center/cover;
  border-radius: 40px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 1;
  animation: floatImage 8s ease-in-out infinite;
}
@keyframes floatImage { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.home-hero-bg {
  background-image: linear-gradient(rgba(18, 53, 36, 0.65), rgba(18, 53, 36, 0.8)), url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?auto=format&fit=crop&w=1920&q=80') !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  padding: 12rem 0 !important;
}
.home-hero-bg::before {
  display: none !important;
}
.home-hero-bg h1 {
  color: #ffffff !important;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
.home-hero-bg p {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}

/* Section & Cards */
.section { padding: 8rem 0; position: relative; }
.section-title { text-align: center; margin-bottom: 5rem; position: relative; z-index: 2; }
.section-title h2 { font-size: 3rem; margin-bottom: 1.2rem; }
.section-title p { color: var(--text-light); max-width: 650px; margin: 0 auto; font-size: 1.15rem; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem; position: relative; z-index: 2; }
.service-card {
  background: var(--white); border-radius: 30px; overflow: hidden;
  box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.02);
  display: flex; flex-direction: column; transition: var(--transition-slow);
}
.service-card:hover { transform: translateY(-15px); box-shadow: var(--shadow-lg); }
.service-img { height: 280px; background-size: cover; background-position: center; transition: var(--transition-slow); }
.service-card:hover .service-img { transform: scale(1.05); }

.service-content {
  padding: 2.5rem; flex: 1; display: flex; flex-direction: column;
  background: var(--white); position: relative; z-index: 2;
}
.service-cat {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); font-weight: 600; margin-bottom: 1.2rem;
}
.service-card h3 { font-size: 1.8rem; margin-bottom: 1rem; line-height: 1.2; }
.service-card p { color: var(--text-light); margin-bottom: 2rem; flex: 1; font-size: 1rem; }
.service-footer { display: flex; justify-content: flex-end; align-items: center; border-top: 1px solid rgba(0,0,0,0.04); padding-top: 1.5rem; }

/* Floating WhatsApp */
.whatsapp-btn {
  position: fixed; bottom: 40px; right: 40px; background-color: #25D366; width: 65px; height: 65px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(37,211,102,0.4); z-index: 999; transition: var(--transition);
}
.whatsapp-btn:hover { transform: translateY(-5px) scale(1.1); box-shadow: 0 15px 35px rgba(37,211,102,0.5); }

/* Forms & Auth */
.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 90vh; padding: 4rem 1rem; background: radial-gradient(circle at top right, var(--secondary) 0%, var(--bg-light) 100%); }
.auth-card { background: var(--white); padding: 4.5rem; border-radius: 35px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; border: 1px solid rgba(255,255,255,0.8); }
.auth-card h2 { text-align: center; margin-bottom: 2.5rem; font-size: 2.4rem; color: var(--primary); }
.form-group { margin-bottom: 1.8rem; }
.form-group label { display: block; margin-bottom: 0.6rem; font-weight: 500; font-size: 0.95rem; color: var(--text-light); }
.form-control { width: 100%; padding: 1.1rem 1.4rem; border: 1px solid rgba(0,0,0,0.06); background: #faf9f7; border-radius: 14px; font-family: var(--font-sans); transition: var(--transition); font-size: 1rem; }
.form-control:focus { outline: none; background: var(--white); border-color: var(--accent); box-shadow: 0 5px 20px rgba(207,157,64,0.15); }
.auth-card .btn { width: 100%; margin-top: 1.5rem; padding: 1.1rem; }
.auth-switch { text-align: center; margin-top: 2rem; font-size: 0.95rem; color: var(--text-light); }
.auth-switch a { color: var(--accent); font-weight: 600; transition: var(--transition); }
.auth-switch a:hover { color: var(--primary); }

/* Dashboard Component */
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 4rem; margin-top: 5rem; margin-bottom: 5rem; }
.sidebar { background: var(--white); border-radius: 30px; padding: 2.5rem; box-shadow: var(--shadow-md); align-self: start; }
.sidebar h3 { margin-bottom: 2rem; font-size: 1.4rem; color: var(--accent); }
.sidebar-nav li { margin-bottom: 0.8rem; }
.sidebar-nav a { display: block; padding: 1.1rem 1.4rem; border-radius: 15px; font-weight: 500; color: var(--text-light); transition: var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--secondary); color: var(--primary); transform: translateX(5px); }
.dash-content { background: var(--white); border-radius: 30px; padding: 4.5rem; box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,0.02); }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); }

/* Generic Page UI */
.page-breadcrumb {
  background: var(--bg-light);
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.page-breadcrumb .container {
  font-size: 0.92rem;
  color: var(--text-light);
}
.page-breadcrumb a:hover {
  color: var(--accent);
}
.page-hero {
  min-height: 35vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.page-hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1rem;
}
.category-card {
  text-align: center;
  padding: 3rem 2rem;
}
.category-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
}

/* Dashboard appointment cards */
.appointment-card {
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  margin-bottom: 1rem;
  background: var(--bg-light);
}
.appointment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.appointment-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--secondary);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.form-error {
  color: #c53030;
  font-size: 0.9rem;
  margin-top: 10px;
  display: none;
}

/* Footer */
.footer { background: var(--primary); color: var(--white); padding: 7rem 0 3rem; position: relative; overflow: hidden; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); }
.footer-content { display: flex; justify-content: space-between; gap: 4rem; margin-bottom: 5rem; }
.footer-brand h2 { color: var(--white); font-size: 2.5rem; margin-bottom: 1.5rem; text-shadow: none; }
.footer-brand span { color: var(--accent); }
.footer-brand p { color: rgba(255,255,255,0.7); max-width: 350px; font-size: 1rem; line-height: 1.8; }
.footer-links h3 { color: var(--white); margin-bottom: 2rem; font-size: 1.3rem; }
.footer-links li { margin-bottom: 1rem; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-links li a:hover { color: var(--accent); padding-left: 8px; }
.footer-bottom { text-align: center; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* Global Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
/* NOTE: opacity is NOT set to 0 globally - let each section be visible by default */
.section { opacity: 1; }
.animate-on-load { animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; opacity: 0; }

/* Responsive Adjustments */
@media (max-width: 992px) {
  .hero { flex-direction: column; text-align: center; padding: 6rem 0 4rem; }
  .hero-inner { flex-direction: column; gap: 2rem; }
  .hero-content { padding-right: 0; margin-bottom: 2rem; }
  .hero h1 { font-size: 4rem; }
  .hero p { margin: 0 auto 2.5rem; }
  .hero-image { width: 100%; height: 400px; border-radius: 40px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 3rem; margin-top: 3rem; margin-bottom: 3rem; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 86px;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - 86px);
    background: rgba(10, 28, 19, 0.98); 
    backdrop-filter: blur(30px);
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    padding: 1.2rem 0 4.5rem;
    border: none;
    z-index: 9999; /* ABOVE EVERYTHING */
    transition: all 0.4s ease;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .nav-links.show { display: flex; animation: slideDownNav 0.4s ease forwards; }
  @keyframes slideDownNav {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .nav-links li { width: 100%; text-align: center; margin: 8px 0; }
  .nav-links li:last-child { margin-bottom: 1.25rem; }
  .nav-links li a { font-size: 1.4rem; color: #ffffff !important; font-weight: 500; }
  .nav-links .dropdown {
    width: 100%;
    padding-bottom: 0;
  }
  .nav-links .dropdown-content {
    position: static;
    left: auto;
    top: auto;
    min-width: 0;
    width: 85%;
    margin: 0.6rem auto 0;
    display: none;
    opacity: 1;
    transform: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  }
  .nav-links .dropdown.open .dropdown-content {
    display: block;
  }
  .nav-links .dropdown-content a {
    color: #1a201c !important;
    font-size: 1.15rem;
    padding: 0.9rem 1.2rem;
  }
  .nav-links .btn {
    display: inline-flex;
    width: min(88%, 320px);
    min-width: 200px;
    margin: 6px auto;
    justify-content: center;
  }
  .nav-links .btn-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff !important;
  }
  .nav-links .btn-primary {
    background: var(--accent);
    color: #ffffff !important;
  }
  
  .hero h1 { font-size: 2.8rem !important; word-wrap: break-word; overflow-wrap: break-word; }
  .section { padding: 4rem 0; }
  .auth-card { padding: 2.5rem 1.5rem; border-radius: 24px; }
  .dash-content { padding: 2.5rem 1.5rem; border-radius: 20px; }
  .appointment-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.animate-in { animation: fadeInUp 1s ease forwards; }