/* Variables de Diseño */
:root {
    --font-sans: 'Inter', sans-serif;
    --font-serif: Georgia, 'Times New Roman', Times, serif;

    --primary: #2B58C6; 
    --primary-light: #EEF2FE;
    --secondary: #FABB05; 
    --tertiary: #EE3E46; 
    
    --bg-main: #F4F7FC; 
    --bg-surface: #FFFFFF; 
    --text-dark: #334155; 
    --text-muted: #64748B; 
    
    --shadow-soft: 0 10px 30px rgba(43, 88, 198, 0.06);
    --shadow-hover: 0 20px 40px rgba(43, 88, 198, 0.12);
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-main); 
    overflow-x: hidden;
}

h1, h2, .font-serif {
    font-family: var(--font-serif);
    font-weight: 500;
}

.sans-heading {
    font-family: var(--font-sans);
    font-weight: 600;
}

.accent-italic {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--tertiary);
    font-weight: 400;
}

.container { width: min(90%, 1200px); margin: 0 auto; }
.section { padding: clamp(3.75rem, 6vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid rgba(148, 163, 184, 0.16); }
[id] { scroll-margin-top: 110px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.font-semibold { font-weight: 600; }

.section-title {
    font-size: 2.6rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    text-align: center;
}
.subtitle { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; font-family: var(--font-sans); }

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-hover);
}

.contact-form-card:hover { transform: none; box-shadow: var(--shadow-soft); }

.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 2000; padding: .75rem 1rem; border-radius: 8px; background: #fff; color: var(--primary); font-weight: 700; text-decoration: none; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }

.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
}
.btn-primary { background-color: var(--primary); color: #fff; box-shadow: 0 4px 15px rgba(43, 88, 198, 0.2); }
.btn-primary:hover { background-color: #2147A3; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(43, 88, 198, 0.3); }
.btn-secondary { background-color: var(--secondary); color: var(--text-dark); }
.btn-secondary:hover { background-color: #E5A800; transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background-color: var(--primary-light); transform: translateY(-2px); }

.btn-outline-light { border: 2px solid #FFFFFF; color: #FFFFFF; background: rgba(0,0,0,0.2); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background-color: #FFFFFF; color: #1E293B; transform: translateY(-2px); }

.btn-text { color: var(--primary); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; margin-top: 1rem; transition: var(--transition); }
.btn-text:hover { gap: 5px; color: #2147A3; }

/* HEADER / NAVEGACIÓN */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 0;
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-size: 1.9rem; 
    font-family: var(--font-serif); 
    font-weight: 500; 
    color: var(--text-dark); 
    transition: font-size 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    flex: 0 1 auto;
    min-width: 0;
}

.logo-name { line-height: 1.05; }
.logo-name strong { color: var(--primary); font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.5px; }

.logo-img {
    height: 65px; 
    width: auto;
    object-fit: contain;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav { display: flex; align-items: center; flex-shrink: 0; }
nav a { font-family: var(--font-sans); text-decoration: none; color: var(--text-muted); margin-left: clamp(0.8rem, 2vw, 1.8rem); font-weight: 500; transition: var(--transition); white-space: nowrap; }
nav a:hover { color: var(--primary); }
.btn-nav { background: var(--primary-light); color: var(--primary); padding: 0.6rem 1.2rem; border-radius: 50px; font-weight: 600; }
.btn-nav:hover { background: var(--primary); color: #fff; }
.mobile-menu-btn { display: none; background: var(--primary-light); border: 1px solid rgba(43, 88, 198, .16); border-radius: 10px; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--primary); }

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

header.scrolled .nav-container {
    padding: 0.7rem 0;
}

header.scrolled .logo {
    font-size: 1.4rem;
}

header.scrolled .logo-img {
    height: 40px;
}

/* Hero con imagen de fondo y contenido adaptado */
.hero-with-bg {
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-image: linear-gradient(to right, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.45) 60%, rgba(15, 23, 42, 0.1) 100%), url('media/Smiling%20schoolgirl%20with%20embroidered%20backpack.png');
    background-size: cover;
    background-position: center;
    padding-top: 150px;
    padding-bottom: 60px;
    color: #FFFFFF;
}

.hero-content-left {
    max-width: 650px;
    margin-left: 8%;
    text-align: left;
}

.hero-with-bg h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-with-bg h1 .accent-italic {
    color: #F87171;
}

.hero-with-bg .hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: #E2E8F0;
    margin-bottom: 2.5rem;
    margin-inline: 0;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-with-bg .hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-with-bg .hero-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.hero-with-bg .stat-item .counter {
    color: var(--primary);
}

.hero-with-bg .stat-item p {
    color: var(--text-muted);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Estilos mejorados para tarjetas más cortas y compactas en móvil/tablet */
.compact-card {
    padding: 1.5rem;
}

.card-header-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card-header-inline .icon-wrapper,
.card-header-inline .card-icon {
    margin-bottom: 0 !important;
}

.icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.icon-wrapper.blue { background: var(--primary-light); color: var(--primary); }
.icon-wrapper.yellow { background: #FFF9E6; color: var(--secondary); }
.icon-wrapper.red { background: #FDE8EA; color: var(--tertiary); }
.icon-wrapper.gray { background: #F1F5F9; color: var(--text-muted); }

.blue-text { color: var(--primary); }
.yellow-text { color: var(--secondary); }
.red-text { color: var(--tertiary); }

.single-card-layout {
    display: grid;
    grid-template-columns: 1.5fr auto 1fr;
    gap: 2.5rem;
    align-items: center; 
}
.single-card-layout .divider {
    width: 1px;
    height: 100%;
    min-height: 200px;
    background-color: #E2E8F0; 
}
.valores-lista-clean {
    list-style: none;
    margin-top: 1rem;
}
.valores-lista-clean li {
    font-size: 1rem; 
    margin-bottom: 0.8rem; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: var(--text-dark);
}

/* Reestructuración de la sección Qué Hacemos: 2 columnas en Tablet y orden optimizado */
.cards-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem; 
}
.card-icon { font-size: 2rem; }
.cards-grid ul { list-style: none; color: var(--text-muted); margin-top: 0.75rem; padding: 0; }
.cards-grid ul li { 
    margin-bottom: 0.5rem; 
    display: flex; 
    align-items: center;
    gap: 0.5rem; 
    font-family: var(--font-sans);
    font-size: 0.95rem;
}
.cards-grid ul li::before { display: none; }
.card-alert { border: 2px solid #FDE8EA; background: #FFFDFD; }

.instagram-section {
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.instagram-embed {
  width: 100%;
}

.instagram-embed a[href*="elfsight.com/instagram-feed-instashow/"] {
  display: none !important;
}

/* Cuadrícula balanceada en 2 líneas exactas para "Así Ayudamos" */
.check-grid-balanced {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    text-align: left;
}
.check-grid-balanced span {
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer / Contacto */
.contact-footer-section {
    background: #1E293B;
    color: #FFFFFF;
    padding: 5rem 0 2rem 0;
    margin-top: 4rem;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
}

.contact-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.section-label-dark {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 15px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.label-line-dark {
    width: 35px;
    height: 2px;
    background: var(--tertiary);
}

.contact-main-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    line-height: 1.15;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 1.2rem;
}

.accent-italic-light {
    font-style: italic;
    color: #F87171;
    font-weight: 400;
}

.contact-desc {
    color: #94A3B8;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-details-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.contact-details-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #E2E8F0;
    font-size: 0.95rem;
}

.contact-details-list a {
    color: #E2E8F0;
    text-decoration: none;
    transition: var(--transition);
}

.contact-details-list a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.c-icon {
    font-size: 1.1rem;
}

.footer-social-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1.3rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pill-svg {
    width: 18px;
    height: 18px;
}

.btn-ig {
    background-color: #262626;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ig svg {
    color: #EE3E46;
}

.btn-ig:hover {
    background-color: #383838;
    transform: translateY(-2px);
}

.btn-wa {
    background-color: #22C55E;
    color: #FFFFFF;
}

.btn-wa svg {
    color: #FFFFFF;
}

.btn-wa:hover {
    background-color: #16A34A;
    transform: translateY(-2px);
}

.contact-form-card {
    background: #FFFFFF !important;
    color: var(--text-dark);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.contact-form-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    background: #F8FAFC;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-submit-full {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.9rem;
    background-color: var(--tertiary);
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(238, 62, 70, 0.3);
}

.btn-submit-full:hover {
    background-color: #D32F37;
    box-shadow: 0 6px 20px rgba(238, 62, 70, 0.4);
}

.footer-bottom-bar {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #94A3B8;
    font-size: 0.85rem;
}

/* Optimizaciones responsivas específicas para Tablet (iPad) y Móvil (iPhone) */
@media (max-width: 1100px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 > :last-child { grid-column: 1 / -1; }
    .mobile-menu-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; }
    #nav-links {
        display: none; flex-direction: column; position: absolute;
        top: 100%; left: 0; width: 100%; background: rgba(255,255,255,0.99);
        padding: .75rem max(5%, calc((100% - 1200px) / 2)); box-shadow: 0 10px 20px rgba(0,0,0,.08);
    }
    #nav-links.active { display: flex; }
    nav a { width: 100%; margin: 0; padding: .9rem; text-align: center; }
}

@media (max-width: 900px) {
    .contact-footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .contact-main-title {
        font-size: 2.3rem;
    }
    .hero-content-left {
        margin-left: 5%;
        margin-right: 5%;
        max-width: 100%;
    }
    .hero-with-bg h1 {
        font-size: 2.3rem;
    }
    .check-grid-balanced {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-2, .cards-grid { grid-template-columns: 1fr; }
    .single-card-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .single-card-layout .divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
    }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 88px; }
    [id] { scroll-margin-top: 88px; }
    .container { width: min(92%, 1200px); }
    .section { padding: 3.25rem 0; }
    .nav-container { padding: .75rem 0; }
    .logo { gap: 10px; font-size: clamp(1.05rem, 5vw, 1.35rem); max-width: calc(100% - 56px); }
    .logo-img { height: 48px; }
    .logo-name { max-width: 8.5rem; line-height: 1.08; }
    .logo-name strong { display: block; }
    .hero-with-bg { min-height: auto; padding: 8.5rem 0 3.5rem; background-position: 62% center; }
    .hero-content-left { margin-inline: auto; }
    .hero-with-bg h1 { font-size: clamp(2rem, 10vw, 2.65rem); }
    .hero-with-bg .hero-buttons { display: grid; grid-template-columns: 1fr; margin-bottom: 2rem; }
    .hero-with-bg .hero-buttons .btn { width: 100%; }
    .hero-with-bg .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .section-title { font-size: clamp(2rem, 9vw, 2.45rem); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-3 > :last-child { grid-column: auto; }
    .card { padding: 1.5rem; }
    .contact-footer-section { padding-top: 4rem; margin-top: 0; border-radius: 28px 28px 0 0; }
    .contact-main-title { font-size: 2.15rem; }
    .contact-details-list a { overflow-wrap: anywhere; }
    .footer-social-buttons, .social-pill-btn { width: 100%; }
    .social-pill-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .js .fade-in { opacity: 1; transform: none; }
}

/* Páginas interiores */
.page-main { padding-top: 112px; }
.page-hero { padding: clamp(4rem, 8vw, 7rem) 0; background: linear-gradient(135deg, #eef2fe 0%, #fff 58%, #fff8e1 100%); }
.page-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 3rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin-bottom: 1rem; color: var(--primary); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 2rem; height: 2px; background: var(--tertiary); }
.page-title { max-width: 850px; font-size: clamp(2.7rem, 6vw, 4.8rem); line-height: 1.04; letter-spacing: -.035em; }
.page-intro { max-width: 720px; margin-top: 1.25rem; color: var(--text-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.page-hero-mark { display: grid; place-items: center; width: min(100%, 310px); aspect-ratio: 1; justify-self: end; border-radius: 50%; background: rgba(255,255,255,.72); box-shadow: var(--shadow-soft); }
.page-hero-mark img { width: 68%; height: 68%; object-fit: contain; }
.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.content-grid.two { grid-template-columns: repeat(2, 1fr); }
.content-card h2, .content-card h3 { margin-bottom: .75rem; }
.content-card p + p { margin-top: .8rem; }
.feature-list { list-style: none; display: grid; gap: .75rem; margin-top: 1rem; }
.feature-list li { position: relative; padding-left: 1.6rem; color: var(--text-muted); }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 800; }
.page-cta { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: clamp(1.75rem, 5vw, 3.5rem); background: var(--primary); color: #fff; border-radius: var(--radius-lg); }
.page-cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-cta p { color: #dbe5ff; margin-top: .5rem; }
.compact-footer { margin-top: 0; }
.compact-footer .footer-bottom-bar { margin-top: 0; border-top: 0; }
nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }

/* Galería */
.gallery-toolbar { position: sticky; top: 84px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; padding: .75rem; border: 1px solid #e2e8f0; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-soft); backdrop-filter: blur(12px); }
.gallery-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-btn { min-height: 44px; padding: .65rem 1rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: var(--text-dark); font: inherit; font-weight: 650; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.gallery-count { color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.gallery-grid { columns: 4 250px; column-gap: 1rem; }
.gallery-item { display: inline-block; width: 100%; margin: 0 0 1rem; overflow: hidden; border: 0; border-radius: 16px; background: #dce4f1; box-shadow: 0 7px 22px rgba(30,41,59,.09); break-inside: avoid; vertical-align: top; }
button.gallery-item { position: relative; padding: 0; text-align: left; cursor: zoom-in; }
.gallery-item img, .gallery-item video { display: block; width: 100%; height: auto; }
.gallery-item img { transition: transform .45s ease, filter .45s ease; }
.gallery-item:hover img { transform: scale(1.025); filter: saturate(1.05); }
.gallery-item[hidden] { display: none; }
.video-card { background: #111827; color: #fff; }
.video-card video { max-height: 620px; background: #111827; }
.media-label { display: block; padding: .8rem 1rem; color: #dbe5f1; font-size: .88rem; }
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; background: rgba(10,15,28,.94); color: #fff; }
.lightbox::backdrop { background: rgba(10,15,28,.94); }
.lightbox-inner { display: grid; place-items: center; width: 100%; height: 100%; padding: 4rem clamp(1rem, 5vw, 5rem); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,.45); }
.lightbox-close, .lightbox-nav { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(15,23,42,.78); color: #fff; font-size: 1.6rem; cursor: pointer; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); padding: .5rem .85rem; border-radius: 999px; background: rgba(15,23,42,.72); font-size: .9rem; }

@media (max-width: 900px) {
    .page-main { padding-top: 96px; }
    .page-hero-grid, .content-grid, .content-grid.two { grid-template-columns: 1fr; }
    .page-hero-mark { display: none; }
    .gallery-toolbar { top: 80px; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
    .page-main { padding-top: 72px; }
    .page-hero { padding: 3.5rem 0; }
    .page-title { max-width: 100%; font-size: clamp(2.25rem, 11vw, 3rem); overflow-wrap: break-word; }
    .page-cta { align-items: stretch; flex-direction: column; }
    .page-cta .btn { width: 100%; }
    .gallery-toolbar { position: static; max-width: 100%; overflow: hidden; }
    .gallery-filters { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .filter-btn { min-width: 0; padding-inline: .4rem; font-size: .9rem; }
    .gallery-grid { columns: 2 145px; column-gap: .75rem; }
    .gallery-item { margin-bottom: .75rem; border-radius: 12px; }
    .lightbox-nav { top: auto; bottom: 1rem; transform: none; }
    .lightbox-caption { bottom: 1.4rem; max-width: calc(100% - 9rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.fade-in { opacity: 1; transform: none; }
.js .fade-in { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.js .fade-in.visible { opacity: 1; transform: none; }
