/* =====================================================
   OBSERVATORIO DE SUBVENCIONES — style.css
   Dimensiones de referencia: 1920px × 2975px (Illustrator)
   Paleta:
     Teal oscuro  #004B5C  (fondo header / hero)
     Teal cielo   #00B4C8  (PANTONE 637 C)
     Teal medio   #007FA3  (PANTONE 7708 C)
     Verde oliva  #8B9900  (PANTONE 7745 C — stat numbers, step numbers)
     Blanco puro  #FFFFFF
     Gris claro   #F5F7F8  (fondo stats / footer)
   ===================================================== */

/* ── FUENTES LOCALES ── */
@font-face {
    font-family: 'CorporativeSans';
    src: url('../fonts/CorporativeSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

/* ExtraBold Italic: usamos la misma fuente con síntesis oblique del navegador */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: italic;
    font-synthesis: style;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

/* ── RESET ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #1a1a1a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    padding-top: 100px !important;
}

/* ── CONTAINER ── */
.container {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 0 40px;
}

/* =====================================================
   TOPBAR / HEADER
   ===================================================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #005470;
    /* Azul institucional oficial */
    height: 100px;
    border-bottom: 2px solid #abad25;
    /* Oliva institucional */
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* ── Logos ── */
.topbar-logos {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-unificador {
    display: flex;
    align-items: center;
}

.logo-unificador img {
    display: block;
    height: 80px;
    width: auto;
}

/* ── Nav menu ── */
.menu {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    /* Aseguramos que sea una lista */
}

.menu>li {
    position: relative;
    display: block;
}

.menu a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.2px;
    display: block;
    padding: 10px 0;
}

.menu a:hover,
.menu .dropdown:hover>a,
.menu a.active {
    color: #ffffff;
}

/* Puente invisible para mantener el hover en dropdowns */
.menu li.dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    display: block;
}

/* ── Hamburger Toggle (Hidden on Desktop) ── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    margin-right: -10px;
    /* Alineación a la derecha */
}

/* ── Dropdown Styles ── */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #004B5C;
    min-width: 180px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 100;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
    /* Eliminado el margen que causaba inestabilidad */
}

.dropdown-content a {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 12px 20px !important;
    font-size: 13px !important;
    transition: background 0.2s, color 0.2s !important;
    display: block !important;
}

.dropdown-content a:hover {
    background-color: rgba(76, 194, 225, 0.15);
    /* Celeste institucional suave */
    color: #4cc2e1 !important;
    /* Celeste institucional */
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInMenu 0.3s ease forwards;
}

@media (max-width: 768px) {
    .menu li.dropdown.open .dropdown-content {
        display: block !important;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* =====================================================
   HERO
   ===================================================== */
.hero {
    position: relative;
    height: 692px;
    overflow: hidden;
    background: #004B5C;
}

/* Video de fondo del hero */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 1;
}

/* Fallback: mantener clase hero-bg por compatibilidad,
   pero el video la reemplaza visualmente */
.hero-bg {
    display: none;
}

/* dark gradient on left so text is readable */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(0, 53, 70, 0.92) 0%,
            rgba(0, 53, 70, 0.80) 38%,
            rgba(0, 53, 70, 0.30) 65%,
            transparent 100%);
    z-index: 2;
}

.hero-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 560px 1fr;
    align-items: center;
    height: 100%;
    gap: 0;
    padding-top: 100px;
}

/* ── Hero text (contenedor) ── */
.hero-text {
    color: #ffffff;
    padding-top: 20px;
}

/* ── Título del hero ── */
.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.3;
    color: #ffffff;
    text-align: left;
    margin-bottom: 18px;
    max-width: 420px;
}

/* ── Descripción del hero ── */
.hero-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.75;
    color: #78d1e8;
    text-align: left;
    margin-bottom: 32px;
    max-width: 400px;
}

/* ── Tutorial button ── */
.btn-tutorial {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #8B9900;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1.1px;
    text-decoration: none;
    padding: 11px 24px 11px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.btn-tutorial:hover {
    background: #9dac00;
    border-color: rgba(255, 255, 255, 0.85);
    transform: scale(1.06);
}

.btn-tutorial svg {
    flex-shrink: 0;
}

/* .hero-right uses no own styles; the background image in .hero handles the right visual */

/* =====================================================
   STATS SECTION
   ===================================================== */
.stats-section {
    background: #ffffff;
    padding: 56px 0 52px;
    border-bottom: 1px solid #e8edf0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat-item {
    padding: 20px 20px;
    border-right: 1px solid #dde3e7;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 4px;
    cursor: default;
}

.stat-item:first-child {
    border-left: 1px solid #dde3e7;
}

.stat-item:last-child {
    border-right: 1px solid #dde3e7;
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 84, 112, 0.10);
    position: relative;
    z-index: 1;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 48px;
    line-height: 1;
    color: #abad25;
    letter-spacing: -1px;
}

.stat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #333333;
    margin-top: 6px;
    margin-bottom: 20px;
}

.stat-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 1;
    color: #4cc2e1;
    letter-spacing: -0.5px;
}

.stat-sublabel {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #444444;
    margin-top: 5px;
}

/* =====================================================
   HOW TO USE SECTION
   ===================================================== */
.how-section {
    background: #ffffff;
    padding: 64px 0 68px;
}

.how-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: #004B5C;
    text-align: center;
    margin-bottom: 36px;
    letter-spacing: -0.2px;
}

.how-steps {
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #D6EEF5;
    border-radius: 50px;
    max-width: 780px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.step-pill {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 24px;
    position: relative;
    min-height: 84px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border-radius: 6px;
    cursor: default;
}

.step-pill:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 84, 112, 0.10);
    z-index: 1;
}

/* divider lines between steps */
.step-pill+.step-pill::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(0, 75, 92, 0.20);
}

.step-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: #00B4C8;
    line-height: 1;
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 2px;
}

.step-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step-main {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #004B5C;
    line-height: 1.3;
}

.step-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #334d55;
    margin-top: 2px;
}

/* =====================================================
   VIDEO TUTORIAL SECTION
   ===================================================== */
.video-section {
    background: #ffffff;
    padding-bottom: 72px;
}

.video-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: #004B5C;
    text-align: center;
    margin-bottom: 28px;
}

.video-wrapper {
    position: relative;
    max-width: 740px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.2s;
}

.video-wrapper:hover::after {
    background: rgba(0, 0, 0, 0.28);
}

.video-wrapper.playing::after {
    display: none;
}

.video-thumb,
.video-player {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.yt-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.yt-bg {
    fill: #FF0000;
}

.yt-arrow {
    fill: #ffffff;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: #ffffff;
    /*border-top: 1px solid #dde3e7;*/
    padding: 40px 0 36px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Social icons row */
.social-icons-new {
    color: #005470;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.social-icons-new:hover {
    color: #00B4C8;
    transform: translateY(-2px);
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 28px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #004B5C;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.social-icon:hover {
    background: #00B4C8;
    transform: translateY(-2px);
}

.social-icon--yt {
    background: #004B5C;
}

/* Footer text */
.footer-info {
    text-align: center;
}

.footer-info p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #444;
    line-height: 1.7;
}

.footer-info p strong {
    font-weight: 700;
    color: #004B5C;
}

/* =====================================================
   PAGE LOADER — RIPPLE CIRCULAR
   ===================================================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: #005470;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.loader-circle {
    width: 24px;
    height: 24px;
    background: #4cc2e1;
    border-radius: 50%;
    transform: scale(0);
    will-change: transform;
}



/* =====================================================
   SCROLL REVEAL — Estado inicial
   Las secciones con [data-reveal] comienzan invisibles;
   GSAP les aplica la animación al entrar al viewport.
   ===================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(50px);
    will-change: opacity, transform;
}


/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {

    .container {
        padding: 0 28px;
    }

    /* Hero */
    .hero {
        height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 100px;
        padding-bottom: 60px;
        align-items: flex-start;
    }

    .hero-right {
        display: none;
    }

    .hero-title {
        font-size: 26px;
        max-width: 100%;
    }

    .hero-desc {
        max-width: 100%;
    }

    /* Hero overlay más opaco para cubrir toda la imagen */
    .hero-overlay {
        background: linear-gradient(to right,
                rgba(0, 53, 70, 0.95) 0%,
                rgba(0, 53, 70, 0.85) 50%,
                rgba(0, 53, 70, 0.60) 100%);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(3) {
        border-top: 1px solid #dde3e7;
    }

    .stat-item:nth-child(4) {
        border-top: 1px solid #dde3e7;
        border-right: none;
    }

    /* Steps */
    .how-steps {
        max-width: 100%;
    }

    /* Video */
    .video-wrapper {
        max-width: 100%;
    }
}

/* ── Móvil (≤ 768px) ── */
@media (max-width: 768px) {

    .container {
        padding: 0 20px;
    }

    /* Topbar */
    .topbar {
        height: auto;
        padding: 14px 0;
        background: #005470;
        /* Azul institucional oficial */
        border-bottom: 2px solid #abad25;
        /* Oliva institucional */
    }

    .topbar-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap; /* Evitar que el botón baje de línea */
        gap: 10px;
        height: 100%;
    }

    .topbar-logos {
        display: flex;
        align-items: center;
        gap: 10px;
        order: 1;
        flex-shrink: 1; /* Permitir que se encoja para dar espacio al menú */
        min-width: 0;
        max-width: calc(100% - 60px); /* Asegurar espacio para el botón hamburguesa */
    }

    .logo-unificador img {
        height: 50px !important; /* Altura reducida para móviles */
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .logo-concytec img {
        height: 90px;
    }

    .logo-prociencia img {
        height: 90px;
    }

    /* Nav */
    .menu {
        display: none;
        /* Oculto por defecto */
        position: absolute;
        top: 100%;
        /* Justo debajo de la topbar */
        left: 0;
        width: 100%;
        background: #005470;
        /* Azul institucional oficial */
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 20px 40px;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }

    .menu.show {
        display: flex;
        animation: slideDownMenu 0.3s ease forwards;
    }

    @keyframes slideDownMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .menu-toggle {
        display: block;
        order: 2;
        margin-left: auto;
        flex-shrink: 0; /* Que no se encoja el botón */
        font-size: 24px;
        padding: 8px;
    }

    .menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .menu a {
        font-size: 15px;
        padding: 12px 0;
        width: 100%;
    }

    /* Dropdowns in Mobile */
    .dropdown-content {
        position: static;
        transform: none;
        background: rgba(0, 53, 70, 0.4);
        box-shadow: none;
        border: none;
        width: 100%;
        margin-top: 0;
        padding-left: 20px;
        display: none;
        /* Oculto por defecto en móvil */
        animation: none !important;
    }

    .dropdown.open .dropdown-content {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .dropdown>a {
        cursor: pointer !important;
        position: relative;
    }

    /* Pequeño indicador de que es un dropdown en móvil */
    .dropdown>a::after {
        content: ' ▼';
        font-size: 10px;
        opacity: 0.5;
    }

    .dropdown-content a {
        font-size: 13px !important;
        border-bottom: none !important;
        padding: 10px 0 !important;
        color: #4cc2e1 !important;
        /* Celeste institucional */
    }

    .dropdown:hover .dropdown-content {
        display: none;
        /* Desactivar hover en móvil */
    }

    .dropdown.open:hover .dropdown-content {
        display: block;
    }


    /* Hero */
    .hero {
        min-height: 520px;
    }

    .hero-video {
        object-position: center center;
    }

    .hero-grid {
        padding-top: 130px;
        padding-bottom: 48px;
    }

    .hero-title {
        font-size: 22px;
        line-height: 1.35;
        margin-bottom: 14px;
    }

    .hero-desc {
        font-size: 12.5px;
        line-height: 1.7;
        margin-bottom: 26px;
    }

    .btn-tutorial {
        font-size: 11px;
        padding: 10px 20px 10px 16px;
    }

    /* Stats */
    .stats-section {
        padding: 40px 0 36px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .stat-number {
        font-size: 38px;
    }

    .stat-sub {
        font-size: 24px;
    }

    /* How section */
    .how-section {
        padding: 48px 0 52px;
    }

    .how-title {
        font-size: 22px;
        margin-bottom: 28px;
    }

    .how-steps {
        flex-direction: column;
        border-radius: 20px;
        max-width: 420px;
    }

    /* Separadores ahora son horizontales */
    .step-pill+.step-pill::before {
        left: 10%;
        top: 0;
        width: 80%;
        height: 1px;
    }

    /* Video */
    .video-section {
        padding-bottom: 52px;
    }

    .video-title {
        font-size: 22px;
    }

    .video-thumb,
    .video-player {
        height: 280px;
    }

    /* Cursor: ocultar en táctil */
    .custom-cursor {
        display: none;
    }
}

/* ── Móvil pequeño (≤ 480px) ── */
@media (max-width: 480px) {

    .hero-title {
        font-size: 20px;
    }

    .hero-desc {
        font-size: 12px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-sub {
        font-size: 20px;
    }

    .stat-label,
    .stat-sublabel {
        font-size: 12px;
    }

    .how-title {
        font-size: 19px;
    }

    .step-num {
        font-size: 22px;
    }

    .step-main {
        font-size: 13px;
    }

    .video-thumb,
    .video-player {
        height: 220px;
    }

    .social-icons {
        gap: 18px;
    }

    .footer-info p {
        font-size: 11px;
    }
}

/* =====================================================
   CONTACT SECTION (Ayuda.razor)
   ===================================================== */
.contact-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 75, 92, 0.08);
}

.contact-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: #004B5C;
    margin-bottom: 30px;
    text-align: center;
}

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

.form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #004B5C;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #00B4C8;
    box-shadow: 0 0 0 4px rgba(0, 180, 200, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background: #8B9900;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #9dac00;
    transform: translateY(-2px);
}

.btn-submit:disabled {
    background: #aab8c2;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.form-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .contact-container {
        padding: 30px 20px;
    }
}

/* =====================================================
   HERO — VERSIÓN CON IMAGEN DE FONDO (Blazor Inicio.razor)
   ===================================================== */
.hero-bg-imagen {
    position: absolute;
    inset: 0;
    background: url('../Observatorio-FondoBanner.png') no-repeat center right;
    background-size: cover;
    z-index: 1;
}

/* Ocultar el video cuando se usa imagen de fondo */
.hero-bg-imagen~.hero-video {
    display: none;
}

@media (max-width: 768px) {
    .hero-bg-imagen {
        background-position: center center;
    }
}

@media (max-width: 480px) {
    .hero-bg-imagen {
        background-position: 65% center;
    }
}

/* =====================================================
   OVERRIDES PARA VISTAS INSTITUCIONALES (Subvenciones, etc.)
   ===================================================== */
.ref-navbar,
.ref-page-body,
.obs-page-body,
.det-sidebar-wrapper,
.det-sidebar {
    top: 100px !important;
    /* Desplazar hacia abajo si son sticky */
}

/* Evitar vacío al final de las páginas y ajustar altura para que el sidebar no desborde */
.main-content,
.ref-page-body,
.obs-page-body,
.det-sidebar-wrapper,
.det-sidebar {
    height: calc(100vh - 100px) !important;
    min-height: calc(100vh - 100px) !important;
}

/* Ocultar el cursor nativo definitivamente */
body {
    cursor: auto !important;
}

a,
button {
    cursor: pointer !important;
}

/* ===== AYUDA PAGE STYLES ===== */
.help-content-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.help-title-main {
    font-size: 2.5rem;
    color: #005470;
    margin-bottom: 40px;
    font-weight: 700;
    text-align: center;
}

/* FAQ Accordion */
.faq-container {
    max-width: 900px;
    margin: 0 auto 60px;
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #cccfcf;
}

.faq-question {
    width: 100%;
    padding: 20px 30px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    color: #408094;
    text-align: left;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f0f7f9;
}

.faq-icon {
    transition: transform 0.3s;
    color: #80a8b8;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    padding: 0 30px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: #555;
    line-height: 1.8; /* Aumentado para mejor legibilidad */
}

.faq-item.active .faq-answer {
    max-height: 600px; /* Aumentado para no cortar textos con saltos de línea */
    padding-top: 10px; /* Espacio extra arriba */
    padding-bottom: 25px;
}

/* Consultas Section */
.consultas-panel {
    max-width: 900px;
    margin: 40px auto;
}

.consultas-header {
    background-color: #408094;
    color: white;
    padding: 40px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.consultas-header h2 {
    margin: 0;
    font-weight: 700;
}




/* --- Estilos para Header Claro (Réplica inicio2.html) --- */
.topbar.topbar-light {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #005470 !important;
    height: 100px;
}

.topbar-light .logo-divider {
    background: rgba(0, 0, 0, 0.1) !important;
}

.topbar-light .menu a {
    color: #005470 !important;
    font-weight: 700;
}

.topbar-light .menu a:hover,
.topbar-light .menu a.active {
    color: #4cc2e1 !important;
}

.topbar-light .menu-toggle {
    color: #005470 !important;
}

/* Ajuste de altura de logos para que quepan bien en los 100px */
.topbar-light .topbar-logos img {
    height: 80px;
    width: auto;
}

/* Corrección para que el texto del submenú sea legible en modo claro */
.topbar-light .dropdown-content a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
}

.topbar-light .dropdown-content a:hover {
    color: #4cc2e1 !important;
}

/* --- Ajustes Móvil para Header Claro --- */
@media (max-width: 768px) {

    /* Reducir aún más los logos para que el botón hamburguesa tenga espacio */
    .topbar-light .logo-concytec img,
    .topbar-light .logo-prociencia img {
        height: 60px !important;
    }

    /* Colores del menú móvil en modo claro */
    .topbar-light .menu {
        background: #ffffff !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .topbar-light .menu a {
        color: #005470 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Submenú (Dropdown) en móvil modo claro */
    .topbar-light .dropdown-content {
        background: #f8f9fa !important;
    }

    .topbar-light .dropdown-content a {
        color: #005470 !important;
        border-bottom: none !important;
    }

    /* El ícono de dropdown en móvil también debe ser azul */
    .topbar-light .dropdown>a::after {
        color: #005470;
    }
}

/* Estilos Botón Flotante Tour */
.ref-tour-floating-btn {
    position: fixed;
    bottom: 60px;
    right: 30px;
    background: linear-gradient(135deg, #0d9488 0%, #065f46 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.ref-tour-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(13, 148, 136, 0.6);
    background: linear-gradient(135deg, #0f766e 0%, #064e3b 100%);
}

.ref-tour-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ref-tour-text {
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .ref-tour-floating-btn {
        bottom: 40px;
        right: 20px;
        padding: 10px;
        width: 50px;
        height: 50px;
        justify-content: center;
    }

    .ref-tour-text {
        display: none;
    }

    .ref-tour-icon {
        font-size: 24px;
    }
}

/* --- Branding Personalizado para Scopus --- */
.scopus-brand {
    color: #ff6600 !important;
    /* Naranja oficial de Scopus */
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif;
    display: inline-block;
    letter-spacing: -0.5px;
}

.scopus-brand::after {
    content: "®";
    font-size: 0.65em;
    vertical-align: top;
    position: relative;
    top: -0.1em;
    margin-left: 1px;
    font-weight: 600;
}

/* =====================================================
   FOOTER INSTITUCIONAL (NEGRO)
   ===================================================== */
.footer-institucional-black {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 30px 20px !important;
    font-family: 'Montserrat', sans-serif !important;
    text-align: center !important;
    width: 100% !important;
    position: relative !important;
    z-index: 10 !important;
    display: block !important;
    margin-top: auto !important;
}

.footer-institucional-black .footer-logos {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 30px !important;
    margin-bottom: 20px !important;
}

.footer-institucional-black .footer-logo-left {
    height: 45px !important;
    width: auto !important;
}

.footer-institucional-black .footer-logo-right {
    height: 65px !important;
    width: auto !important;
    background-color: white !important;
    padding: 8px !important;
    border-radius: 4px !important;
}

.footer-institucional-black .footer-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
}

.footer-institucional-black .footer-text p {
    margin: 5px 0 !important;
}

@media (max-width: 768px) {
    .footer-institucional-black .footer-logos {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .footer-institucional-black .footer-text {
        font-size: 12px !important;
    }
}



.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    padding: 25px;
    border-radius: 12px;
    background: #f0f7f9;
    border-left: 5px solid #78d1e8;
}

.contact-card h4 {
    color: #408094;
    font-weight: 700;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.95rem;
}

.contact-item i {
    color: #80a8b8;
    font-size: 1.2rem;
}

.contact-item a {
    color: #408094;
    text-decoration: none;
    font-weight: 600;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-note {
    margin-top: 30px;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}