* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --surface: #111827;
    --card: rgba(255,255,255,0.05);
    --text: #e5e7eb;
    --muted:  #9ca3af;
    --accent: #d4a017;
    --border: rgba(255,255,255,0.08);
    --max-width: 1250px;
    --shadow: 0 10px 40px rgba(0,0,0,0.35);
    --radius: 22px;
    --transition: all 0.35s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, #0b1220 0%, #111827 100%);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.75;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(92%, var(--max-width));
    margin: auto;
}

/* NAVIGATION */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem; /* Add gap between logo and nav links */
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: white;
  white-space: nowrap; /* Prevent logo from wrapping */
  flex-shrink: 0; /* Prevent logo from shrinking */
}

.nav-links {
  display: flex;
  gap: 1.5rem; /* Reduced from 2rem */
  flex-wrap: wrap; /* Allow links to wrap if needed */
  justify-content: flex-end; /* Align links to the right */
}

.nav-links a {
  font-size: 0.85rem; /* Slightly smaller font */
  color: var(--muted);
  transition: var(--transition);
  white-space: nowrap; /* Prevent individual links from wrapping */
}

.nav-links a:hover {
  color: white;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: white;
  flex-shrink: 0; /* Prevent toggle from shrinking */
}


/* HERO */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    url('images/ateny-pech-guards.jpg') center/cover no-repeat;
    z-index: -2;
    transform: scale(1.05);
}

.hero::after {
    content: "";
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(212,160,23,0.18) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: top;
}

.eyebrow {
    display: block;
    margin: 0 auto 1.2rem auto;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.04);
    max-width: fit-content; /* pill shaped */
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: white;
}

.hero h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 2rem;
    font-family: 'Merriweather', serif;
    max-width: 700px;
}

.hero p {
    max-width: 760px;
    color: rgba(255,255,255,0.82);
    font-size: 1.08rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  margin: auto;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px; /* Optional: limits width */
  
}

.hero-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

/* Both buttons fill their grid cells */
.hero-actions-row .btn {
  width: 100%;
  text-align: center;
}


.btn {
    padding: 1rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #111827;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    border-color: rgba(255,255,255,0.15);
    color: white;
    background: rgba(255,255,255,0.04);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
}

.btn-facebook {
  display: inline-block;
  width: 100%;
  background: #1877f2;
  color: white;
  text-align: center;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-facebook:hover {
  background: #0084ff;
  transform: translateY(-2px);
}



.portrait-card {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.08);
}

.portrait-card img {
    width: 100%;
    height: 760px;
    object-fit: cover;
}

.portrait-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
}


.portrait-overlay h3 {
    font-size: 1.5rem;
    margin-top: 0.6rem;
}

/* GENERAL SECTION */

section {
    padding: 4rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 2rem;
    max-width: 800px;
}

.section-header span {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.1rem, 2.5vw, 2rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
    color: white;
}

.section-header p {
    color: var(--muted);
    font-size: 1.05rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(212,160,23,0.35);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: white;
}

.card p {
    color: #d1d5db;
}

/* TIMELINE */

.timeline {
    position: relative;
    max-width: 900px;
    margin: auto;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.12);
}

.timeline-item {
    position: relative;
    padding-left: 90px;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: 18px;
    top: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid #0f172a;
}


.timeline-item h3 {
    margin: 0.7rem 0 1rem;
    color: white;
    font-size: 1.4rem;
}

.timeline-item p {
    color: var(--muted);
}

/* QUOTE */

.quote-section {
    background: linear-gradient(135deg, rgba(212,160,23,0.1), rgba(255,255,255,0.02));
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

blockquote {
    font-size: clamp(1.5rem, 3vw, 2.7rem);
    line-height: 1.25;
    font-family: 'Merriweather', serif;
    color: white;
    max-width: 1000px;
    margin: auto;
    text-align: center;
}

/* IMAGE SPLIT */

.split-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: top;
}

.split-layout img {
    border-radius: 28px;
    height: 550px; /* Reduced height */
    width: 100%;
    object-fit: cover;
    object-position: center 25%; /* Focus on the face/upper body */
    box-shadow: var(--shadow);
}

.split-content p {
    margin-bottom: 1.5rem;
    color: #d1d5db;
}

/* VISION */

.vision-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.vision-overview p{
    margin-bottom: 1.5rem;
}

.vision-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 2rem;
    transition: var(--transition);
}

.vision-card:hover {
    transform: translateY(-6px);
}

.vision-card h3 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.2rem;
}

.vision-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* GOVERNANCE */
.governance-overview p{
    margin-bottom: 1.5rem;
}

/* FOOTER */

footer {
    padding: 5rem 0 3rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #0b1220;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-grid p {
    color: var(--muted);
}


/* ANIMATION */

.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   GALLERY & ARCHIVES
========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 14px;
  min-height: 320px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  transition: transform 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.gallery-card:active {
  transform: scale(0.98); /* Visual feedback on mobile tap */
}

.gallery-card:hover {
  transform: translateY(-6px);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 55%);
  pointer-events: none; /* Allows clicking through to the card */
}

.gallery-overlay span {
  color: #d4a017;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}


.gallery-overlay p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}


/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal.active {
  display: flex;
}

.modal-content-wrapper {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.modal-image {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  touch-action: pan-y; /* Allow vertical scrolling on mobile */
}

.modal-caption {
  margin-top: 1rem;
  text-align: center;
  color: white;
  max-width: 700px;
  padding: 0 1rem;
}

.modal-caption span {
  color: #d4a017;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.3rem;
}

.modal-caption p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  color: white;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
  line-height: 1;
  background: rgba(0,0,0,0.6);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.2);
}

.modal-close:hover {
  transform: scale(1.1);
}

/* Mobile-specific modal styles */
@media (max-width: 768px) {
  .modal {
    padding: 0.5rem;
  }
  
  .modal-content-wrapper {
    max-width: 100%;
    max-height: 100vh;
  }
  
  .modal-image {
    max-height: 65vh;
    border-radius: 4px;
  }
  
  .modal-close {
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    background: rgba(0,0,0,0.7);
  }
  
  .modal-caption {
    margin-top: 0.8rem;
    padding: 0 0.5rem;
  }
  
  .modal-caption span {
    font-size: 0.75rem;
  }
  
  .modal-caption p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .modal-image {
    max-height: 55vh;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    top: 2px;
    right: 2px;
  }
}

/* =========================================
   PUBLIC ENGAGEMENTS
========================================= */

.engagement-section {
  background:
    linear-gradient(
      135deg,
      rgba(212,160,23,0.08),
      rgba(255,255,255,0.02)
    );
}

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.engagement-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.engagement-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,160,23,0.25);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.engagement-content {
  padding: 1rem;
}

.engagement-content span {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* =========================================
   CORE PRINCIPLES
========================================= */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.principle-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/*
.principle-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  opacity: 0.7;
}
  */

.principle-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,160,23,0.28);
}

.principle-card h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.principle-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================
   RESPONSIVE - COMBINED (FINAL)
========================================= */

/* Large laptops and desktops - reduce image heights only */
@media (max-width: 1100px) {
    .portrait-card img,
    .split-layout img {
    height: 520px;
    }
}

/* Tablets and below - switch to 1 column layouts */
@media (max-width: 992px) {
    .hero-grid,
    .split-layout,
    .content-grid {
    grid-template-columns: 1fr;
    }
    
    .hero-grid {
    gap: 3rem;
    }
    
    .split-layout {
    gap: 2rem;
    }
    
    .split-layout img {
    height: 400px;
    }
    
    .vision-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    }
    
    .engagement-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    }
    
    .principles-grid {
    grid-template-columns: repeat(3, 1fr);
    }

    /* Gallery specific */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .gallery-card {
        min-height: 250px;
    }
    
    .gallery-overlay h3 {
        display: none; /* Hide h3 on tablets */
    }
    
}

/* Keep mobile 1 column */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .gallery-card {
        min-height: 200px;
    }
    
    .gallery-overlay h3 {
        display: none;
    }
    
    .gallery-overlay p {
        display: none;
    }
}
/* Small tablets and large phones */
@media (max-width: 850px) {
    .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(11,18,32,0.98);
    flex-direction: column;
    width: 260px;
    padding: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: none;
    }

    .nav-links.active {
    display: flex;
    }

    .menu-toggle {
    display: block;
    }

    .hero {
    padding-top: 140px;
    }

    section {
    padding: 3rem 0;
    }

    .timeline-item {
    padding-left: 70px;
    }
    
    .split-layout img {
    height: 350px;
    }
    
    .principles-grid {
    grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile phones */
@media (max-width: 600px) {
    .hero h1 {
    font-size: 2.5rem;
    }

    blockquote {
    font-size: 1.8rem;
    }

    .card,
    .vision-card {
    padding: 1.5rem;
    }

    .portrait-card img,
    .split-layout img {
    height: 300px;
    }
    
    .split-layout {
    gap: 1.5rem;
    }
    
    .hero-actions-row {
    grid-template-columns: 1fr;
    }
    
    .vision-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    }
    
    .engagement-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    }
    
    .principles-grid {
    grid-template-columns: 1fr;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .vision-grid {
    gap: 0.5rem;
    }
    
    .vision-card {
    padding: 1.25rem;
    }
    
    .vision-card h3 {
    font-size: 1rem;
    }
    
    .vision-card p {
    font-size: 0.85rem;
    }
    
    .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    }
    
    .gallery-card {
    min-height: 200px;
    }
    
    .gallery-overlay p {
    display: none;
    }
    
    .engagement-grid {
    gap: 0.5rem;
    }
    
    .engagement-content {
    padding: 0.75rem;
    }
    
    .engagement-content span {
    font-size: 0.75rem;
    }
    
    .principles-grid {
    grid-template-columns: 1fr;
    }
}

/* workaround to show ateny's face */
@media (max-width: 1100px) {
    .split-layout img {
        height: 400px;
        object-position: center 20%;
    }
}

@media (max-width: 600px) {
    .split-layout img {
        height: 300px;
        object-position: center 15%;
    }
}

/* Governance: 2 columns on tablet */
@media (max-width: 992px) and (min-width: 601px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}