/* YCG-PEP Theme: Navy Blue + Red */
:root {
  --navy-900: #0B2D5C;
  --navy-700: #017cff;
  --navy-100: #e9f0fb;
  --red-600: #E53935;
  --red-500: #F04F4B;
  --amber-400: #fbbf24;
  --pink-500: #f472b6;
  --teal-400: #2dd4bf;
  --ink: #0b1224;
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #667085;
  --light-gray: #f5f7fa;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: var(--navy-900); text-decoration: none; transition: color .2s ease, transform .2s ease; }
a:hover { color: var(--red-600); transform: translateY(-2px); }
.container { width: min(1200px, 92vw); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--navy-900); color: #fff; padding: .5rem .75rem; border-radius: .4rem; z-index: 10000; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.header-inner { display: flex; align-items: center; gap: 1.2rem; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .8rem; font-weight: 700; color: var(--navy-900); }
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand img.placeholder { background: var(--navy-100); border: 2px dashed var(--navy-700); border-radius: .5rem; }
.brand-text strong { display: block; font-size: 1.1rem; letter-spacing: .5px; }
.brand-text .tagline { font-size: .75rem; color: var(--red-600); font-weight: 500; letter-spacing: .3px; }
.menu-toggle { margin-left: auto; display: none; border: none; background: transparent; font-size: 1.4rem; cursor: pointer; color: var(--navy-900); padding: .4rem; }
.nav ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.nav a { display: inline-block; padding: .5rem .75rem; border-radius: .4rem; font-size: .95rem; transition: all .2s ease; }
.nav a.active, .nav a:hover { background: var(--navy-100); color: var(--red-600); transform: scale(1.05); }

/* Activities caret animation */
.nav-caret {
  display: inline-block;
  margin-left: .35rem;
  font-size: .85em;
  transform-origin: center;
  transition: transform .25s ease, color .25s ease;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret,
.nav a:hover .nav-caret {
  transform: translateY(2px) rotate(180deg);
}

/* Dropdown menu */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: .6rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 999;
  margin-top: .5rem;
  overflow: visible;
  border: 1px solid #eef2f7;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown:active .dropdown-menu,
.nav-dropdown > a:focus ~ .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  padding: .8rem 1.2rem;
  color: var(--navy-900);
  background: #fff;
  border: none;
  transition: all 0.25s ease;
  text-align: left;
  display: block;
  white-space: nowrap;
  position: relative;
}
.dropdown-menu a:first-child { border-radius: .6rem .6rem 0 0; }
.dropdown-menu a:last-child { border-radius: 0 0 .6rem .6rem; }
.dropdown-menu a:hover,
.dropdown-menu a:active {
  background: var(--red-600);
  color: #fff;
  padding-left: 1.5rem;
  transform: translateX(4px);
}
.dropdown-menu a.active {
  background: var(--navy-100);
  color: var(--red-600);
  font-weight: 600;
}
.dropdown-menu:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Nested submenu for PEP/PIP/C2C */
.dropdown-item { position: relative; }
.dropdown-item > a { padding-right: 2.2rem; position: relative; }
.dropdown-item > a::after {
  content: '›';
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--muted);
}
.dropdown-item:not(:has(> .submenu)) > a::after {
  content: '';
  display: none;
}
.submenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: .6rem;
  background: #fff;
  border-radius: .6rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  border: 1px solid #eef2f7;
  z-index: 1000;
}
.dropdown-item:hover .submenu,
.dropdown-item:focus-within .submenu,
.dropdown-item:active .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.submenu a {
  padding: .8rem 1.2rem;
  color: var(--navy-900);
  background: #fff;
  border: none;
  transition: all 0.25s ease;
  text-align: left;
  display: block;
  white-space: nowrap;
}
.submenu a:first-child { border-radius: .6rem .6rem 0 0; }
.submenu a:last-child { border-radius: 0 0 .6rem .6rem; }
.submenu a:hover,
.submenu a:active {
  background: var(--red-600);
  color: #fff;
  padding-left: 1.5rem;
  transform: translateX(4px);
}
.submenu a.active {
  background: var(--navy-100);
  color: var(--red-600);
  font-weight: 600;
}
.submenu:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav { position: fixed; right: 1rem; top: 5rem; background: #fff; border: 1px solid #eee; border-radius: .5rem; box-shadow: 0 8px 20px rgba(0,0,0,.08); padding: .5rem; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: .2rem; }
  .brand-text .tagline { display: none; }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: none; }
.hero-inner { display: flex; align-items: center; gap: 2rem; padding: 4rem 0; justify-content: space-between; flex-wrap: wrap; }
.hero h1 { font-size: 3.5rem; margin: 0; line-height: 1.1; }
.tagline-lg { color: #fff; font-size: 1.3rem; font-style: italic; margin: .8rem 0 1rem 0; }
.lead { color: #fff; font-size: 1.15rem; margin: 0 0 1rem 0; }
.hero-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: .5rem; font-weight: 600; transition: transform .15s ease, box-shadow .2s ease; cursor: pointer; border: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: #d32f2f; }
.btn-secondary { background: #fff; color: var(--navy-900); border: 2px solid #fff; }
.btn-secondary:hover { background: transparent; color: #fff; }
.hero-art { position: relative; height: 280px; }
.cube { width: 140px; height: 140px; background: linear-gradient(145deg, #fff, rgba(255,255,255,.75)); border-radius: .6rem; box-shadow: 0 18px 60px rgba(0,0,0,.25); position: absolute; right: 10%; top: 15%; }
.rings { width: 220px; height: 220px; border-radius: 50%; position: absolute; left: 10%; bottom: 10%; box-shadow: inset 0 0 0 8px rgba(255,255,255,.25), inset 0 0 0 16px rgba(255,255,255,.12), 0 0 40px rgba(11,18,36,.35); }
.scroll-indicator { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%); opacity: .8; animation: bounce 1.4s infinite; font-size: 1.2rem; }
@keyframes bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
.spin { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) { 
  .hero-inner { flex-direction: column; } 
  .hero h1 { font-size: 2.5rem; }
  .hero-art { height: 160px; } 
}

/* Sections */
.section-title { color: var(--navy-900); font-size: 2rem; margin: 0 0 1.6rem 0; text-align: center; }
.highlights { padding: 2.5rem 0; position: relative; }
.highlights::before { content: none; }
.grid { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.grid > * { flex: 1 1 320px; }
.card { padding: 1.5rem; border: 1px solid rgba(255,255,255,.6); border-radius: .9rem; background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(240,247,255,.95)); box-shadow: 0 6px 20px rgba(0,0,0,.05); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; backdrop-filter: blur(4px); }
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(0,0,0,.12); border-color: var(--red-600); }
.card h3 { color: var(--navy-900); margin: 0 0 .6rem 0; }
.card p { margin: 0 0 .8rem 0; color: var(--muted); }
.link { color: var(--red-600); font-weight: 600; display: inline-block; }
.link:hover { text-decoration: underline; }
@media (max-width: 900px) { .grid > * { flex: 1 1 100%; } }

/* Slider sections */
.slider-section { padding: 2.8rem 0 3.2rem; position: relative; overflow: hidden; }
.slider-section::before { content: none; }
.slider-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: 1px; font-size: .75rem; color: var(--red-600); margin: 0 0 .25rem 0; }
.slider-controls { display: flex; gap: .5rem; }
.slider-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.08); cursor: pointer; font-size: 1rem; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.slider-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.12); background: var(--light-gray); }
.slider { position: relative; z-index: 1; }
.slider-track { display: flex; gap: 1.2rem; overflow: hidden; scroll-behavior: smooth; }
.slide { border-radius: .9rem; padding: 1.6rem; background: #fff; border: 1px solid #eef2f7; box-shadow: 0 10px 26px rgba(0,0,0,.07); min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; flex: 0 0 320px; }
.slide-badge { display: inline-flex; align-items: center; gap: .35rem; background: rgba(229,57,53,.14); color: var(--red-600); padding: .25rem .65rem; border-radius: 999px; font-weight: 600; font-size: .8rem; letter-spacing: .2px; }
.event-slide h3 { margin: .8rem 0 .4rem; color: var(--navy-900); }
.event-slide p { margin: 0 0 .9rem 0; color: var(--muted); }
.slide-meta { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; }
.image-slide { padding: 0; overflow: hidden; }
.image-frame { height: 280px; background-size: cover; background-position: center; position: relative; }
.image-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.4)); }
.image-slide .slide-meta { padding: .8rem 1rem 1rem; color: var(--navy-900); background: #fff; border-top: 1px solid #eef2f7; }
.slider-track:hover .slide { animation: sway 2.6s ease-in-out infinite; }
.slider-track:hover .slide:nth-child(odd) { animation-delay: .12s; }
.slider-track:hover .slide:nth-child(even) { animation-delay: .32s; }

.activities-preview { padding: 2.5rem 0; position: relative; }
.activities-preview::before { content: none; }
.activities-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.activities-grid > * { flex: 1 1 300px; }
.activity-card { background: var(--light-gray); padding: 1.5rem; border-radius: .7rem; text-align: center; border-left: 4px solid var(--red-600); transition: all .3s ease; }
.activity-card h3 { color: var(--navy-900); margin: 0 0 .6rem 0; }
.activity-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 10px 25px rgba(229, 57, 53, 0.15); background: #fff; }
.activity-card p { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .activities-grid > * { flex: 1 1 100%; } }

.cta { background: linear-gradient(110deg, #0b172f, #102a58, #134375); color: #fff; padding: 2.6rem 0; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: none; }
.cta::after { content: none; }
.cta h2 { margin: 0 0 .8rem 0; }
.cta p { margin: 0 0 1.4rem 0; }
.cta .btn-secondary { background: transparent; border-color: rgba(255,255,255,.9); color: #fff; }

/* Footer */
.site-footer { background: #0a2540; color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1.6rem 0; align-items: flex-start; }
.footer-inner > * { flex: 1 1 300px; }
.site-footer a { color: #fff; opacity: .9; }
.site-footer a:hover { color: var(--red-500); }
.footnote { border-top: 1px solid rgba(255,255,255,.15); padding-top: .8rem; opacity: .85; flex: 1 1 100%; }
@media (max-width: 900px) { .footer-inner > * { flex: 1 1 100%; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity .6s ease, transform .6s ease; }

/* Page Templates */
.page { padding: 2rem 0; }
.page h1 { color: var(--navy-900); font-size: 2.2rem; margin-bottom: 1.4rem; }
.page h2 { color: var(--red-600); margin-top: 1.6rem; margin-bottom: .6rem; }
.page .section { margin: 1.4rem 0; }

/* Submenu with hover animation */
.subnav { 
  background: linear-gradient(135deg, var(--navy-100), rgba(240, 247, 255, 0.6));
  border-radius: .8rem;
  padding: 1rem;
  margin: 1.5rem 0 2rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  max-height: 150px;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  transition: all 0.4s ease;
}
.subnav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.subnav li {
  flex: 0 1 auto;
}
.subnav a {
  display: inline-block;
  padding: .6rem 1.2rem;
  background: #fff;
  border-radius: .5rem;
  color: var(--navy-900);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.subnav a:hover {
  background: var(--red-600);
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.3);
  border-color: var(--red-600);
}
.subnav a.active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}
@media (max-width: 600px) {
  .subnav ul { flex-direction: column; align-items: center; }
  .subnav li { flex: 1 1 100%; text-align: center; }
}

/* Forms */
.form { display: flex; flex-direction: column; gap: .8rem; max-width: 700px; }
.form label { display: block; color: var(--navy-900); font-weight: 500; margin-bottom: .3rem; }
.input { padding: .6rem .7rem; border: 1px solid #ddd; border-radius: .5rem; font: inherit; width: 100%; }
.input:focus { outline: 2px solid var(--red-500); border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1); transform: scale(1.01); transition: all .2s ease; }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.4); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal.open { display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; padding: 2rem; border-radius: .8rem; max-width: 600px; width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close { float: right; font-size: 1.6rem; cursor: pointer; color: var(--muted); transition: color .2s ease, transform .2s ease, background .2s ease; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--red-600); transform: rotate(90deg) scale(1.2); background: rgba(229, 57, 53, 0.1); }
.modal-profile h2 { color: var(--navy-900); margin-top: 0; }
.modal-profile .email { color: var(--red-600); font-weight: 500; }
/* Preserve newlines in modal body content for multi-line bios */
.modal-body { 
  white-space: pre-line; 
  max-height: 50vh; 
  overflow-y: auto; 
  -webkit-overflow-scrolling: touch; 
  padding-right: .5rem; /* prevent content under scrollbar */
}

/* Optional: subtle scrollbar styling for WebKit browsers */
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Gallery */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.gallery-grid > * { flex: 1 1 250px; }
.gallery-item { border-radius: .5rem; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.05); cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.gallery-item:hover { transform: scale(1.08) rotate(1deg); box-shadow: 0 12px 30px rgba(229, 57, 53, 0.2); }
.gallery-item img, .gallery-item video { width: 100%; height: 200px; object-fit: cover; display: block; }

/* People grid with hover reveal */
.people-showcase { padding: 2.5rem 0 3rem; position: relative; }
.people-showcase::before { content: none; }
.people-grid { display: flex; flex-wrap: wrap; gap: 1rem; position: relative; z-index: 1; }
.people-grid > * { flex: 1 1 200px; }
.person-card { position: relative; overflow: hidden; border-radius: .9rem; background: linear-gradient(160deg, rgba(11,18,36,.75), rgba(11,18,36,.92)); color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.16); transform-origin: center; transition: transform .35s ease, box-shadow .35s ease; border: 1px solid rgba(255,255,255,.08); }
.person-card:hover { transform: translateY(-6px) rotate(-0.6deg) scale(1.02); box-shadow: 0 20px 50px rgba(11,18,36,.28); }
.person-card { cursor: pointer; }
.person-card:focus-visible { outline: 2px solid var(--red-600); outline-offset: 3px; }
.person-photo { height: 220px; background: linear-gradient(135deg, rgba(45,212,191,.35), rgba(244,114,182,.4)), url('https://placehold.co/400x480?text=PEP+Team&font=inter'); background-size: cover; background-position: center; filter: saturate(1.05); position: relative; overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; }
.person-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(11,18,36,.15), rgba(11,18,36,.8)); opacity: 0; transform: translateY(20px); transition: opacity .25s ease, transform .25s ease; text-align: center; padding: 1rem; z-index: 2; }
.person-card:hover .person-overlay { opacity: 1; transform: translateY(0); }
.person-name { font-weight: 700; letter-spacing: .4px; font-size: 1.05rem; }
.person-role { color: var(--red-500); font-weight: 600; margin-top: .15rem; font-size: .95rem; }
.social-icons { display: flex; gap: .5rem; justify-content: center; margin-top: .7rem; }
.social-icons a { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.14); transition: background .2s ease, transform .2s ease; }
.social-icons a:first-child { background: #0077b5; }
.social-icons a:last-of-type { background: #fff; color: #333; }
.social-icons a:hover { background: var(--red-600); transform: translateY(-2px); }
.social-icons a:hover { color: #fff; }
.social-icons button:not(.social-info-btn) { background: transparent; border: none; }
.social-icons svg { width: 16px; height: 16px; fill: currentColor; }
.social-info-btn { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: rgba(0,0,0,.6); background: #fff; cursor: pointer; transition: color .2s ease, transform .2s ease; padding: 0; }
.social-info-btn:hover { color: var(--red-500); transform: scale(1.15); }
.person-meta { padding: .75rem 1rem 1rem; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.85); font-size: .9rem; border-top: 1px solid rgba(255,255,255,.07); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.06)); }
.person-info-btn { background: #fff; border: none; cursor: pointer; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: rgba(0,0,0,.6); transition: color .2s ease, transform .2s ease; }
.person-info-btn:hover { color: var(--red-500); transform: scale(1.15); }
.person-info-btn svg { width: 20px; height: 20px; stroke-width: 1.5; }
.person-badge { background: rgba(255,255,255,.14); color: #fff; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; letter-spacing: .3px; }
.person-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red-500); box-shadow: 0 0 0 0 rgba(229,57,53,.65); animation: pulse 1.5s infinite; }

.section-note { text-align: center; color: var(--muted); max-width: 760px; margin: 0 auto 1.4rem; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229,57,53,.55); } 70% { box-shadow: 0 0 0 10px rgba(229,57,53,0); } 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); } }
@keyframes sway { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Program Page Dropdown Navigation */
.program-nav-container {
  position: relative;
  display: inline-block;
  margin: 2rem 0;
}
.program-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  margin: 0;
  padding: 1rem 1.5rem;
  border-radius: .6rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.program-title:hover {
  background: var(--navy-100);
  color: var(--red-600);
  transform: translateY(-2px);
}
.program-nav-container:hover .nav-caret,
.program-nav-container:focus-within .nav-caret,
.program-nav-container.open .nav-caret {
  transform: translateY(2px) rotate(180deg);
}
.program-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: .6rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 999;
  margin-top: .5rem;
  overflow: hidden;
  border: 1px solid #eef2f7;
}
.program-nav-container:hover .program-dropdown-menu,
.program-nav-container:focus-within .program-dropdown-menu,
.program-title:hover + .program-dropdown-menu,
.program-title:focus + .program-dropdown-menu,
.program-nav-container.open .program-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.program-dropdown-menu a {
  padding: 1rem 1.5rem;
  color: var(--navy-900);
  background: #fff;
  border: none;
  transition: all 0.25s ease;
  text-align: left;
  display: block;
  font-size: 1rem;
  font-weight: 500;
}
.program-dropdown-menu a:first-child { border-radius: .6rem .6rem 0 0; }
.program-dropdown-menu a:last-child { border-radius: 0 0 .6rem .6rem; }
.program-dropdown-menu a:hover {
  background: var(--red-600);
  color: #fff;
  padding-left: 2rem;
  transform: translateX(4px);
}

/* Timeline */
.timeline { position: relative; padding: 1rem 0; }
.timeline-item { padding: 1rem 0 1rem 2.5rem; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: .5rem; top: 1.4rem; width: 12px; height: 12px; background: var(--red-600); border-radius: 50%; }
.timeline-item::after { content: ''; position: absolute; left: .85rem; top: 0; width: 2px; height: 100%; background: var(--navy-100); }
.timeline-item:last-child::after { display: none; }
.timeline-item h3 { color: var(--navy-900); margin: 0 0 .3rem 0; }
.timeline-item p { margin: 0; color: var(--muted); }

/* ========== PHONE: 320px - 599px ========== */
@media (max-width: 599px) {
  /* Typography & Spacing */
  html { font-size: 14px; }
  .container { padding: 0 1rem; width: 100%; }
  
  /* Header & Navigation */
  .site-header { position: sticky; top: 0; z-index: 1000; padding: 0.5rem 0; }
  .header-inner { padding: 0.5rem 1rem; gap: 0.8rem; }
  .brand img { width: 45px; height: 45px; }
  .brand-text strong { font-size: 1rem; }
  .menu-toggle { display: inline-block !important; font-size: 1.2rem; padding: 0.5rem; }
  
  .nav { 
    position: fixed !important;
    right: 0.5rem !important;
    top: 3.5rem !important;
    left: auto !important;
    width: auto !important;
    max-width: 280px;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 0.5rem !important;
    display: none !important;
    z-index: 999;
    max-height: 75vh !important;
    overflow-y: auto !important;
  }
  .nav.open { display: block !important; }
  .nav ul { 
    flex-direction: column !important;
    gap: 0.2rem !important;
  }
  .nav a { 
    padding: 0.6rem 0.8rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Dropdown menus on mobile */
  .dropdown-menu {
    position: static !important;
    opacity: 0 !important;
    visibility: hidden !important;
    max-height: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    background: #f5f5f5 !important;
    border: none !important;
    margin: 0 !important;
    transform: none !important;
    transition: max-height 0.3s ease !important;
  }
  .nav-dropdown.open .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    max-height: 500px !important;
  }
  .dropdown-item { border-bottom: 1px solid #eee; padding: 0 !important; }
  .dropdown-item:last-child { border-bottom: none; }
  .dropdown-item > a { padding-right: 0.8rem !important; }
  .dropdown-item > a { display: block !important; }
  .dropdown-item > a::after { display: none !important; }
  
  .submenu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    min-width: auto !important;
    padding-left: 1rem;
    border-top: 1px solid #f0f0f0;
  }
  .submenu a { display: block !important; padding: 0.6rem 0.8rem !important; font-size: 0.85rem; }
  
  /* Hero Section */
  .hero-inner { 
    flex-direction: column !important;
    padding: 2rem 1rem !important;
    gap: 1.5rem !important;
    text-align: center;
  }
  .hero h1 { 
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
  .tagline-lg { font-size: 1rem !important; }
  .lead { font-size: 1rem !important; }
  .hero-actions { 
    flex-direction: column !important;
    gap: 0.8rem !important;
    margin-top: 1rem !important;
  }
  .btn { 
    width: 100% !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
  }
  .hero-art { 
    display: none !important;
  }
  .scroll-indicator { display: none; }
  
  /* Sections & Grid */
  .section-title { 
    font-size: 1.5rem !important;
    margin: 0 0 1.2rem 0 !important;
  }
  .grid { gap: 1rem !important; }
  .grid > * { flex: 1 1 100% !important; }
  
  .card { 
    padding: 1.2rem !important;
    border-radius: 0.6rem !important;
  }
  
  /* Slider */
  .slider-section { padding: 2rem 1rem !important; }
  .slider-header { 
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.8rem !important;
    margin-bottom: 1rem !important;
  }
  .slider-controls { 
    align-self: flex-start !important;
  }
  .slide { 
    flex: 0 0 100% !important;
    min-height: 200px !important;
  }
  .image-frame { height: 200px !important; }
  
  /* Activities Grid */
  .activities-grid > * { flex: 1 1 100% !important; }
  .activity-card { padding: 1rem !important; }
  
  /* People Grid */
  .people-grid > * { flex: 1 1 100% !important; }
  .person-card { margin-bottom: 1rem; }
  .person-photo { height: 180px !important; }
  .person-meta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  
  /* Forms */
  .form { max-width: 100% !important; }
  .input { padding: 0.7rem 0.6rem !important; }
  
  /* Page Content */
  .page { padding: 1.5rem 1rem !important; }
  .page h1 { 
    font-size: 1.6rem !important;
    margin-bottom: 1rem !important;
  }
  .page h2 { font-size: 1.2rem !important; }
  
  /* Subnav */
  .subnav { 
    padding: 0.8rem !important;
    margin: 1rem 0 !important;
    max-height: auto !important;
  }
  .subnav ul { 
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
  }
  .subnav li { flex: 1 1 auto !important; }
  .subnav a { 
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }
  
  /* CTA Section */
  .cta { padding: 2rem 1rem !important; }
  .cta h2 { font-size: 1.4rem !important; }
  
  /* Footer */
  .footer-inner { 
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 1.5rem 1rem !important;
  }
  .footer-inner > * { flex: 1 1 100% !important; }
  .footnote { flex: 1 1 100% !important; }
  
  /* Modal */
  .modal-content { 
    width: 95vw !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    border-radius: 0.6rem !important;
  }
  .modal-body { max-height: 60vh !important; }
  
  /* Program Nav */
  .program-title { 
    font-size: 1.4rem !important;
    padding: 0.8rem 1rem !important;
  }
  .program-dropdown-menu { 
    min-width: 200px !important;
    left: 0 !important;
  }
  
  /* FAQ */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Gallery */
  .gallery-grid > * { flex: 1 1 100% !important; }
  .gallery-item img, .gallery-item video { height: 180px !important; }
  
  /* Timeline */
  .timeline-item { padding-left: 2rem !important; }
}

/* ========== SMALL DEVICES: 320px - 480px ========== */
@media (max-width: 480px) {
  html { font-size: 13px; }
  
  .hero h1 { font-size: 1.6rem !important; }
  .hero-actions { flex-direction: column !important; }
  .btn { width: 100% !important; }
  
  .page h1 { font-size: 1.4rem !important; }
  .page h2 { font-size: 1.1rem !important; }
  
  .section-title { font-size: 1.4rem !important; }
  
  /* Text adjustments */
  .lead { font-size: 0.95rem !important; }
  .tagline-lg { font-size: 0.95rem !important; }
}

/* ========== TABLET: 600px - 899px ========== */
@media (min-width: 600px) and (max-width: 899px) {
  .container { width: min(95vw, 100%); }
  
  /* Navigation tweaks */
  .nav ul { gap: 0.5rem; }
  .nav a { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
  
  /* Hero Section */
  .hero-inner { 
    flex-direction: column !important;
    padding: 3rem 1.5rem !important;
  }
  .hero h1 { font-size: 2.2rem !important; }
  .hero-art { 
    display: none !important;
  }
  
  /* Sections */
  .section-title { font-size: 1.8rem; }
  .grid > * { flex: 1 1 48% !important; }
  
  /* Slider */
  .slide { flex: 0 0 48% !important; }
  
  /* Activities */
  .activities-grid > * { flex: 1 1 48% !important; }
  
  /* People */
  .people-grid > * { flex: 1 1 160px !important; }
  
  /* Footer */
  .footer-inner > * { flex: 1 1 48% !important; }
  
  /* Page */
  .page { padding: 2rem 1.5rem !important; }
  
  /* Forms in two columns */
  .form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .form label:nth-child(odd) ~ .input:nth-of-type(odd) { grid-column: 1; }
}

/* ========== LAPTOP & DESKTOP: 900px+ ========== */
@media (min-width: 900px) {
  .menu-toggle { display: none !important; }
  
  .nav { position: relative !important; display: block !important; max-height: none !important; }
  .nav ul { flex-direction: row !important; gap: 1rem !important; }
  
  /* Hero */
  .hero-inner { 
    flex-direction: row !important;
    padding: 4rem 0 !important;
  }
  .hero h1 { font-size: 3.5rem !important; }
  .hero-art { display: block !important; }
  
  /* Grids */
  .grid > * { flex: 1 1 320px !important; }
  .activities-grid > * { flex: 1 1 300px !important; }
  .people-grid > * { flex: 1 1 200px !important; }
  .footer-inner > * { flex: 1 1 300px !important; }
  
  /* Sliders */
  .slide { flex: 0 0 320px !important; }
}

/* ========== LANDSCAPE PHONES: 600px width, <500px height ========== */
@media (max-height: 500px) and (min-width: 600px) {
  .hero-inner { padding: 2rem 1.5rem !important; }
  .hero h1 { font-size: 1.8rem !important; }
  .hero-art { display: none !important; }
}

/* ========== ULTRA-WIDE SCREENS: 1600px+ ========== */
@media (min-width: 1600px) {
  .container { max-width: 1400px; }
  .section-title { font-size: 2.4rem; }
  .page h1 { font-size: 2.6rem; }
}

/* ========== IMPROVED TOUCH TARGETS ========== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  a, button, .faq-toggle { 
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve finger-friendly interactions */
  .btn { 
    padding: 0.8rem 1.2rem !important;
    font-size: 1rem !important;
    min-height: 48px;
  }
  
  .nav a { 
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .card { padding: 1.3rem !important; }
  
  /* Reduce hover effects on touch devices */
  .card:hover { 
    transform: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
  }
  
  .person-card:hover { 
    transform: none;
    box-shadow: 0 12px 34px rgba(0,0,0,.16);
  }
  
  .slide:hover { animation: none !important; }
  
  /* Make dropdowns tap-friendly */
  .nav-dropdown { position: relative; }
  
  /* Remove hover transforms on touch */
  a:hover { transform: none; }
  .btn:hover { transform: none; }
}

/* ========== HIGH DPI SCREENS (Retina) ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img { image-rendering: auto; }
  /* Slightly thinner borders on high DPI */
  .card { border-width: 0.5px; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== LANDSCAPE ADJUSTMENTS ========== */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-inner { padding: 1.5rem !important; }
  .hero h1 { font-size: 1.6rem !important; }
  .hero-art { display: none !important; }
  .page { padding: 1.5rem !important; }
}
