:root {
    --primario: #0b3d91;
    --primario-hover: #082c6c;
    --oscuro: #1f1f1f;
    --gris-suave: #f7f7f7;
    --gris-borde: #e0e0e0;
    --blanco: #ffffff;
}

/* RESET */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Open Sans', sans-serif; /* antes: "Segoe UI", Arial, sans-serif */
    background: var(--gris-suave);
    color: var(--oscuro);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif; /* títulos con presencia */
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* NAVBAR */
.header { 
    background: #0a2a5b;   /* azul marino profundo */
    border-bottom: 1px solid #082c6c; /* borde más oscuro que el azul */
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.navbar { max-width:1100px; margin:auto; padding:1rem; display:flex; justify-content:space-between; align-items:center; }
.navbar img { height:55px; }
.navbar ul { list-style:none; display:flex; gap:1.5rem; }
.navbar a {
    color: #f7f7f7; /* blanco para contraste */
    text-decoration: none;
}
.navbar a:hover {
    color: #ffd700; /* dorado al pasar el ratón */
}
.navbar h1 {
    color: #f7f7f7;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

/* HERO */
.hero { position:relative; text-align:center; padding:3rem 1.5rem; overflow:hidden; background:var(--blanco); }
.hero-slider { position:absolute; top:0; left:0; width:100%; height:100%; overflow:hidden; z-index:0; }
.hero-slider .slide { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transform:scale(1); animation:cinematicSlider 12s infinite; }
.hero-slider .slide:nth-child(2) { animation-delay:6s; }
@keyframes cinematicSlider {0%{opacity:0;transform:scale(1.1);}10%{opacity:1;transform:scale(1);}45%{opacity:1;transform:scale(1.05);}50%{opacity:0;transform:scale(1.1);}100%{opacity:0;transform:scale(1.1);}}
.hero h1, .hero p, .hero .btn { position:relative; z-index:1; }

/* SECCIONES */
.section { background:var(--blanco); margin:1.5rem auto; padding:2.5rem 1.5rem; max-width:1100px; border-radius:10px; }
.section h2 { text-align:center; color:#0a2a5b; margin-bottom:1.2rem; }

/* BOTONES */
.btn { display:inline-block; padding:.9rem 1.6rem; border-radius:6px; text-decoration:none; font-weight:600; transition:.25s ease; border:none; cursor:pointer; }
.btn-primary { background:var(--primario); color:var(--blanco); }
.btn-primary:hover { background:var(--primario-hover); transform:translateY(-1px);}
.btn-secondary {
    background: #0a2a5b;   /* azul marino profundo */
    color: #f7f7f7;        /* blanco para contraste */
    border: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background:#ffd700;   /* azul más oscuro al pasar el ratón */
    transform: translateY(-1px);
    cursor: pointer;
    color: #082a5b;

}

/* GALERÍA NOSOTROS */
.about-editorial { display:grid; grid-template-columns:2fr 1fr; gap:1rem; margin:2rem 0; }
.about-main img { width:100%; height:460px; object-fit:cover; border-radius:10px; transition: transform .35s ease, box-shadow .35s ease; }
.about-side { display:grid; grid-template-rows:repeat(3,1fr); gap:1rem; }
.about-side img { width:100%; height:146px; object-fit:cover; border-radius:10px; transition: transform .35s ease, box-shadow .35s ease; }
.about-main img:hover, .about-side img:hover { transform:scale(1.02); box-shadow:0 8px 22px rgba(0,0,0,.12); }

/* ÁREAS */
.areas-layout { display:flex; align-items:center; gap:60px; max-width:1200px; margin:80px auto; padding:2.5rem 1.5rem; background:var(--blanco); border-radius:10px; }
.areas-image { flex:1; }
.areas-image img { width:100%; height:420px; object-fit:cover; border-radius:8px; }
.areas-list { flex:1; }
.areas-list h2 { font-size:28px; margin-bottom:30px; font-weight:400; }
.areas-list a { display:block; font-size:18px; margin-bottom:14px; text-decoration:none; color:#222; transition:all 0.3s ease; position:relative; padding-bottom:6px; opacity:0; transform:translateX(-20px); animation:fadeInSlide 0.6s forwards; }
.areas-list a:not(:last-child)::after { content:""; display:block; width:40px; height:2px; background:var(--primario); margin-top:6px; border-radius:1px; transition:width .3s ease; }
.areas-list a:hover { color:var(--primario); transform:translateX(8px); }
.areas-list a:hover::after { width:100%; }
.areas-list a:nth-child(1){animation-delay:0.1s;} .areas-list a:nth-child(2){animation-delay:0.25s;} .areas-list a:nth-child(3){animation-delay:0.4s;} .areas-list a:nth-child(4){animation-delay:0.55s;} .areas-list a:nth-child(5){animation-delay:0.7s;} .areas-list a:nth-child(6){animation-delay:0.85s;} .areas-list a:nth-child(7){animation-delay:1s;}
@keyframes fadeInSlide { to{opacity:1; transform:translateX(0);} }

/* MODALES ÁREAS */
.modal {
    display: none !important;  /* 🔒 oculto de inicio */
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--blanco);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-30px);
    animation: slideIn 0.4s forwards;
}

.modal-content h3 { color: var(--primario); margin-bottom: 1rem; }
.modal-content p { font-size: 16px; line-height: 1.5; color: #333; }

.modal .close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primario);
    cursor: pointer;
    transition: transform 0.2s;
}
.modal .close:hover { transform: rotate(90deg); }

/* MODALES FOOTER */
.modal-footer {
    display: none !important;  /* 🔒 oculto de inicio */
    position: fixed;
    z-index: 300;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-footer .modal-content {
    background: var(--blanco);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-30px);
    animation: slideIn 0.4s forwards;
}

/* MODAL VISIBLE */
.modal.show,
.modal-footer.show {
    display: block !important;  /* 🔓 solo cuando se abre */
}

/* ANIMACIONES */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-30px); } to { transform: translateY(0); } }

/* FORMULARIO */
.contact-form { max-width:500px; margin:auto; display:flex; flex-direction:column; gap:.9rem; }
.contact-form input, .contact-form textarea { padding:.8rem; border-radius:5px; border:1px solid var(--gris-borde); font-size:1rem; }
.contact-form textarea { min-height:90px; resize:vertical; }

/* MAPA */
.map-container {
    max-width: 1100px;
    margin: 2.5rem auto; /* margen arriba y abajo */
    padding: 0 1.5rem;   /* margen lateral */
}

.map-container iframe {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 8px;
}

/* FOOTER 3 COLUMNAS */
.footer {
    background: #0a2a5b;
    color: var(--gris-suave);
    font-family: 'Open Sans', sans-serif;
    padding: 4rem 1.5rem 2rem 1.5rem; /* más aire arriba */
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.footer-column h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #cfcfcf;
}

.footer-column p,
.footer-column li {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-column:first-child a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column:first-child a:hover {
    color: #ffd700;
}

.footer-column a {
    color: var(--gris-suave);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #ffd700;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    width: 120px;
    height: auto;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid #082c6c;
    padding-top: 1rem;
}

/* RESPONSIVE */
@media(max-width:900px){
    .footer-container {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    .footer-column h3 { font-size: 1.1rem; }
    .footer-column p, .footer-column li { font-size: 0.9rem; }
    .footer-logo img { width: 100px; }
}



/* RESPONSIVE */
@media(max-width:900px){ .areas-layout{flex-direction:column; gap:30px;} .areas-image img{height:260px;} .areas-list{text-align:center;} .areas-list a:hover{transform:none;} .areas-list a:not(:last-child)::after{margin:0 auto 6px auto;} }
@media(max-width:768px){ .about-editorial{grid-template-columns:1fr;} .about-main img{height:260px;} .about-side{grid-template-columns:repeat(3,1fr); grid-template-rows:none;} .about-side img{height:90px;} .navbar{flex-direction:column; gap:.8rem;} .navbar ul{flex-direction:column; gap:.6rem;} .hero-slider{height:260px;} .hero h1{font-size:1.8rem;} .hero p{font-size:1rem;} }
/* SECCIÓN CONTACTO */
.contacto {
    padding: 55px 20px;
    text-align: center;
    background: #f7f7f7;
}

.contacto h2 {
    margin-bottom: 35px;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* GRID */
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 850px;
    margin: auto;
}

/* ITEM CONTACTO */
.contacto-item {
    opacity: 0;
    transform: translateY(8px) scale(1);

    background: white;
    padding: 16px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);

    animation: fadeInUp 0.5s ease forwards;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.contacto-item:hover {
    transform: translateY(-2px) scale(1.07);  /* ligero zoom y subir */
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    background: #002147;       /* azul oscuro */
    color: white;              /* texto principal */
   
}

/* ICONOS */
.contacto-item i {
    font-size: 18px;
    margin-bottom: 6px;
    color: #444;
    display: block;
}


/* TEXTO Y EMAIL LARGO */
.contacto-item a,
.contacto-item span {
    font-size: 14px;
    color: #2c2c2c;
    text-decoration: none;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.contacto-item:hover i,
.contacto-item:hover a,
.contacto-item:hover span {
    color: white;
}
/* ITEM ANCHO */
.contacto-wide {
    grid-column: 1 / -1;
}

/* ANIMACIÓN AL HACER SCROLL */
.contacto-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #2c2c2c;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    background: green !important;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons button {
    background: white;
    color: #2c2c2c;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.cookie-buttons a {
    color: white;
    text-decoration: underline;
    font-size: 14px;
}
/* Footer: quitar subrayado en contacto (columna 1) */
.footer-column:first-child a {
    text-decoration: none;
}

.footer-column:first-child a:hover {
    color: #ffd700; /* mantiene el efecto dorado al pasar el ratón */
}
/* MODAL VISIBLE (para animación de apertura coherente) */
.modal.show {
    display: block; /* mantiene la visibilidad */
}
/* MODALES FOOTER */
.modal-footer {
    display: none; /* oculto por defecto */
    position: fixed;
    z-index: 300;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow:auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal-footer .modal-content {
    background: var(--blanco);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-30px);
    animation: slideIn 0.4s forwards;
}

.modal-footer.show {
    display: block;
}
/* BOTÓN HAMBURGUESA */
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
    color: white;
}

/* MÓVIL */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0a2a5b;

        flex-direction: column;
        gap: 0;

        max-height: 0;
        overflow: hidden;

        transition: max-height 0.35s ease;
    }

    .nav-menu li {
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu a {
        display: block;
        padding: 14px;
    }

    /* MENU ABIERTO */
    .nav-menu.open {
        max-height: 300px;
    }
}
