/* =========================================
   1. VARIABLES Y RESET GENERAL
   ========================================= */
:root {
    --primary-color: #2E4631; /* Verde Bosque */
    --secondary-color: #5D7A60; /* Verde Salvia */
    --accent-color: #C5A880; /* Beige/Dorado */
    --bg-white: #ffffff;
    --bg-light: #F9F7F2; /* Crema muy suave */
    --bg-warm: #EFEBE2; /* Tono tierra cálido */
    --text-dark: #333333;
    --text-light: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. UTILIDADES DE FONDO Y TIPOGRAFÍA
   ========================================= */
.bg-white { background-color: var(--bg-white); }
.bg-light { background-color: var(--bg-light); }
.bg-warm { background-color: var(--bg-warm); }
.bg-dark { background-color: var(--primary-color); color: var(--text-light); }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.max-width-800 { max-width: 800px; margin: 0 auto; }

.section-title { 
    font-family: var(--font-heading); 
    font-size: 2.5rem; 
    color: var(--primary-color); 
    margin-bottom: 40px; 
    position: relative; 
    display: inline-block; 
}
.bg-dark .section-title { color: var(--text-light); }

/* =========================================
   3. BOTONES Y NAVEGACIÓN
   ========================================= */
.btn-primary {
    display: inline-block; padding: 12px 30px;
    background-color: var(--primary-color); color: white;
    border: 1px solid var(--primary-color); border-radius: 30px;
    font-weight: 700; transition: var(--transition);
    text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; cursor: pointer;
}
.btn-primary:hover { background-color: white; color: var(--primary-color); }

.btn-text { color: var(--primary-color); font-weight: 700; border-bottom: 2px solid transparent; transition: var(--transition); }
.btn-text:hover { border-bottom: 2px solid var(--primary-color); letter-spacing: 1px; }

/* Navbar */
.navbar { position: fixed; width: 100%; top: 0; z-index: 1000; background: rgba(255, 255, 255, 0.98); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 50px; width: auto; } /* Asegura proporción del logo */

.nav-menu { display: flex; gap: 20px; }
.nav-link { font-weight: 700; color: var(--primary-color); font-size: 0.95rem; }
.nav-link:hover, .nav-link.active { color: var(--secondary-color); }
.btn-nav { border: 1px solid var(--primary-color); padding: 8px 20px; border-radius: 20px; }
.btn-nav:hover { background: var(--primary-color); color: white; }

.menu-toggle { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--primary-color); }

/* =========================================
   4. HOME: HERO SLIDER (Solo Index)
   ========================================= */
.hero-slider { position: relative; height: 90vh; overflow: hidden; margin-top: 80px; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease-in-out;
    display: flex; align-items: center; justify-content: center;
}
.slide.active { opacity: 1; }
.slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); }

.hero-content { position: relative; z-index: 2; text-align: center; color: white; max-width: 800px; padding: 20px; animation: slideUp 1s ease forwards; }
.hero-content h1 { font-family: var(--font-heading); font-size: 4rem; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.5rem; margin-bottom: 30px; font-weight: 300; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }

.prev, .next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: white; font-size: 3rem; cursor: pointer; z-index: 10; padding: 20px; opacity: 0.7; }
.prev { left: 20px; } .next { right: 20px; }
.prev:hover, .next:hover { opacity: 1; background: rgba(0,0,0,0.2); border-radius: 5px; }

/* =========================================
   5. NOSOTROS: PAGE HEADER (Banner Estático)
   ========================================= */
.page-header {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px; /* Compensa el navbar fijo */
}
.header-overlay { background: rgba(46, 70, 49, 0.4); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.header-content { text-align: center; color: white; padding: 20px; }
.header-content h1 { font-family: var(--font-heading); font-size: 3.5rem; margin-bottom: 10px; }
.header-content p { font-size: 1.2rem; font-weight: 300; letter-spacing: 1px; text-transform: uppercase; }

/* =========================================
   6. COMPONENTES COMUNES (Cards, Grids)
   ========================================= */
/* Grid de Programas (Index) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); height: 100%; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(46, 74, 49, 0.15); }
.card-img { height: 200px; background-size: cover; background-position: center; }
.card-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.card-body h3 { font-family: var(--font-heading); color: var(--primary-color); margin-bottom: 5px; }
.card-body .subtitle { display: block; font-size: 0.85rem; color: var(--secondary-color); font-weight: 700; margin-bottom: 15px; text-transform: uppercase; }

/* Grid de Servicios (Iconos grandes) */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.service-item { text-align: center; padding: 20px; transition: var(--transition); }
.service-item:hover { transform: scale(1.05); }
.icon-lg { font-size: 3rem; color: var(--accent-color); margin-bottom: 20px; }
.service-item h4 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 15px; }

/* Grid de Ofertas (Nosotros - Iconos pequeños) */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.offer-card { background: white; padding: 30px; border-radius: 10px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: var(--transition); border: 1px solid #eee; }
.offer-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.icon-offer { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; }

/* =========================================
   7. SECCIONES ESPECÍFICAS
   ========================================= */

/* A. Estilos "Nosotros" (Split Layout) */
.split-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 50px; }
.split-text { flex: 1; min-width: 300px; }
.split-image { flex: 1; min-width: 300px; }
.split-image img { border-radius: 10px; box-shadow: 20px 20px 0px var(--accent-color); width: 100%; }

.highlight-box { background-color: var(--bg-light); border-left: 4px solid var(--primary-color); padding: 20px; margin: 20px 0; border-radius: 0 10px 10px 0; }
.question-list { margin-top: 15px; list-style: none; }
.question-list li { position: relative; padding-left: 25px; margin-bottom: 10px; font-style: italic; color: #555; }
.question-list li::before { content: '\f12e'; font-family: "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 0; color: var(--accent-color); }

.vision-quote { font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary-color); margin-bottom: 30px; line-height: 1.4; }
.emphasis-text { font-weight: 700; color: var(--secondary-color); margin-top: 20px; }

/* B. Estilos "Nosotros" (Pasos Admisión Horizontal) */
.steps-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 50px; }
.step-item { flex: 1; min-width: 200px; text-align: center; padding: 20px; position: relative; border-bottom: none; }
.step-number { width: 60px; height: 60px; background-color: var(--primary-color); color: white; font-family: var(--font-heading); font-size: 1.5rem; line-height: 60px; border-radius: 50%; margin: 0 auto 20px auto; box-shadow: 0 5px 15px rgba(46, 70, 49, 0.4); }
.intro-admision { max-width: 700px; margin: 0 auto 30px auto; }

/* C. Estilos "Index" (Timeline Vertical - Admisión) */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background-color: var(--primary-color); top: 0; bottom: 0; left: 50%; margin-left: -1px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; box-sizing: border-box; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-number { position: absolute; width: 40px; height: 40px; right: -20px; background-color: white; border: 4px solid var(--primary-color); top: 15px; border-radius: 50%; z-index: 10; text-align: center; line-height: 32px; font-weight: bold; color: var(--primary-color); }
.timeline-item:nth-child(even) .timeline-number { left: -20px; }
.timeline-content { padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.timeline-content h3 { color: var(--primary-color); margin-bottom: 10px; font-family: var(--font-heading); }

/* =========================================
   8. MEDIA (VIDEO Y GALERÍA)
   ========================================= */
.video-wrapper { max-width: 900px; margin: 0 auto 60px auto; box-shadow: 0 15px 30px rgba(0,0,0,0.2); border-radius: 10px; overflow: hidden; }
.video-container { position: relative; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */ height: 0; overflow: hidden; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 5px; cursor: pointer; height: 250px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(46, 70, 49, 0.6); display: flex; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); }
.gallery-item .overlay i { color: white; font-size: 2rem; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .overlay { opacity: 1; }

/* Lightbox Modal */
.lightbox { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center; }
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; }
.lightbox-content img { max-height: 85vh; max-width: 100%; border: 3px solid white; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.close-lightbox { position: absolute; top: 20px; right: 30px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 3001; }
.lightbox-controls span { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); width: auto; padding: 16px; color: white; font-weight: bold; font-size: 20px; transition: 0.6s ease; user-select: none; background-color: rgba(0,0,0,0.4); border-radius: 3px; }
.prev-lightbox { left: -60px; }
.next-lightbox { right: -60px; }
.lightbox-controls span:hover { background-color: rgba(0,0,0,0.8); }

/* =========================================
   9. CONTACTO Y FOOTER
   ========================================= */
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info, .contact-form-wrapper { flex: 1; min-width: 300px; }
.contact-info h2 { font-family: var(--font-heading); color: var(--primary-color); font-size: 2.5rem; margin-bottom: 20px; }
.info-list li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; }
.info-list i { color: var(--primary-color); margin-right: 15px; width: 20px; text-align: center; }

.form-elegant input, .form-elegant textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 5px; background: #fff; font-family: var(--font-body); }
.form-elegant input:focus, .form-elegant textarea:focus { border-color: var(--primary-color); outline: none; }
.form-elegant label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--primary-color); }
.full-width { width: 100%; }

/* Footer */
.main-footer { background: #1a2e20; color: #aaa; padding: 40px 0; }
.footer-logo { filter: brightness(0) invert(1); width: 120px; margin: 0 auto 20px auto; }
.social-links a { color: white; font-size: 1.5rem; margin: 0 10px; transition: var(--transition); }
.social-links a:hover { color: var(--accent-color); }
.footer-strip { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }
.madewithlove { color: var(--accent-color); margin-top: 5px; font-style: italic; font-family: var(--font-heading); }

/* =========================================
   10. WHATSAPP FLOTANTE
   ========================================= */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    background-color: #25D366; color: white;
    border-radius: 50%; text-align: center; font-size: 35px;
    box-shadow: 2px 2px 3px #999; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    animation: pulse 2s infinite;
}
.whatsapp-float:hover { background-color: #128C7E; transform: scale(1.1); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); transform: scale(1.1); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

/* =========================================
   11. ANIMACIONES Y ESTADOS VISIBLES
   ========================================= */
/* IMPORTANTE: Opacity 1 por defecto para evitar contenido invisible si falla JS */
.fade-in, .fade-in-left, .fade-in-right {
    opacity: 1; /* Visible por defecto */
    transform: translateY(0);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Solo si agregamos JS que soporte observer, podemos ocultar inicialmente si quisiéramos.
   Pero para evitar problemas, usaremos una clase .hidden-initial si se requiere.
   Por ahora, dejamos que el JS agregue la clase .visible para activar efectos si quisiéramos, 
   o usamos este truco: */

@media (prefers-reduced-motion: no-preference) {
    /* Si el usuario no ha desactivado animaciones en su sistema, y el JS funciona... */
    .fade-in:not(.visible) { opacity: 0; transform: translateY(30px); }
    .fade-in-left:not(.visible) { opacity: 0; transform: translateX(-30px); }
    .fade-in-right:not(.visible) { opacity: 0; transform: translateX(30px); }
}

.visible { opacity: 1 !important; transform: translate(0, 0) !important; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =========================================
   12. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu { position: fixed; left: -100%; top: 70px; gap: 0; flex-direction: column; background-color: white; width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 10px rgba(0,0,0,0.1); }
    .nav-menu.active { left: 0; }
    .nav-link { display: block; padding: 20px 0; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .page-header { height: 40vh; }
    .header-content h1 { font-size: 2.5rem; }
    
    .split-layout { gap: 30px; }
    .steps-container { flex-direction: column; }
    .step-item { border-bottom: 1px solid #eee; }
    .step-item:last-child { border-bottom: none; }
    
    /* Ajuste Timeline Vertical en Móvil (Index) */
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { text-align: left; }
    .timeline-number { left: 10px !important; }

    /* Ajuste Lightbox Flechas */
    .prev-lightbox { left: 10px; } .next-lightbox { right: 10px; }
}

/* =========================================
   ESTILOS PÁGINA PROGRAMAS (Layout Zig-Zag)
   ========================================= */

/* Fila del Programa */
.program-row {
    display: flex;
    align-items: stretch; /* Estira para que imagen y texto tengan misma altura visual si es posible */
    gap: 60px;
    margin: 40px 0;
    min-height: 500px; /* Altura mínima para que la imagen vertical luzca */
}

/* Alternancia (Zig-Zag): Los pares se invierten */
.program-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* Columna de Imagen */
.program-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

/* Estilo de la imagen Vertical */
.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio vertical sin deformarse */
    border-radius: 10px;
    box-shadow: 10px 10px 0px var(--accent-color); /* Sombra decorativa */
    min-height: 400px; /* Asegura altura en móviles */
}

/* Columna de Contenido */
.program-content {
    flex: 1.2; /* El texto ocupa un poco más de espacio */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

/* Número decorativo (01, 02...) */
.program-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: rgba(46, 70, 49, 0.1); /* Verde muy transparente */
    line-height: 1;
    margin-bottom: -20px;
    font-weight: 700;
}

.program-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Separador sutil entre programas */
.divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
    margin: 60px 0;
}

/* Listas personalizadas */
.feature-list-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.check-list, .dot-list {
    list-style: none;
    margin-top: 15px;
}
.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}
.check-list li::before {
    content: '\f00c'; /* Check icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.dot-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}
.dot-list li::before {
    content: '•';
    color: var(--accent-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Destacado Kinder (Van) */
.highlight-green {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    color: var(--primary-color);
    margin: 20px 0;
    border-left: 4px solid var(--secondary-color);
}
.highlight-green i { font-size: 1.5rem; }

/* Tarjetas pequeñas para Cursos */
.course-accordions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.course-item {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.course-item h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.small-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 20px;
    font-style: italic;
}

/* Responsive para Programas */
@media (max-width: 900px) {
    .program-row, .program-row:nth-child(even) {
        flex-direction: column; /* Apila imagen arriba, texto abajo */
        gap: 30px;
        min-height: auto;
    }
    
    .program-image {
        height: 400px; /* Altura fija para la imagen en móvil */
    }
    
    .program-number {
        font-size: 3rem;
    }
}
/* =========================================
   ESTILOS PÁGINA CONTACTO
   ========================================= */

/* Estilo para el Dropdown (Select) del formulario */
select {
    font-family: var(--font-body);
    background-color: white;
    cursor: pointer;
}

/* Sección de Mapa */
.map-section {
    width: 100%;
    margin-bottom: -5px; /* Elimina espacio blanco pequeño pre-footer */
    filter: grayscale(20%); /* Hace el mapa un poco menos colorido para que sea elegante */
    transition: filter 0.3s;
}

.map-section:hover {
    filter: grayscale(0%); /* Vuelve a color normal al pasar el mouse */
}

/* Ajustes adicionales para info de contacto */
.info-list li div {
    display: flex;
    flex-direction: column;
}
.info-list li strong {
    color: var(--primary-color);
}

/* =========================================
   ESTILOS RESERVA (GATEKEEPER & MODAL)
   ========================================= */

/* Caja del "Paso 1" (Gatekeeper) */
.gate-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 5px solid var(--primary-color);
}

.gate-icon { font-size: 3rem; color: var(--accent-color); margin-bottom: 20px; }
.btn-outline {
    background: transparent; border: 2px solid var(--primary-color);
    color: var(--primary-color); padding: 10px 20px; border-radius: 30px;
    font-weight: 700; cursor: pointer; transition: 0.3s; margin: 20px 0;
}
.btn-outline:hover { background: var(--primary-color); color: white; }

/* Checkbox estilizado */
.checkbox-wrapper { margin: 20px 0; display: flex; justify-content: center; align-items: center; gap: 10px; }
.checkbox-wrapper input { width: 20px; height: 20px; cursor: pointer; }
.small-hint { font-size: 0.8rem; color: #999; margin-bottom: 20px; }

/* Estado deshabilitado del botón */
.btn-primary.disabled {
    background-color: #ccc; border-color: #ccc; cursor: not-allowed;
}
.btn-primary.disabled:hover { background-color: #ccc; color: white; }

/* Ocultar elementos */
.hidden { display: none; }
.mb-30 { margin-bottom: 30px; }

/* ESTILOS DEL MODAL (Popup) */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; z-index: 5000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center; justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto; padding: 40px;
    border: 1px solid #888; width: 90%; max-width: 600px;
    border-radius: 10px; position: relative;
    max-height: 85vh; display: flex; flex-direction: column;
}

.contract-text {
    overflow-y: auto; text-align: left;
    background: #f9f9f9; padding: 20px; border: 1px solid #eee;
    margin-top: 15px; max-height: 400px; line-height: 1.6;
}

.close-modal {
    color: #aaa; float: right; font-size: 28px; font-weight: bold;
    position: absolute; top: 10px; right: 20px; cursor: pointer;
}
.close-modal:hover { color: #000; }

/* Responsive */
@media (max-width: 768px) {
    .gate-container { padding: 20px; }
    .modal-content { width: 95%; padding: 20px; margin-top: 20px;}
}