/* Ampliaciones: menús desplegables, contenido migrado y galerías */

.nav-group { position: relative; display: flex; align-items: center; }
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 130;
    min-width: 280px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 9px;
    gap: 2px;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown { display: grid; }
.nav-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #34495E;
    white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--cyan-soft); color: var(--blue-dark); }
[data-menu="proyectos"] .nav-dropdown {
    grid-template-columns: repeat(2, minmax(195px, 1fr));
    min-width: 470px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}
.gallery-grid img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.page-back { margin-top: 36px; }

a.feature-card { display: block; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
a.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }

.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; }

/* Video fijo 16:9 */
.video-section { background: var(--surface, #F4F8FB); }
.article-video { margin: 24px 0 8px; max-width: 820px; }
.video-section-inner { max-width: 940px; margin: 0 auto; }
.video-section h2 { margin: 6px 0 20px; font-size: 30px; }
.video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #08192B;
    box-shadow: 0 20px 45px rgba(8, 25, 43, .18);
}
.video-embed iframe,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}
@media (max-width: 640px) {
    .video-section h2 { font-size: 24px; }
    .video-embed { border-radius: 12px; }
}

/* Banner de noticias actuales */
.news-banner {
    background: var(--navy);
    color: #fff;
    padding: 52px 0 44px;
    position: relative;
    overflow: hidden;
}
.news-banner:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(700px 300px at 85% 0%, rgba(18,173,229,.18), transparent 70%);
    pointer-events: none;
}
.news-banner .container { position: relative; }
.news-banner-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.news-banner-head h2 { color: #fff; font-size: 30px; margin: 5px 0 0; }
.news-banner-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #8FE3FF;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.news-banner-all:hover { color: #fff; }
.news-banner-viewport {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 6;
    min-height: 280px;
    background: #0B2238;
    box-shadow: 0 24px 50px rgba(0,0,0,.28);
}
.news-banner-track {
    display: flex;
    height: 100%;
    transition: transform .55s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}
.news-banner-slide {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    position: relative;
}
.news-banner-slide a { display: block; height: 100%; position: relative; color: #fff; }
.news-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}
.news-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8,25,43,.88) 0%, rgba(8,25,43,.45) 55%, rgba(8,25,43,.10) 100%),
                linear-gradient(0deg, rgba(8,25,43,.75), transparent 55%);
}
.news-banner-copy {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 28px;
    max-width: 720px;
}
.news-banner-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8FE3FF;
    font-weight: 800;
    margin-bottom: 9px;
}
.news-banner-copy h3 {
    font-size: clamp(22px, 2.3vw, 34px);
    line-height: 1.16;
    margin: 0 0 12px;
    color: #fff;
    max-width: 780px;
}
.news-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(18,173,229,.95);
    color: #06202F;
    padding: 8px 12px;
    border-radius: 9px;
}
.news-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(8,25,43,.55);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    backdrop-filter: blur(6px);
}
.news-banner-nav:hover { background: var(--cyan); color: var(--navy); }
.news-banner-nav .icon { width: 18px; height: 18px; }
.news-banner-nav.prev { left: 14px; }
.news-banner-nav.prev .icon { transform: rotate(180deg); }
.news-banner-nav.next { right: 14px; }
.news-banner-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.news-banner-dots button {
    width: 22px;
    height: 4px;
    border-radius: 99px;
    border: 0;
    background: rgba(255,255,255,.28);
    cursor: pointer;
    padding: 0;
}
.news-banner-dots button.is-active { background: var(--cyan); width: 34px; }
.news-banner-slide:focus-within { outline: 2px solid var(--cyan); outline-offset: -2px; }

@media (max-width: 760px) {
    .news-banner { padding: 38px 0 34px; }
    .news-banner-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .news-banner-head h2 { font-size: 24px; }
    .news-banner-viewport { aspect-ratio: 4 / 3; min-height: 260px; border-radius: 14px; }
    .news-banner-copy { left: 18px; right: 18px; bottom: 18px; }
    .news-banner-copy h3 { font-size: 20px; }
    .news-banner-nav { width: 34px; height: 34px; }
    .news-banner-nav.prev { left: 8px; }
    .news-banner-nav.next { right: 8px; }
}

/* Comentarios públicos */
.comments-section {
    padding: 64px 0 80px;
    background: #F4F8FB;
    border-top: 1px solid var(--line);
}
.comments-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}
.comments-head h2 { margin: 4px 0 0; font-size: 30px; color: var(--navy); }
.comments-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.comments-list { max-width: 900px; }
.comment {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #DCE9F1;
}
.comment:first-child { padding-top: 0; }
.comment-avatar {
    flex: 0 0 40px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 14px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.comment-meta strong { font-size: 13.5px; color: var(--ink); }
.comment-meta span { font-size: 11px; color: var(--muted); }
.comment-text { font-size: 14px; line-height: 1.65; color: #33495D; }
.comment-reply { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700; color: var(--blue); }
.comment-reply-item {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #DCE9F1;
    border-radius: 12px;
    background: #fff;
}
.comment-form-wrap {
    max-width: 780px;
    margin-top: 30px;
    background: #fff;
    border: 1px solid #DCE9F1;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 26px rgba(8,25,43,.05);
}
.comment-form-wrap h3 { margin: 0 0 4px; font-size: 19px; color: var(--navy); }
.comment-note { font-size: 12px; margin: 0 0 16px; }
.comments-section .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comments-section .form-group { display: flex; flex-direction: column; gap: 6px; }
.comments-section .form-group.span-2 { grid-column: span 2; }
.comments-section .form-group label { font-size: 11px; font-weight: 700; color: var(--ink); }
.comments-section .form-group input,
.comments-section .form-group textarea {
    font: inherit; font-size: 13px; color: var(--ink);
    border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fff;
}
.comments-section .form-group textarea { resize: vertical; }
.comments-section .checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--muted); margin: 12px 0; }
.comments-section .form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.comments-section .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comments-section .form-alert { padding: 10px 13px; border-radius: 9px; font-size: 12.5px; margin-bottom: 14px; }
.comments-section .form-alert.success { background: #E8F6EE; color: #146C45; }
.comments-section .form-alert.error { background: #FCEDEC; color: #9E2B20; }
.comments-section .cf-turnstile { margin: 8px 0 4px; }

@media (max-width: 720px) {
    .comments-head { align-items: flex-start; flex-direction: column; gap: 6px; }
    .comments-section .form-grid { grid-template-columns: 1fr; }
    .comments-section .form-group.span-2 { grid-column: span 1; }
}

@media (max-width: 1180px) {
    .footer-grid { grid-template-columns: 1.8fr 1fr 1fr; }
    .footer-contact { grid-column: span 3; }
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-contact { grid-column: span 2; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid img { height: 220px; }
    .main-nav.is-open .nav-group { display: block; width: 100%; }
    .main-nav.is-open .nav-dropdown {
        display: grid;
        position: static;
        box-shadow: none;
        border: 0;
        padding: 2px 0 8px 18px;
        min-width: 0;
        grid-template-columns: 1fr;
    }
    .main-nav.is-open .nav-dropdown a { padding: 8px 10px; font-size: 13px; color: var(--muted); }
}
