/* ==========================================================================
   COLVIPE - Colegio de Formación Integral Virgen de la Peña
   Diseño Editorial Moderno (Inspiración GCRB)
   Paleta: #102A6B (Azul Institucional), #FEC41B (Amarillo Sol), #CC723D (Terracota)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy: #102A6B;
    --navy-dark: #0A1B47;
    --navy-light: #1D439E;
    --gold: #FEC41B;
    --gold-hover: #E5AE0E;
    --terracotta: #CC723D;
    --terracotta-light: #FDF3ED;
    --cream: #FAF8F5;
    --white: #FFFFFF;
    --ink: #1A1F2C;
    --muted: #5A6478;
    --border: #E5E7EB;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --shadow-soft: 0 12px 32px -8px rgba(16, 42, 107, 0.08);
    --shadow-hover: 0 20px 40px -12px rgba(16, 42, 107, 0.16);
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, .serif-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--navy);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   TOP BAR & NAVIGATION (Floating Editorial Header)
   ========================================================================== */
.top-strip {
    background-color: var(--navy-dark);
    color: var(--white);
    font-size: 0.82rem;
    padding: 8px 0;
    letter-spacing: 0.02em;
}

.top-strip .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-strip a:hover {
    color: var(--gold);
}

.top-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 18px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(16, 42, 107, 0.08);
    padding: 14px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-shield {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid var(--gold);
    box-shadow: 0 4px 12px rgba(16, 42, 107, 0.2);
}

.brand-text strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    color: var(--navy);
    line-height: 1.1;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--terracotta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: var(--terracotta);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown De Interés */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 130%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
}

.dropdown-menu li a:hover {
    background-color: var(--terracotta-light);
    color: var(--terracotta);
}

.btn-cta {
    background-color: var(--gold);
    color: var(--navy);
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(254, 196, 27, 0.35);
}

.btn-cta:hover {
    background-color: var(--navy);
    color: var(--gold);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--navy);
    color: var(--navy);
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background-color: var(--navy);
    color: var(--white);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--navy);
    cursor: pointer;
}

/* ==========================================================================
   HERO EDITORIAL ASIMÉTRICO (Estilo GCRB)
   ========================================================================== */
.hero-editorial {
    padding: 60px 0 80px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--terracotta-light);
    color: var(--terracotta);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    margin-bottom: 22px;
    color: var(--navy);
}

.hero-title em {
    font-style: italic;
    color: var(--terracotta);
    position: relative;
}

.hero-lead {
    font-size: 1.12rem;
    color: var(--muted);
    margin-bottom: 32px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 28px;
    border-top: 1px solid rgba(16, 42, 107, 0.12);
}

.metric-item strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    color: var(--navy);
}

.metric-item span {
    font-size: 0.85rem;
    color: var(--muted);
}

.hero-visual {
    position: relative;
}

.hero-card-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-hover);
    aspect-ratio: 4 / 4.6;
    background: var(--navy);
}

.hero-card-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
}

.hero-floating-badge {
    position: absolute;
    bottom: 24px;
    left: -24px;
    background: var(--white);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    border-left: 5px solid var(--gold);
    max-width: 280px;
}

.hero-floating-badge strong {
    display: block;
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 4px;
}

.hero-floating-badge p {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
}

/* ==========================================================================
   SECCIONES GENERALES & BENTO GRIDS
   ========================================================================== */
.section {
    padding: 88px 0;
}

.section-navy {
    background-color: var(--navy);
    color: var(--white);
}

.section-navy h2, .section-navy h3 {
    color: var(--white);
}

.section-header {
    max-width: 720px;
    margin-bottom: 52px;
}

.section-header.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-header h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 16px;
}

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

.section-navy .section-header p {
    color: rgba(255, 255, 255, 0.78);
}

/* Bento Grid (Sello Diferenciador GCRB) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bento-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(16, 42, 107, 0.06);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }

.bento-gold {
    background: var(--gold);
    color: var(--navy);
}

.bento-navy {
    background: var(--navy);
    color: var(--white);
}

.bento-navy h3 {
    color: var(--gold);
}

.bento-terracotta {
    background: var(--terracotta);
    color: var(--white);
}

.bento-terracotta h3 {
    color: var(--white);
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(16, 42, 107, 0.08);
    color: var(--navy);
    margin-bottom: 16px;
    width: fit-content;
}

.bento-navy .card-tag {
    background: rgba(254, 196, 27, 0.18);
    color: var(--gold);
}

.bento-terracotta .card-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* ==========================================================================
   NIVELES EDUCATIVOS (Cards Interactivas)
   ========================================================================== */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.level-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border-bottom: 4px solid var(--navy);
}

.level-card:nth-child(2) { border-bottom-color: var(--gold); }
.level-card:nth-child(3) { border-bottom-color: var(--terracotta); }
.level-card:nth-child(4) { border-bottom-color: var(--navy); }

.level-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.level-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.level-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.level-card:hover .level-img img {
    transform: scale(1.06);
}

.level-age {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--navy);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
}

.level-body {
    padding: 24px;
}

.level-body h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.level-body p {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.level-schedule {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--terracotta);
    background: var(--terracotta-light);
    padding: 8px 12px;
    border-radius: 8px;
}

/* ==========================================================================
   PAGE HEADER INTERIORES
   ========================================================================== */
.page-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--white);
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}

.page-banner::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 196, 27, 0.18) 0%, transparent 70%);
}

.page-banner h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 14px;
}

.page-banner p {
    color: rgba(255, 255, 255, 0.82);
    max-width: 660px;
    font-size: 1.08rem;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 14px;
    font-weight: 600;
}

/* ==========================================================================
   TABLAS MODERNAS (Tarifas y Horarios)
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: var(--navy);
    color: var(--white);
    padding: 16px;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.94rem;
}

tr:hover td {
    background-color: rgba(254, 196, 27, 0.08);
}

/* ==========================================================================
   GALERÍA CON FILTROS
   ========================================================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 50px;
    border: 1.5px solid var(--navy);
    background: transparent;
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--navy);
    color: var(--gold);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 42, 107, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ==========================================================================
   TIMELINE HISTORIA & DESCARGAS
   ========================================================================== */
.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 3px solid var(--gold);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.timeline-item {
    position: relative;
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 32px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--terracotta);
    border: 4px solid var(--cream);
}

.timeline-year {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: var(--terracotta);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border-left: 5px solid var(--terracotta);
}

/* ==========================================================================
   CONTACTO & FORMULARIOS
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--navy);
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(16, 42, 107, 0.08);
}

/* ==========================================================================
   FOOTER EDITORIAL
   ========================================================================== */
.footer {
    background-color: var(--navy-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 72px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer h4 {
    color: var(--gold);
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    margin-bottom: 18px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .col-span-8, .col-span-6, .col-span-4, .col-span-3 {
        grid-column: span 12;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-floating-badge {
        left: 16px;
        bottom: 16px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-hover);
        display: none;
    }
    .nav-menu.active {
        display: flex;
    }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
