/* Colegio Lourdes - Stable v2.1 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --color-primary: #154363; /* Azul Mariano */
    --color-accent: #C5A059;  /* Dorado Institucional */
    --color-text-main: #1D1D1F;
    --color-bg: #FFFFFF;
    --color-surface: #F8FAFC;
    --font-heading: 'Noto Serif', serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--color-bg);
    font-size: 16px;
}

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition-smooth);
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

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

.logo img {
    height: 120px;
    transition: var(--transition-smooth);
}

header.scrolled .logo img { 
    height: 75px; 
    filter: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s;
}

header.scrolled .nav-links a {
    color: var(--color-primary);
}

.nav-links a:hover { color: var(--color-accent); }

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 2000;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: white;
    transition: var(--transition-smooth);
}

header.scrolled .menu-toggle span {
    background: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-primary { background: var(--color-primary); color: white; border: 1px solid var(--color-primary); }
.btn-primary:hover { background: #0d2b40; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(21,67,99,0.15); }

.btn-outline { border: 1px solid var(--color-accent); color: var(--color-accent); background: transparent; }
.btn-outline:hover { background: var(--color-accent); color: white; transform: translateY(-3px); }

.btn-white-outline { border: 1px solid white; color: white; background: transparent; }
.btn-white-outline:hover { background: white; color: var(--color-primary); transform: translateY(-3px); }

header.scrolled #nav-cta {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

header.scrolled #nav-cta:hover {
    background: #0d2b40;
}

/* Sections */
.section-padding { padding: 10rem 0; }

.section-header {
    font-size: 3rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 1rem;
}

.accent-line {
    width: 80px;
    height: 2px;
    background: var(--color-accent);
    margin: 1.5rem auto 4rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/imagendelourdesfondo.png') no-repeat center center/cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(21, 67, 99, 0.6);
    z-index: -1;
}

.hero-content {
    max-width: 850px;
    color: white;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.card-elegant {
    padding: 2.5rem;
    background: var(--color-surface);
    border-radius: 12px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card-elegant .btn {
    margin-top: auto;
    align-self: center;
}

/* Cards & Level Section */
.card-image-wrapper {
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.card-elegant:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

/* Propuesta Section */
.propuesta-section {
    background-color: #F6F9FF;
    padding: 6rem 0;
}

.propuesta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    align-items: center;
}

.propuesta-content h2 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.propuesta-description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #555;
}

.propuesta-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.feature-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-box h4 {
    color: var(--color-primary);
    font-size: 1.1rem;
}

.feature-box p {
    font-size: 0.9rem;
    color: #666;
}

.img-propuesta {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Contact Section & Form */
.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Footer Improvements */
.main-footer {
    background: #101D27;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.footer-logo {
    height: 80px;
    margin-bottom: 2rem;
}

.footer-text {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Mobile Adjustments - Robust */
@media screen and (max-width: 1024px) {
    header { padding: 1.5rem 0 !important; }
    .logo img { height: 70px !important; }
    
    .hide-mobile { display: none !important; }
    
    .menu-toggle { display: flex !important; }
    
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: blur(10px);
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        z-index: 1500 !important;
        display: flex !important;
    }

    .nav-links.active {
        transform: translateX(-100%);
    }

    .nav-links li { margin: 1rem 0; }
    .nav-links a { 
        font-size: 1.5rem !important; 
        color: var(--color-primary) !important;
    }

    .hero-content { 
        display: flex; 
        flex-direction: column; 
        height: 90vh; /* Use most of the height */
        padding-top: 80px; 
    }

    .hero-title { 
        font-size: 2.2rem !important; 
        margin-top: auto; /* Pushes everything to the bottom */
    }
    
    .hero-subtitle { font-size: 1.1rem !important; margin-bottom: 1.5rem; }

    .hero-buttons { 
        flex-direction: row !important; 
        margin-top: 1rem; /* Fixed close distance to the text */
        margin-bottom: 4rem; /* Buffer from the bottom edge */
        gap: 0.8rem; 
        justify-content: center;
    }
    .btn { width: auto !important; padding: 0.8rem 1.2rem !important; font-size: 0.8rem !important; }

    .hero-bg {
        background-image: url('../images/imagen-lourdes-fondo-169.png'); /* Vertical v2 */
    }

    @media (orientation: landscape) {
        .hero-bg {
            background-image: url('../images/imagen-lourdes-fondo02-169.png'); /* Horizontal */
            background-position: center top !important;
        }

        header { padding: 0.2rem 0 !important; }
        .logo img { height: 75px !important; }
        
        .menu-toggle { display: none !important; }
        
        .nav-links {
            position: static !important;
            width: auto !important;
            height: auto !important;
            background: transparent !important;
            flex-direction: row !important;
            display: flex !important;
            transform: none !important;
            gap: 1.2rem !important;
        }

        .nav-links a {
            font-size: 0.75rem !important;
            color: white !important;
        }

        header.scrolled .nav-links a {
            color: var(--color-primary) !important;
        }

        .hero-title { font-size: 1.6rem !important; margin-bottom: 0.5rem !important; }
        .hero-subtitle { font-size: 0.85rem !important; margin-bottom: 1rem !important; }
        
        .hero-content {
            height: 90vh;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding-bottom: 1rem;
        }

        .hero-buttons { 
            margin-top: 1rem !important; 
            margin-bottom: 0.5rem;
            gap: 1.5rem !important;
        }
        .btn { padding: 0.5rem 1rem !important; font-size: 0.75rem !important; }
    }

    .section-padding { padding: 6rem 0; }
}

/* Animations */
.reveal {
    opacity: 0;
    transition: all 2.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    visibility: hidden;
}

.reveal-bottom { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
    visibility: visible;
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 850px;
    position: relative;
    animation: modalScale 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.close-modal:hover { color: var(--color-primary); }

.letter-container-modal {
    max-width: 750px;
    margin: 0 auto;
}

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.letter-logos img {
    height: 60px;
    margin-bottom: 1rem;
}

.letter-title {
    color: var(--color-primary);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
}

.letter-body {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.letter-body p { margin-bottom: 1.2rem; }

.letter-signature {
    margin-top: 2rem;
    text-align: center;
    font-weight: 600;
    color: var(--color-primary);
}

.letter-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px dotted #ccc;
    padding-top: 1.5rem;
    color: #666;
}

.letter-motto {
    margin-top: 0.8rem;
    font-style: italic;
    color: var(--color-accent);
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
        margin: 10% auto;
    }
    .letter-title { font-size: 1.1rem; }
}
