/* ==========================================================================
   1. CORE TOKENS & DESIGN SYSTEM
   ========================================================================== */
:root {
  --primary: #0d7a80;
  --primary-dark: #075357;
  --primary-soft: #eaf6f7;
  --accent: #c48b00;
  --accent-soft: #fef3c7;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #ffffff;
  --border: #e2e8f0;
  --divider: #f1f5f9;
  --text-main: #1e1c18;
  --text-muted: #5e5c54;
  --text-inverse: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.8);
  --footer-bg: #0f172a;

  --font-body: 'DM Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.15);

  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 90px;
}

[data-theme="dark"] {
  --bg: #0f0e0d;
  --surface: #161413;
  --surface-2: #1d1b1a;
  --border: #302d2a;
  --divider: #2b2926;
  --text-main: #eae7e1;
  --text-muted: #a39f96;
  --primary: #57abb8;
  --primary-soft: rgba(87, 171, 184, 0.1);
  --surface-glass: rgba(22, 20, 19, 0.8);
  --footer-bg: #0b0a0a;
}

[data-theme="solarized"] {
  --bg: #fdf6e3;
  --surface: #eee8d5;
  --surface-2: #f5eed7;
  --border: #d3cbb7;
  --divider: #e4dcbe;
  --text-main: #073642;
  --text-muted: #586e75;
  --text-inverse: #fdf6e3;
  --primary: #2aa198;
  --primary-dark: #207a73;
  --primary-soft: rgba(42, 161, 152, 0.12);
  --accent: #b58900;
  --accent-soft: rgba(181, 137, 0, 0.15);
  --surface-glass: rgba(253, 246, 227, 0.85);
  --footer-bg: #002b36;
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

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

/* ==========================================================================
   3. SHARED COMPONENTS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.5rem; border-radius: var(--radius-full);
  font-weight: 700; cursor: pointer; transition: var(--transition);
  border: none; font-size: 0.9rem; gap: 0.5rem; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--text-inverse) !important; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: var(--primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

.section-tag {
  display: inline-block; padding: 0.5rem 1.5rem; background: var(--primary-soft);
  color: var(--primary); border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.15em; margin-bottom: 1.5rem;
}
.section-header { margin-bottom: 5rem; max-width: 900px; }
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.section-desc { font-size: 1.1rem; color: var(--text-muted); }

.glass-card {
  background: var(--surface-glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 3rem; transition: var(--transition);
}
.premium-card {
  background: var(--surface-2); border-radius: var(--radius-lg);
  padding: 2.5rem; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.premium-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

/* ==========================================================================
   4. HEADER & NAV
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
  z-index: 1000; display: flex; align-items: center; transition: var(--transition);
}
.site-header.scrolled {
  height: 80px; background: var(--surface-glass); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.header-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 1rem; }
.brand-mark { width: 50px; height: 50px; background: var(--primary); border-radius: 14px; display: grid; place-items: center; }
.brand-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--primary); }
.brand-subtitle { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

.primary-nav { display: flex; gap: 2rem; align-items: center; }
.nav-link { font-weight: 500; font-size: 0.9rem; color: var(--text-main); opacity: 0.8; }
.nav-link:hover, .nav-link.active { color: var(--primary); opacity: 1; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 1100; }
.menu-toggle span { display: block; width: 25px; height: 2px; background: var(--primary); margin: 5px 0; transition: 0.3s; }

/* ==========================================================================
   5. NOTICE STRIP
   ========================================================================== */
.notice-strip { margin-top: var(--header-height); background: var(--primary-soft); border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.notice-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.notice-pill { background: var(--primary); color: var(--text-inverse); padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.notice-content { display: flex; align-items: center; gap: 1.5rem; }
.notice-text { font-weight: 500; }
.notice-link { color: var(--primary); font-weight: 700; }

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero { padding: 100px 0; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.hero-title { font-size: clamp(3rem, 6vw, 4.5rem); margin-bottom: 2rem; }
.hero-body { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 3rem; }
.hero-meta { display: flex; gap: 3rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--divider); }
.hero-meta-item strong { display: block; font-size: 2.2rem; color: var(--primary); }

.hero-card { background: var(--surface); border-radius: var(--radius-xl); padding: 3.5rem; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.hero-badge { display: inline-block; padding: 0.3rem 0.8rem; background: white; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700; margin: 0 0.5rem 0.5rem 0; }

/* ==========================================================================
   7. SPECIFIC SECTION LAYOUTS
   ========================================================================== */
.pill-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.pill-links a { padding: 0.5rem 1.25rem; border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; }
.pill-links a:hover { background: var(--primary); color: white; }

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-2-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; transition: var(--transition); display: flex; flex-direction: column; }
.card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.card-list li { position: relative; padding-left: 1.25rem; margin-bottom: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.card-list li::before { content: "→"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.about-image-wrapper {
  margin-bottom: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 260px;
  border: 1px solid var(--border);
}
.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.about-image-wrapper:hover .about-img {
  transform: scale(1.03);
}

.facility-image-wrapper {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.facility-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.card:hover .facility-img {
  transform: scale(1.05);
}

.timeline-item { position: relative; padding-left: 2.5rem; border-left: 2px solid var(--divider); margin-bottom: 2rem; }
.timeline-item::before { content: ""; position: absolute; left: -9px; top: 0; width: 16px; height: 16px; background: var(--primary); border-radius: 50%; border: 3px solid var(--bg); }

.gallery-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  height: 600px;
}
.gallery-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.gallery-tile {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.gallery-tile:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.gallery-tile::after {
  content: attr(data-label);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-family: var(--font-display);
  font-size: 1.25rem;
  opacity: 0.9;
  transition: var(--transition);
}
.gallery-tile:hover::after {
  opacity: 1;
  padding-bottom: 2rem;
}
.gallery-tile.large {
  height: 100%;
}
.gallery-subgrid .gallery-tile {
  height: 280px;
}

.news-item { padding: 1.5rem 0; border-bottom: 1px solid var(--divider); }
.calendar-card { background: var(--primary); color: var(--text-inverse); padding: 2.5rem; border-radius: var(--radius-xl); }
.calendar-list li { display: flex; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.calendar-date { font-family: var(--font-display); font-size: 1.1rem; color: var(--accent); min-width: 60px; }

.resource-list a { display: flex; justify-content: space-between; padding: 0.9rem 1.25rem; background: var(--surface); border-radius: 8px; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; }

.site-footer { background: var(--footer-bg); color: var(--text-inverse); padding: 100px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 4rem; }
.footer-col-title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--accent); }
.footer-links li { margin-bottom: 0.75rem; font-size: 0.9rem; opacity: 0.7; }
.footer-links a:hover { opacity: 1; color: var(--accent); }

/* ANIMATIONS */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .section-padding { padding: 80px 0; }
  .hero { padding: 60px 0; }
  
  .hero-grid, .two-column {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .gallery-tile.large {
    height: 400px;
  }
  .gallery-subgrid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Mobile Drawer Navigation */
  .menu-toggle {
    display: block;
    z-index: 1100;
  }
  
  .primary-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--surface-glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border);
    padding: 8rem 3rem 3rem;
    gap: 2rem;
    align-items: flex-start;
    justify-content: flex-start;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: var(--shadow-lg);
  }
  
  .primary-nav.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.2rem;
    font-weight: 600;
    width: 100%;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--divider);
  }
  
  /* Hamburger Menu Toggle Animation */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 768px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .hero-meta {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .grid-4, .footer-grid, .gallery-subgrid {
    grid-template-columns: 1fr;
  }
  .gallery-tile.large {
    height: 280px;
  }
  .gallery-subgrid .gallery-tile {
    height: 220px;
  }
  .btn {
    padding: 0.8rem 2rem;
    font-size: 0.85rem;
  }
  .nav-actions .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .brand-title {
    font-size: 1.25rem;
  }
  .hero-card {
    padding: 2rem;
  }
  .glass-card, .premium-card {
    padding: 2rem;
  }
}