/* --- CSS Variables: Apple Light Theme --- */
:root {
    --color-bg-primary: #fff;
    --color-bg-secondary: #f5f7fa;
    --color-text-primary: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-accent: #0066cc;
    --color-border: #d2d2d7;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Icons", "Helvetica Neue", "Arial", sans-serif;
    --header-height: 48px;
}

/* --- Base & Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
body.no-scroll { overflow: hidden; }

/* --- Layout variables --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 22px;
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
}
.main-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: -1;
    transition: opacity 0.4s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 18px;
    gap: 20px;
}
.header-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.header-nav {
    display: none;
    gap: 24px;
}
.header-nav a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s ease;
}
.header-nav a:hover { color: var(--color-accent); }

/* --- Mobile Menu Button --- */
.menu-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: none; background: none; cursor: pointer;
    position: relative;
    margin-right: -11px;
}
.menu-button .bar-container {
    width: 18px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-button .bar {
    width: 100%;
    height: 2px;
    background: var(--color-text-primary);
    /* The transition now only needs to apply to the transform property */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}


/* --- MODIFIED: Classic Symmetrical and Centered Animation --- */
.menu-button.active .bar:nth-child(1) {
    /* Moves 5px down to the center, then rotates */
    transform: translateY(5px) rotate(45deg);
}
.menu-button.active .bar:nth-child(2) {
    /* Moves 5px up to the center, then rotates */
    transform: translateY(-5px) rotate(-45deg);
}
/* --- END MODIFICATION --- */


/* Hide header content when menu is open */
.main-header.menu-open .header-logo,
.main-header.menu-open .header-nav {
    opacity: 0;
    visibility: hidden;
}
.main-header.menu-open::before {
    opacity: 0;
}

/* Fullscreen Menu */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-primary);
    z-index: 1001;
    padding: var(--header-height) 30px 30px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
}
.fullscreen-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.fullscreen-menu nav { margin-top: 40px; }
.fullscreen-menu a {
    display: block;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    padding: 14px 0;
    text-align: left;
    opacity: 0;
    transform: translateY(15px);
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.fullscreen-menu.is-open a { opacity: 1; transform: translateY(0); }
.fullscreen-menu.is-open a:nth-child(1) { transition-delay: 0.15s; }
.fullscreen-menu.is-open a:nth-child(2) { transition-delay: 0.2s; }
.fullscreen-menu.is-open a:nth-child(3) { transition-delay: 0.25s; }
.fullscreen-menu.is-open a:nth-child(4) { transition-delay: 0.3s; }
.fullscreen-menu.is-open a:nth-child(5) { transition-delay: 0.35s; }
.fullscreen-menu.is-open a:nth-child(6) { transition-delay: 0.4s; }

/* --- Responsive Design --- */
@media (min-width: 834px) {
  .menu-button,.fullscreen-menu { display: none; }
  .header-nav { display: flex; }
  .header-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
  .header-logo { justify-self: start; }
  .header-nav { justify-self: center; }
}

@media (max-width: 833px) {
  .menu-button {
      position: fixed;
      top: calc(env(safe-area-inset-top, 0px) + ((var(--header-height) - 44px) / 2));
      right: 18px;
      z-index: 1002;
      margin-right: 0;
  }
}

/* --- Content & Page Styles --- */
.hero-static-section { height: 90vh; min-height: 500px; padding-top: var(--header-height); display: flex; align-items: center; justify-content: center; background-image: url('../img/hero-bg.jpg'); background-size: cover; background-position: center; }
.hero-text-content { text-align: center; max-width: 880px; padding: 0 20px; }
.hero-text-content h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 600; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }
.hero-text-content p { font-size: clamp(18px, 3vw, 24px); color: rgba(255,255,255,0.9); margin-top: 10px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.page-main { padding-top: var(--header-height); }
.content-section { padding: clamp(60px, 10vw, 120px) 0; }
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.section-title,.page-title { font-size: clamp(32px, 5vw, 48px); font-weight: 600; text-align: center; margin-bottom: 20px; }
.section-subtitle { font-size: clamp(18px, 2.5vw, 21px); text-align: center; max-width: 680px; margin: 0 auto; line-height: 1.5; color: var(--color-text-secondary); }
.section-link-container { text-align: center; margin-top: 30px; }
.cta-link { color: var(--color-accent); text-decoration: none; font-weight: 600; font-size: 17px; }
.cta-link:hover { text-decoration: underline; }

/* Cards & Grids */
.grid-2x2 { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 50px; }
.card { background-color: var(--color-bg-primary); border-radius: 18px; padding: 40px; border: 1px solid transparent; }
.bg-secondary .card { background-color: #fff; border-color: var(--color-border); }
.bg-primary .card { background-color: var(--color-bg-secondary); }
.card-title { font-size: 24px; font-weight: 600; color: var(--color-text-primary); }
.card-body { font-size: 17px; margin: 10px 0 15px; color: var(--color-text-secondary); line-height: 1.6; }
.text-content-container { max-width: 680px; margin: 0 auto; }
.content-title { font-size: 24px; font-weight: 600; margin: 40px 0 10px; text-align: left; }
.content-title:first-child { margin-top: 0; }
.content-body { font-size: 17px; line-height: 1.7; color: var(--color-text-secondary); text-align: left;}

/* Leadership / Members */
.leadership-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px; margin-top: 40px; }
.leadership-card { text-align: center; }
.leadership-avatar { width: 140px; height: 140px; border-radius: 50%; margin-bottom: 15px; object-fit: cover; }
.leadership-name { font-size: 19px; font-weight: 600; color: var(--color-text-primary); }
.leadership-title { font-size: 15px; color: var(--color-text-secondary); }

/* News List */
.news-list { display: flex; flex-direction: column; gap: 30px; }
.news-item { padding-bottom: 30px; border-bottom: 1px solid var(--color-border); }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-meta { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 8px; }
.news-title { font-size: 24px; font-weight: 600; margin-bottom: 12px; }
.news-title a { color: var(--color-text-primary); transition: color 0.3s ease; }
.news-title a:hover { color: var(--color-accent); }
.news-excerpt { font-size: 16px; line-height: 1.6; color: var(--color-text-secondary); }

/* Gallery Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.gallery-item { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; background: var(--color-bg-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.gallery-item img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-caption { padding: 15px; }
.gallery-caption h3 { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.gallery-caption p { font-size: 14px; color: var(--color-text-secondary); }

/* --- Footer --- */
.main-footer { background-color: var(--color-bg-secondary); padding: 40px 22px; font-size: 12px; text-align: center; color: var(--color-text-secondary); border-top: 1px solid var(--color-border); }
.footer-container { max-width: 1100px; margin: 0 auto; }
.footer-links { margin-top: 10px; }
.footer-links a { margin: 0 10px; color: var(--color-text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--color-accent); }

@media (min-width: 834px) {
  .grid-2x2 { grid-template-columns: 1fr 1fr; }
}

/* Force menu button to top layer */
.menu-button { z-index: 1100; }
