﻿/* ================================================================
   HOME - CSS FINAL COMPLETO HOME-HERO
   Contenido centrado, sin columnas laterales
   ================================================================ */

/* Contenedor principal centrado */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ajuste para el grid de tarjetas */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Título de sección */
.shadow-sm-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Modal centrado */
.modal {
    transform: none !important;
}

.modal-dialog {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Loading indicator */
#loadingIndicator .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* No more results */
#noMoreResults i {
    font-size: 3rem;
}

/* ================================================================
   TABS PRINCIPALES HOME
   ================================================================ */
/* ================================================================
   HOME HERO - VERSIÓN COMPACTA FINAL
   Tabs + Buscador más compactos sin perder funcionalidad
   ================================================================ */

/* ===== TABS PRINCIPALES ===== */

.home-main-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 80%;
    max-width: 900px;
    margin: 0 auto 6px auto !important; /* REDUCIDO: era 12px */
    padding: 0;
    background: transparent;
}

.home-tab-btn {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reducido de 8px */
    padding: 10px 18px; /* Reducido de 12px 20px */
    border: 2px solid #e9ecef;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    color: #6c757d;
    font-size: .8rem; /* Reducido de .85rem */
    font-weight: 700;
    border-radius: 10px; /* Reducido de 12px */
    cursor: pointer;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

    .home-tab-btn i {
        font-size: 1.1rem; /* Reducido de 1.2rem */
        transition: transform .3s ease;
        flex-shrink: 0;
    }

    .home-tab-btn span {
        font-size: .75rem; /* Reducido de .8rem */
        letter-spacing: 0.4px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .home-tab-btn::before {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 10px;
        padding: 2px;
        background: linear-gradient(145deg, #D4AF37, #8B1D1D);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0;
        transition: opacity .3s ease;
    }

    .home-tab-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 12px rgba(139, 29, 29, 0.1);
        border-color: rgba(139, 29, 29, 0.2);
    }

        .home-tab-btn:hover i {
            transform: scale(1.05);
        }

    .home-tab-btn.active {
        background: linear-gradient(145deg, #8B1D1D, #6d1717);
        color: #fff;
        border-color: #8B1D1D;
        box-shadow: 0 3px 16px rgba(139, 29, 29, 0.2);
        transform: translateY(-1px);
    }

        .home-tab-btn.active::before {
            opacity: 1;
        }

        .home-tab-btn.active i {
            transform: scale(1.08);
        }

    /* Flecha indicadora */
    .home-tab-btn::after {
        content: '';
        position: absolute;
        bottom: -8px; /* Reducido de -10px */
        left: 50%;
        transform: translateX(-50%) scale(0);
        width: 0;
        height: 0;
        border-left: 8px solid transparent; /* Reducido de 10px */
        border-right: 8px solid transparent;
        border-top: 8px solid #8B1D1D;
        transition: transform .3s ease;
    }

    .home-tab-btn.active::after {
        transform: translateX(-50%) scale(1);
    }

/* Tab Content */
.tab-content-home {
    display: none;
}

    .tab-content-home.active {
        display: block;
        animation: fadeInUp .3s ease;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HR SEPARATOR ===== */
.home-header-premium hr {
    margin-top: 4px !important; /* REDUCIDO: era 8px */
    margin-bottom: 6px !important; /* REDUCIDO: era 12px */
}

/* ===== BUSCADOR COMPACTO ===== */

/* Tabs del buscador (Buscar / Buscar IA) */
.nav-buscador-home {
    margin-bottom: 6px !important; /* REDUCIDO: era 12px */
}

.btn-tab-buscador {
    padding: 8px 16px !important; /* Reducido */
    font-size: .8rem !important;
}

/* Caja de búsqueda */
.search-premium-box,
.search-ia-box {
    padding: 12px !important; /* Reducido de 16px */
}

    /* Inputs y selects más compactos */
    .search-premium-box .input-group,
    .search-ia-box .input-group {
        height: 38px; /* Reducido de 42px */
    }

    .search-premium-box .form-control,
    .search-premium-box .form-select,
    .search-ia-box .form-control {
        height: 38px !important;
        font-size: .85rem !important;
        padding: 8px 12px !important;
    }

    .search-premium-box .input-group-text,
    .search-ia-box .input-group-text {
        padding: 8px 10px !important;
    }

        .search-premium-box .input-group-text i,
        .search-ia-box .input-group-text i {
            font-size: .95rem !important;
        }

/* Botón buscar */
.btn-buscar-unificado {
    height: 38px !important;
    padding: 8px 20px !important;
    font-size: .85rem !important;
}

/* Filtros mobile breadcrumb */
.mobile-filters-breadcrumb {
    margin-bottom: 10px !important;
}

.filters-row {
    gap: 8px !important;
}

.filter-item {
    padding: 6px 10px !important;
    font-size: .75rem !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 992px) {
    .home-main-tabs {
        width: 90%;
        gap: 10px;
    }

    .home-tab-btn {
        padding: 9px 16px;
    }
}

@media (max-width: 768px) {
    .home-main-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 95%;
        margin-bottom: 10px;
    }

    .home-tab-btn {
        padding: 8px 12px;
        gap: 5px;
    }

        .home-tab-btn i {
            font-size: 1rem;
        }

        .home-tab-btn span {
            font-size: .7rem;
        }

        .home-tab-btn::after {
            display: none;
        }

    /* Buscador móvil */
    .search-premium-box,
    .search-ia-box {
        padding: 10px !important;
    }

        .search-premium-box .form-control,
        .search-premium-box .form-select,
        .search-ia-box .form-control {
            height: 36px !important;
            font-size: .8rem !important;
        }

    .btn-buscar-unificado {
        height: 36px !important;
        font-size: .8rem !important;
    }
}

@media (max-width: 576px) {
    .home-main-tabs {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 98%;
        margin-bottom: 8px;
    }

    .home-tab-btn {
        padding: 7px 10px;
        gap: 4px;
    }

        .home-tab-btn i {
            font-size: .95rem;
        }

        .home-tab-btn span {
            font-size: .65rem;
            letter-spacing: 0.2px;
        }

    .search-premium-box .form-control,
    .search-premium-box .form-select,
    .search-ia-box .form-control {
        height: 34px !important;
        font-size: .75rem !important;
        padding: 6px 10px !important;
    }

    .btn-buscar-unificado {
        height: 34px !important;
        padding: 6px 16px !important;
    }
}

@media (max-width: 375px) {
    .home-tab-btn {
        padding: 6px 8px;
    }

        .home-tab-btn i {
            font-size: .9rem;
        }

        .home-tab-btn span {
            font-size: .6rem;
        }
}


/* ================================================================
   VARIANTE A MEJORADA - AGREGAR AL FINAL DE home-tabs.css
   Tabs con subtítulos usando la estructura existente
   ================================================================ */

/* Wrapper para texto + subtítulo dentro del tab */

/* ================================================================
   SUBTÍTULOS DEBAJO DE LA FLECHA - AGREGAR AL FINAL
   ================================================================ */
/* ================================================================
   SUBTÍTULOS DEBAJO DE LA FLECHA - SIEMPRE VISIBLES
   ================================================================ */

.home-tabs-subtitles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 80%;
    max-width: 900px;
    margin: -8px auto 6px auto !important; /* REDUCIDO: margen inferior era 0 */
    padding: 0;
}

.tab-subtitle-item {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 400;
    color: #adb5bd; /* Color gris para no seleccionado */
    line-height: 1.2;
    padding: 4px 8px;
    opacity: 1; /* SIEMPRE VISIBLE */
    transition: all 0.3s ease;
}

    .tab-subtitle-item.active {
        color: #212529; /* NEGRO en vez de rojo */
        font-weight: 700; /* BOLD - era 600 */
    }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 992px) {
    .home-tabs-subtitles {
        width: 90%;
        gap: 10px;
    }

    .tab-subtitle-item {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .home-tabs-subtitles {
        width: 95%;
        gap: 8px;
        margin-top: -6px;
    }

    .tab-subtitle-item {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 576px) {
    .home-tabs-subtitles {
        width: 98%;
        gap: 6px;
    }

    .tab-subtitle-item {
        font-size: 0.65rem;
    }
}

@media (max-width: 375px) {
    .tab-subtitle-item {
        font-size: 0.6rem;
    }
}

/* ================================================================
   TÍTULO PRINCIPAL CON LÍNEAS
   ================================================================ */

.hero-title-neon {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 6px 0; /* REDUCIDO: era 10px */
    margin-top: 6px; /* NUEVO: espacio desde skyline */
    margin-bottom: 6px; /* REDUCIDO */
}

.neon-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 29, 29, 0.3) 50%, transparent 100%);
}

.neon-text {
    font-size: 1.05rem;
    font-weight: 400;
    color: #495057;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.highlight-neon {
    color: #212529; /* NEGRO en vez de #8B1D1D */
    font-weight: 700; /* BOLD (era 600) */
    position: relative;
    text-shadow: none; /* Sin efecto glow */
}

    .highlight-neon::before {
        display: none; /* Sin línea decorativa */
    }

/* ================================================================
   SKYLINE BANNER - 100% ANCHO COMPLETO
   ================================================================ */

.rioja-top-skyline {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background: #fff;
    margin-top: 66px;
    margin-bottom: 0;
    padding: 0;
}

    .rioja-top-skyline img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 100%;
        display: block;
    }

.nk-content {
    padding-top: 0 !important;
}

/* ================================================================
   ESPACIOS REDUCIDOS PARA SECCIONES
   ================================================================ */

/* Sección "ÚLTIMAS PUBLICACIONES" - más cerca */
.tab-content-home > .container:first-child {
    margin-top: 1rem !important; /* REDUCIDO: era mt-5 (3rem) */
}

.tab-content-home > .container.mt-5 {
    margin-top: 1rem !important;
}

.tab-content-home > .container.mb-4 {
    margin-bottom: 0.75rem !important;
}
/* ================================================================
   FIX: ELIMINAR PADDING SUPERIOR DEL CONTENEDOR
   Para que el contenido quede pegado al skyline
   ================================================================ */

.nk-content {
    padding-top: 0 !important;
}

.nk-content-body {
    padding-top: 0 !important;
}

.container-xl {
    padding-top: 0 !important;
}

/* Asegurar que el primer contenedor después del skyline no tenga margin-top */
.nk-content > .container-xl:first-child {
    margin-top: 0 !important;
}

.nk-content-body > *:first-child {
    margin-top: 0 !important;
}

.btn-limpiar-filtros {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(139, 29, 29, 0.25);
    background: #fff;
    color: #8B1D1D;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    transition: all .2s ease;
    flex-shrink: 0;
}

    .btn-limpiar-filtros:hover {
        background: #8B1D1D;
        color: #fff;
        transform: translateY(-1px);
    }

@media (max-width: 768px) {
    .btn-limpiar-filtros {
        width: 100%;
        height: 34px;
        margin-top: 6px;
    }
}

.hero-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #fff;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    position: relative;
}

    .hero-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 80%;
        display: block;
    }

.hero-overlay {
    display: none;
}



/* ================================================================
   HERO CON BUSCADOR INTEGRADO
   ================================================================ */

.hero-banner-with-search {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Imagen de fondo */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 80%;
}

/* Overlay oscuro para legibilidad */
.hero-overlay-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.5) 100% );
}

/* Contenido sobre la imagen */
.hero-search-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

/* Ajustes de textos sobre fondo oscuro */
.hero-banner-with-search .neon-text {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-banner-with-search .highlight-neon {
    color: #ffffff;
    font-weight: 700;
}

.hero-banner-with-search .neon-line {
    background: linear-gradient( 90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100% );
}

/* Tabs sobre fondo oscuro */
.hero-banner-with-search .home-tab-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

    .hero-banner-with-search .home-tab-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .hero-banner-with-search .home-tab-btn.active {
        background: rgba(255, 255, 255, 0.95);
        color: #8B1D1D;
        border-color: rgba(255, 255, 255, 0.95);
    }

/* Subtítulos sobre fondo oscuro */
.hero-banner-with-search .tab-subtitle-item {
    color: rgba(255, 255, 255, 0.7);
}

    .hero-banner-with-search .tab-subtitle-item.active {
        color: rgba(255, 255, 255, 1);
        font-weight: 700;
    }

/* Buscador con backdrop blur */
.hero-banner-with-search .search-premium-box,
.hero-banner-with-search .search-ia-box {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.hero-banner-with-search .nav-buscador-home {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(8px);
}

/* ================================================================
   RESPONSIVE MOBILE
   ================================================================ */

/* ================================================================
   RESPONSIVE MOBILE - IMAGEN COMO FONDO, CONTENIDO ENCIMA
   ================================================================ */

@media (max-width: 768px) {
    .hero-banner-with-search {
        height: auto !important;
        min-height: 300px !important;
        padding: 1rem 0 2rem 0;
        position: relative;
    }

        /* Imagen mobile: fondo absoluto que cubre TODO el hero */
        .hero-banner-with-search .hero-bg {
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            object-position: center center !important;
            max-height: none !important;
        }

        /* Overlay oscuro para legibilidad */
        .hero-banner-with-search .hero-overlay-dark {
            position: absolute !important;
            inset: 0 !important;
        }

        /* Contenido SOBRE la imagen */
        .hero-banner-with-search .row,
        .hero-banner-with-search .home-search-wrapper {
            position: relative;
            z-index: 10;
        }

    .hero-search-content {
        padding: 1rem 0;
    }
}
/* ================================================================
   AJUSTES MOBILE - REDUCIR TAMAÑO DE TABS Y BOTÓN BUSCAR
================================================================ */

@media (max-width: 768px) {

    /* Tabs internos BUSCAR / BUSCAR IA - más chicos */
    .hero-banner-with-search .btn-tab-buscador {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }

        .hero-banner-with-search .btn-tab-buscador i {
            font-size: 0.65rem !important;
        }

    /* Botón BUSCAR y FILTROS en la misma línea */
    .hero-banner-with-search .search-actions {
        flex-direction: row !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }

    /* Ambos botones más chicos */
    .hero-banner-with-search .btn-buscar-unificado,
    .hero-banner-with-search .btn-toggle-filtros {
        flex: 1 !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
    }

        .hero-banner-with-search .btn-toggle-filtros i {
            font-size: 0.65rem !important;
        }
}
/* ================================================================
   AJUSTES MOBILE - FILTROS COMPACTOS (SIN ROMPER FUNCIONALIDAD)
================================================================ */

/* ================================================================
   AJUSTES MOBILE - FILTROS COMPACTOS (SIN ROMPER FUNCIONALIDAD)
================================================================ */

@media (max-width: 768px) {

    /* Contenedor de filtros: solo aplica estilos CUANDO está visible */
    /* No forzamos display, dejamos que el JS lo controle */
    .hero-banner-with-search .search-filters-row {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
        padding: 0.5rem 0.6rem !important;
    }

    /* Cada filtro ocupa el 50% menos el gap */
    .hero-banner-with-search .filter-group {
        flex: 1 1 calc(50% - 0.2rem) !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    /* Selects más chicos con texto truncado */
    .hero-banner-with-search .filter-select {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.8rem 0.3rem 0 !important;
        font-weight: 600 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        background-size: 8px !important;
    }

    /* Icono de filtro más chico */
    .hero-banner-with-search .filter-icon {
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
    }

    /* Botón LIMPIAR: ocupa toda la línea inferior */
    .hero-banner-with-search .btn-limpiar-filtros-inline {
        flex: 1 1 100% !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.35rem 0.6rem !important;
        font-size: 0.7rem !important;
        height: auto !important;
        margin-top: 0.2rem !important;
    }

        .hero-banner-with-search .btn-limpiar-filtros-inline i {
            font-size: 0.65rem !important;
        }
}
/* ================================================================
   AJUSTES MOBILE - INPUT DE BÚSQUEDA MÁS COMPACTO
================================================================ */
/* ================================================================
   AJUSTES MOBILE - INPUT DE BÚSQUEDA MÁS COMPACTO
================================================================ */

@media (max-width: 768px) {

    /* Cuadro de búsqueda más chico */
    .hero-banner-with-search .search-premium-box {
        padding: 0.3rem 0.7rem !important;
        min-height: 32px !important;
        height: 36px !important;
    }

        /* Input más pequeño */
        .hero-banner-with-search .search-premium-box input[name="q"],
        .hero-banner-with-search input[name="q"] {
            font-size: 0.8rem !important;
            height: 26px !important;
            min-height: 26px !important;
            line-height: 1 !important;
            padding: 0 !important;
        }

            /* Placeholder más chico */
            .hero-banner-with-search .search-premium-box input[name="q"]::placeholder,
            .hero-banner-with-search input[name="q"]::placeholder {
                font-size: 0.85rem !important;
                font-weight: 700 !important;
            }

        /* Input-group más chico */
        .hero-banner-with-search .search-premium-box .input-group {
            height: 26px !important;
            min-height: 26px !important;
        }

        /* Icono de lupa más chico */
        .hero-banner-with-search .search-premium-box .input-group-text {
            padding: 0 8px 0 0 !important;
            height: 26px !important;
        }

            .hero-banner-with-search .search-premium-box .input-group-text i {
                font-size: 0.9rem !important;
            }
}
/* ================================================================
   FIX ESPACIO HERO → TICKER
================================================================ */

/* Desktop: el hero tiene overflow:hidden pero puede haber padding interno */
.hero-banner-with-search {
    padding-bottom: 0 !important;
}

    /* El @section HeroBanner puede agregar un wrapper con margin */
    section[data-section="HeroBanner"],
    .hero-banner-with-search + * {
        margin-top: 0 !important;
    }

/* Mobile: el hero tiene padding: 1rem 0 2rem 0 — reducimos el bottom */
@media (max-width: 768px) {
    .hero-banner-with-search {
        padding-bottom: 0.5rem !important;
    }
}