*,
*::before,
*::after {
    box-sizing: border-box;
}

/*--- ESTILOS GENERALES ---*/
body {
    background-color: #001E36;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: #FFFF;
    box-sizing: border-box;
    min-width: 360px;
}
#ad_middle1, #ad_middle2, #ad_middle3 , #ad_middle4{
    justify-content: center;
    display: flex;
}


img{
    object-fit: cover;
}

.article-title {
    font-weight: bold;
    line-height: 19px;
    font-size: 14px;
    word-break: break-word;
}

.destacados-escritorio {
    display: none;
}

.video-minutes-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
    background-color: #001E36;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 400;
    font-size: 12px;
    line-height: 12px;
}

.fecha-article {
    display: none;
}

.ad-middle1 {
    margin-right: auto;
    margin-left: auto;
    width: 300px;
    height: 250px;
    margin-bottom: 32px;
}

a {
    text-decoration: none;
    color: #FFFF;
}

a:hover {
    text-decoration: none;
    color: white;
}
.fa-facebook-f{
    color: rgba(27, 116, 228, 1);
}
.fa-instagram{
    color: rgba(237, 38, 144, 1);
}

.search-container {
    display: flex;
    align-items: center;
}

.search-button {
    background: transparent;
    border: none;
}

.search-input {
    width: 0;
    opacity: 0;
    border: none;
    background: transparent;
    border-bottom: 2px solid white;
    color: white;
    padding: 5px 0;
    font-size: 16px;
    pointer-events: none;
    transition: width 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-container.is-open .search-input {
    width: 200px;
    opacity: 1;
    padding: 5px 10px;
    pointer-events: auto;
}

/* --- Header Principal --- */
.main-header {
    background-color: rgba(0, 30, 54, 1);
    height: 70px;
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/*--- Opciones del navbar ---*/
.mobile-nav-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 10px;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #001E36;
}

.mobile-nav-menu.is-open {
    max-height: calc(100vh - 70px);

}

.mobile-nav-menu .nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.mobile-nav-menu .nav-links li {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    list-style: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 19px;
    letter-spacing: 0px;

}

.nav-item-programas {

    padding: 0 !important;
}

.programas-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 24px;
    cursor: pointer;
}


.nav-item-programas .mega-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: rgba(0, 20, 36, 0.5);
    padding: 0;
}


.nav-item-programas.is-open .mega-menu {
    max-height: 1000px;
}

.nav-item-programas .mega-menu-content {
    display: block;
    padding: 10px 0;
}

.nav-item-programas .mega-menu ul {
    padding-left: 0px;
}

.nav-item-programas .mega-menu a {
    text-transform: none;
    font-size: 14px;
    padding: 10px 15px;
}

.programas-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 6px;
    border-color: transparent transparent transparent #ffffff;
    transition: transform 0.3s ease;
}

.nav-item-programas.is-open .programas-trigger::after {
    transform: rotate(90deg);
}



/* --- Logo --- */
.header-logo {
    display: block;
    height: 33px;
    width: 39px;
}

/* --- Botón de Menú --- */
.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 28px;
}

.menu-icon {
    display: block;
    width: 19px;
    height: 15px;
}

.ad-top-container {
    width: 320px;
    height: 100px;
    margin: 16px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*---imagen del programa---*/
.imagen-programa-container img {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    backdrop-filter: blur(80px);
    margin-bottom: 24px;
    width: 100%;
    height: 100%;
    max-width: 991px;
}
.imagen-programa-container {
    position: relative;
    display: block;
    z-index: 1;
}

.programa-header {
    margin-left: 16px;
    margin-right: 16px;
    max-width: 360px;
    z-index: 3;
}

.programa-header .programa-nombre {
    font-weight: 600;
    font-size: 22px;
    line-height: 24px;
    letter-spacing: 0px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.programa-header .programa-descripcion {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
    margin-bottom: 12px;
}

.programa-header .programa-horario {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
    margin-bottom: 32px;
    z-index: 1;
    position: relative;
}

/*sección destacados*/
.destacados-section {
    margin-left: 16px;
    margin-right: 16px;
}

.destacados-section .destacados-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: 0px;
    text-transform: uppercase;
    padding-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(147, 163, 182, 0.2);

}

.destacados-section .destacados-article .article-image {
    width: unset;
    height: unset;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.destacados-section .destacados-article .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.destacados-section .destacados-article .article-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 30, 54, 0.8);
    color: white;
    font-weight: 400;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 0px;
    padding: 4px 8px;
    border-radius: 4px;
}

.destacados-section .destacados-article .article-title {
    font-weight: bold;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0px;
    margin-bottom: 12px;
    word-break: break-word;
}

.destacados-section .destacados-article .article-fecha {
    font-weight: 400;
    font-size: 13px;
    line-height: 13px;
    letter-spacing: 0px;
    color: rgba(226, 232, 239, 0.6);
    margin-bottom: 32px;

}

/* --- seccion episodios --- */
.section-episodios {
    margin: 40px 16px 77px;
}

.section-episodios .section-title {
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border-top: 1px solid rgba(147, 163, 182, 0.2);
    padding-top: 24px;
}

.articles-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


.episodio-article {
    display: flex;
    align-items: center;
    gap: 16px;
}

.episodio-article .article-image {
    width: 130px;
    height: 75px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.episodio-article .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.episodio-article .article-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 30, 54, 0.8);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}


.episodio-article .article-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.btn-ver-mas-noticias {
    font-weight: 400;
    font-size: 14px;
    line-height: 14px;
    letter-spacing: 0px;
    text-align: center;
    display: flex;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(2, 132, 199, 1);
    color: white;
    padding: 13px 41px;
    margin: 0 auto 64px auto;
    cursor: pointer;
}

/* --- LO MÁS VISTO --- */
.lo-mas-visto-section .section-body .article-link .article-card .article-fecha {
    display: none;
}

.lo-mas-visto-section {
    padding: 0 16px;
    margin-bottom: 80px;
}

.lo-mas-visto-section .section-title {
    border-top: 1px solid rgba(147, 163, 182, 0.2);
    padding-top: 24px;
    margin-bottom: 24px;
    font-weight: bold;
    font-size: 20px;
    text-transform: uppercase;
}


.lo-mas-visto-section .section-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-link {
    text-decoration: none;
    color: inherit;
}


.article-card {
    display: flex;
    align-items: center;
    gap: 12px;
}


.article-image {
    width: 130px;
    height: 75px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.video-time {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 30, 54, 0.8);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 400;
}


/*---Seccion programas---*/
.programas-section .swiper-button-next {
    display: none;
}

.programas-section {
    font-family: 'Open Sans', sans-serif;
    color: #FFFF;
    margin-left: 16px;
    margin-right: 16px;
}

.programas-section .title-container {
    border-top: 1px solid rgba(147, 163, 182, 0.2);
    width: 100%;
    padding-top: 20px;
}

.programas-section .section-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.programas-section .slice-title {
    max-width: 180px;
    word-break: break-word;
    padding-top: 12px;
    font-weight: bold;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
}

/*-- Estilo de carrusel de programa --*/
.programas-section .programas-carrusel {
    display: flex;
    width: 100%;
    height: auto;
    padding-top: 20px;
}

.programas-section .slice {
    overflow: hidden;
}
.programas-section .programas-carrusel {
    display: flex;
    width: 100%;
    height: auto;
    padding-top: 20px;
}

.programas-section .slice {
    overflow: hidden;
}

.programas-section .slice-image {
    width: 163px;
    height: 290px;

}
.programas-section img{
    width: 163px !important;
}



/*---Footer ---*/
footer {
    color: #FFFFFF;
    padding: 40px 24px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}


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

.footer-logo-container {
    margin-bottom: 10px;
}

.bbtv-logo {
    max-width: 80px;
}


.footer-column {
    width: 100%;
}

.footer-accordion-button {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    padding: 15px 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    /* Para alinear el texto y la flecha */
    justify-content: space-between;
    align-items: center;
}

.footer-accordion-button::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.footer-accordion-button.is-open::after {
    transform: rotate(45deg);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    /* Oculto por defecto */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.footer-links.is-open {
    max-height: 2000px;
    /* Se expande al hacer clic */
    padding: 10px 0;
}

.footer-links li {
    padding: 8px 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.footer-social-container {
    margin: 20px 0 35px;
}

.footer-social-container a {
    font-size: 24px;
    margin: 0 15px;
    text-decoration: none;
}

.footer-legal-container {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);

}

/*Estilos escritorio*/
@media (min-width: 992px) {


    .ad-middle1 {
        margin-right: auto;
        margin-left: auto;
        width: 970px;
        height: 90px;
    }

    /*header responsivo*/
    .main-header {
        background-color: rgba(0, 30, 54, 0.8);
        justify-content: flex-start;
        gap: 30px;
    }

    .section-header .ver-programa-container-desktop {
        display: flex !important;
    }

    .menu-toggle {
        display: none;
    }

    .mobile-nav-menu {
        position: static;
        max-height: none;
        overflow: visible;
        width: auto;
        top: 0;
    }

    .mobile-nav-menu .nav-links {
        display: flex;
        align-items: center;
        gap: 25px;
    }

    .mobile-nav-menu .nav-links li {
        border-bottom: none;
        padding: 0;
    }

    .mobile-nav-menu .nav-links a {
        padding: 0;
        font-size: 14px;
        text-decoration: none;
    }

    .mobile-nav-menu {
        background: none;
    }
    
    .imagen-programa-container{
        height: 450px;
    }

    .imagen-programa-container img {
        max-width: 1280px;
        height: 450px !important;
    }
    .imagen-programa-container::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 25%; 
        background: linear-gradient(
            to bottom,
            rgba(0, 30, 54, 0),   
            rgba(0, 30, 54, 1)    
        );
        pointer-events: none; 
        z-index: 2;
    }

    .programa-header {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
        top: -93px;
        position: relative;
        padding: 0 16px;

    }

    .programa-header .programa-nombre {
        font-size: 28px;
        line-height: 27px;
        margin-bottom: 20px;
    }

    .programa-header .programa-descripcion {
        font-size: 15px;
        line-height: 15px;

    }

    .nav-item-programas {
        position: static;
    }

    .nav-item-programas .mega-menu a {
        text-transform: uppercase;
    }

    .nav-item-programas .mega-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(0, 30, 54, 0.9);
        padding: 30px 0;
        z-index: 999;
    }

    .nav-item-programas.is-open .mega-menu {
        display: block;
    }

    .nav-item-programas .mega-menu-content {
        max-width: 1280px;
        margin: 0 auto;
        display: flex;
        gap: 24px;
    }

    .nav-item-programas .mega-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        flex: 1;
    }

    .nav-item-programas .mega-menu a {
        display: block;
        padding: 8px 10px;
        font-size: 14px;
        color: rgba(226, 232, 239, 0.8);
        border-radius: 4px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-item-programas .mega-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
    }

    .programas-trigger {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .programas-trigger::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 5px 0 5px;
        border-color: #ffffff transparent transparent transparent;
        transition: transform 0.3s ease;
    }

    .nav-item-programas.is-open .programas-trigger::after {
        transform: rotate(180deg);
    }
    .programa-header .programa-horario {
        margin-bottom: 0;
    }


    /*destacados*/
    .destacados-escritorio {
        display: block;

    }

    .destacados-movil {
        display: none;
    }

    /*---Destacados---*/
    .destacados-section {
        margin: 0 auto;
        max-width: 1280px;
    }

    .destacados-section .slice {
        width: 364px;
    }

    .destacados-section article {
        width: 364px;
        padding-left: 50px;

    }

    .destacados-section .image-container {
        width: 364px;
        height: 180px;
        position: relative;
    }

    .destacados-section .slice-image img {
        width: 364px;
        height: 180px;
    }

    .ad_middle3 {
        margin: 0 !important;
    }

    .destacados-section .title-container {
        margin-left: 0;
        border-top: 1px solid rgba(147, 163, 182, 0.2);
        padding-top: 20px;
    }

    .destacados-section .section-title {
        font-weight: 600;
        font-size: 20px;
        line-height: 14px;
        letter-spacing: 0px;
        text-transform: uppercase;
    }

    .destacados-section .slice-title {
        font-weight: bold;
        font-size: 15px;
        line-height: 20px;
        letter-spacing: 0px;
        padding-top: 12px;
    }

    .destacados-section .ad-lateral-carrusel-middle-container {
        display: grid;
    }

    .destacados-section .carrusel-destacados {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
        position: relative;
    }

    .carrusel-destacados::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 180px;
        background: linear-gradient(to right,
                #001E36 7%,
                rgba(0, 30, 54, 0) 12%,
                rgba(0, 30, 54, 0) 100%,
                #001E36 95%);
        z-index: 2;
        pointer-events: none;
    }

    .carrusel-destacados::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 180px;
        background: linear-gradient(to right,
                #001E36 6%,
                rgba(0, 30, 54, 0) 0%,
                rgba(0, 30, 54, 0) 75%,
                #001E36 95%);
        z-index: 2;
        pointer-events: none;
    }

    .destacados-section .swiper-button-prev {
        display: flex;
        position: absolute;
        top: 45%;
        left: 12px;
        transform: translateY(-50%) rotate(180deg);
        z-index: 3;
        cursor: pointer;
        width: 11px;
        height: 21px;
        background-image: url('/biobiotv/assets/img/flecha-navegacion.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }

    .destacados-section .swiper-button-prev::after {
        content: '';
    }

    .destacados-section .swiper-button-next {
        display: flex;
        position: absolute;
        top: 45%;
        right: 12px;
        transform: translateY(-50%);
        z-index: 3;
        cursor: pointer;
        width: 11px;
        height: 21px;
        background-image: url('/biobiotv/assets/img/flecha-navegacion.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }

    .destacados-section .swiper-button-next::after {
        content: '';
    }


    .destacados-section .destacados-grid {
        display: grid;
        grid-template-columns: 300px 1fr;
        max-width: 1280px;
        padding-top: 20px;

    }

    .destacados-section .fecha-article {
        font-size: 13px;
        margin-top: 8px;
        font-weight: 400;
        font-size: 14px;
        line-height: 14px;
        letter-spacing: 0px;
        color: rgba(226, 232, 239, 0.8);

    }

    .ad-lateral-carrusel-middle-container {
        width: 300px;
        height: 250px;
    }

    /*seccion episodios */
    .section-episodios {
        max-width: 1280px;
        margin: 64px auto;
        padding: 0 5px;
    }

    .section-episodios .articles-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 64px 16px;
    }

    .section-episodios .episodio-article {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-episodios .episodio-article .article-image {
        width: 100%;
        height: 135px;
    }

    .section-episodios .episodio-article .article-title {
        font-weight: bold;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: 0px;
        word-break: break-word;
    }

    .section-episodios .episodio-article .fecha-article {
        display: block;
        font-weight: 400;
        font-size: 13px;
        line-height: 11px;
        letter-spacing: 0px;
        color: rgba(226, 232, 239, 0.6);

    }

    /*lo mas visto*/
    .lo-mas-visto-section {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 5px;
        margin-bottom: 16px;
    }

    .lo-mas-visto-section .section-body {
        display: flex;
        flex-direction: row;
        gap: 24px;
    }

    .lo-mas-visto-section .article-link {
        flex: 1;
    }

    .lo-mas-visto-section .article-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .lo-mas-visto-section .article-image {
        width: 100%;
        height: auto;
    }

    .lo-mas-visto-section .article-title {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.4;
    }

    .lo-mas-visto-section .article-fecha {
        display: block !important;
        margin-top: 8px;
        font-size: 13px;
        color: rgba(226, 232, 239, 0.8);
    }

    /*programas*/
    .programas-section {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
        position: relative;
        padding: 0 5px;
    }

    .programas-section .slice {
        margin-right: 16px !important;
    }
    .programas-section::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100px;
        z-index: 2;
        pointer-events: none;
        background: linear-gradient(to left, #001E36 20%, transparent);
    }

    .programas-section .swiper-button-next {
        display: flex;
        position: absolute;
        top: 50%;
        right: 60px;
        transform: translateY(-50%);
        z-index: 10;
        cursor: pointer;
        width: 11px;
        height: 21px;
        background-image: url('/biobiotv/assets/img/flecha-navegacion.png');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
    }

    .programas-section .swiper-button-next::after {
        content: '';
    }


    /*footer responsivo*/
    footer {
        text-align: left;
    }

    .footer-container {
        padding: 60px 24px;
    }

    .footer-main {
        align-items: start;
        display: grid;
        grid-template-columns: auto 2fr 1fr 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }

    .footer-accordion-button {
        display: none;
    }

    .footer-links {
        max-height: none;
        overflow: visible;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 24px;
    }

    .footer-links li {
        padding: 4px 0;
    }

    .footer-column {
        width: auto;
    }

    .footer-column[data-title="Frecuencias"] .footer-links {
        display: flex;
        flex-direction: column; 
    }

    .footer-column::before {
        content: attr(data-title);
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 25px;
        display: block;
    }

    .footer-social-container {
        text-align: right;
        margin: 0;
    }

    .footer-legal-container {
        margin-top: 70px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }




}