/* CSS Document */

:root{
    --principal:#a50932;
    --secundario:gray;
    --fondo:#fafafa;
    --card:#ffffff;
    --borde:#dde2e7;
    --texto:#30343b;
    --gris:#6b7280;
}

/* =========================================================
   BASE
   ========================================================= */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    width:100%;
    overflow-x:hidden;
}

.tv-separador{
    width:100%;
    height:1px;
    background:#e5e7eb;
    margin:16px 0 13px 0;
}

body{
    width:100%;
    margin:0;
    padding:20px;
    font-family:Arial,Helvetica,sans-serif;
    background:var(--fondo);
    color:var(--texto);
    overflow-x:hidden;
}

img{
    max-width:100%;
    height:auto;
}


/* =========================================================
   CONTENEDOR PRINCIPAL
   ========================================================= */

#texto{
    width:100%;
    max-width:1200px;
    margin:0 auto;
}


/* =========================================================
   CABECERA EMISIÓN
   ========================================================= */

h1:first-of-type{
    width:100%;
    max-width:1200px;
    margin:0 auto 20px auto;

    background:var(--gris);
    color:#fff;

    padding:12px 15px;

    font-size:1.6rem;
    line-height:1.3;
    font-weight:bold;
    text-align:center;

    box-sizing:border-box;
}


/* =========================================================
   REPRODUCTOR
   ========================================================= */

#frame{
    width:100%;
    max-width:1200px;

    margin:0 auto 25px auto;

    border:1px solid var(--borde);
    border-radius:16px;

    background:#fff;

    box-shadow:0 4px 14px rgba(0,0,0,.07);

    overflow:hidden;
}

/*
 * El iframe de YouTube se adapta automáticamente
 * a la anchura disponible.
 */

#frame iframe{
    display:block;

    width:100%;
    aspect-ratio:16 / 9;

    height:auto;

    min-height:0;

    border:0;
}


/* =========================================================
   ANTIGUOS ELEMENTOS DE VIDEO
   ========================================================= */

#videoteca{
    position:static;
    width:auto;
    height:auto;
}

#player1,
#player2{
    position:static;
    width:100%;
    height:auto;
}


/* =========================================================
   TÍTULO LEGISLATURA
   ========================================================= */

#texto h2:first-of-type{
    width:100%;

    background:var(--principal);
    color:#fff;

    padding:12px 15px;
    margin:20px 0;

    font-size:1.6rem;
    line-height:1.35;

    font-weight:bold;
    text-transform:uppercase;
}


/* =========================================================
   RESTO DE H2
   ========================================================= */

#texto h2{
    width:100%;

    color:var(--principal);

    font-size:1.5rem;
    line-height:1.4;

    margin:20px 0;

    border-left:6px solid var(--principal);

    padding:10px 12px;

    text-transform:uppercase;
    font-weight:bold;

    overflow-wrap:anywhere;
}


/* =========================================================
   LEGISLATURA / PERIODO
   ========================================================= */

.titulo-legislatura{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.titulo-legislatura .periodo{
    font-weight:500;
}

.titulo-legislatura .separador{
    font-weight:bold;
}


/* =========================================================
   RECURSOS
   ========================================================= */

.recursos-bar{
    display:flex;
    align-items:center;
    flex-wrap:wrap;

    gap:10px;

    margin:15px 0;

    text-align:left;
}

.btn-video{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    gap:8px;

    padding:7px 12px;

    background:#fff;

    border:1px solid #d8dce1;
    border-radius:5px;

    color:#4b5563 !important;

    text-decoration:none;

    font-size:14px;
    font-weight:600;
}

.btn-video:hover{
    background:#f4f5f7;
    border-color:#A50932;
}

.btn-video img{
    width:24px;
    height:24px;

    object-fit:contain;
}


/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

.descripcion-seccion{
    width:100%;

    margin:30px 0;

    text-align:left;
}

.seccion-titulo{
	
    width:100%;
    background:#fff;
    border:1px solid #dee2e6;
    padding:12px 16px;
    color:#a50932;
    font-size:1.4rem;
    line-height:1.3;
    font-weight:700;
}

.contenido-descripcion{
	
    width:100%;
    background:#fff;
    border:1px solid #e5e7eb;
    border-top:none;
    padding:22px;
    box-shadow:0 4px 14px rgba(0,0,0,.07);
    line-height:1.8;
    overflow-wrap:anywhere;
}


/* =========================================================
   TEXTO DE LA DESCRIPCIÓN
   ========================================================= */

.contenido-descripcion p{
    margin:0 0 10px 0;
    padding:0;
    border:none;
    background:none;
    box-shadow:none;
    font-size:1.3rem;
    line-height:1.7;

    font-family:Arial,Helvetica,sans-serif;
}


/*
 * Las tablas antiguas que puedan venir dentro
 * de la descripción no deben romper el móvil.
 */

.contenido-descripcion table{
    width:100% !important;
    max-width:100%;

    border-collapse:collapse;

    display:block;

    overflow-x:auto;
}

.contenido-descripcion td,
.contenido-descripcion th{
    max-width:100%;

    overflow-wrap:anywhere;
    word-break:normal;
}


/* =========================================================
   PROPUESTAS DE RESOLUCIÓN
   ========================================================= */

.propuestas-resolucion{
    width:100%;

    margin-top:35px;
    margin-bottom:30px;

    text-align:left;
}

.propuestas-resolucion-titulo{
    width:100%;

    background:#fff;

    border:1px solid #dee2e6;

    padding:12px 16px;

    color:#A50932;

    font-size:1.4rem;
    line-height:1.3;

    font-weight:700;
}

.lista-propuestas{
    width:100%;

    background:#fff;

    border:1px solid #dee2e6;
    border-top:none;

    border-radius:0 0 8px 8px;

    padding:5px 20px;
}


/* =========================================================
   PROPUESTA INDIVIDUAL
   ========================================================= */

.propuesta-item{
    display:grid;

    grid-template-columns:55px minmax(0,1fr) auto;

    column-gap:18px;

    align-items:center;

    padding:18px 5px;

    border-bottom:1px solid #e1e4e8;
}

.propuesta-item:last-child{
    border-bottom:none;
}


/* =========================================================
   NÚMERO
   ========================================================= */

.propuesta-numero{
    display:flex;

    align-items:center;
    justify-content:center;

    width:42px;
    height:42px;

    background:#f1f3f5;

    border-radius:7px;

    color:#a50932;

    font-size:1.05rem;

    font-weight:700;

    flex-shrink:0;
}


/* =========================================================
   CONTENIDO PROPUESTA
   ========================================================= */

.propuesta-contenido{
    min-width:0;
}

.propuesta-titulo{
    font-size:1.3rem;
    line-height:1.45;
    font-weight:bold;
    color:#333;
    margin-bottom:8px;
    overflow-wrap:anywhere;
}

.propuesta-grupos-titulo{
    font-size:1rem;

    font-weight:bold;

    text-transform:uppercase;

    color:#777;

    margin-bottom:6px;
}

.propuesta-grupos{
    display:flex;

    flex-wrap:wrap;

    gap:6px;
}

.propuesta-grupo{
    display:inline-flex;

    align-items:center;

    padding:6px 12px;

    background:#eee;

    border-radius:20px;

    color:#333;

    text-decoration:none;

    font-size:13px;

    font-weight:bold;

    max-width:100%;

    overflow-wrap:anywhere;
}

.propuesta-grupo:hover{
    background:#A50932;
    color:#fff;
}


/* =========================================================
   NÚMERO DE DOCUMENTOS
   ========================================================= */

.propuesta-documentos{
    white-space:nowrap;

    color:#777;

    font-size:1.1rem;

    text-align:right;
}

/* =========================================================
   CABECERA TV PARLAMENTARIA
   ========================================================= */

.tv-cabecera{
    width:100%;
    max-width:1200px;

    margin:0 auto 20px auto;

    background:#fff;

    border:1px solid var(--borde);
    border-radius:12px;

    box-shadow:0 3px 12px rgba(0,0,0,.06);

    overflow:hidden;
}


/* =========================================================
   ESTADO DE LA EMISIÓN
   ========================================================= */

.tv-estado{
    display:flex;
    align-items:center;

    gap:12px;

    padding:13px 18px;

    border-bottom:1px solid var(--borde);
}


/* ---------------------------------------------------------
   ICONO DEL ESTADO
   --------------------------------------------------------- */

.tv-estado-icono{
    width:34px;
    height:34px;
    min-width:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    position:relative;
}


/* ---------------------------------------------------------
   CONTENIDO DEL ESTADO
   --------------------------------------------------------- */

.tv-estado-contenido{
    min-width:0;
}

.tv-estado-titulo{
    font-size:1.2rem;

    line-height:1.2;

    font-weight:bold;

    letter-spacing:.2px;
}

.tv-estado-subtitulo{
    margin-top:3px;

    font-size:1rem;

    color:var(--gris);

    line-height:1.3;
}


/* =========================================================
   INFORMACIÓN DE LA SESIÓN
   ========================================================= */

.tv-sesion{
    padding:16px 18px 17px 18px;
}


/* ---------------------------------------------------------
   NOMBRE DE LA SESIÓN
   --------------------------------------------------------- */

.tv-sesion-nombre{
    font-size:1.35rem;
    line-height:1.35;

    font-weight:bold;

    color:#30343b;

    overflow-wrap:anywhere;
}

.tv-sesion-cabecera{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    width:100%;
}

.tv-sesion-informacion{
    min-width:0;
}


/* ---------------------------------------------------------
   FECHA Y HORA
   --------------------------------------------------------- */

.tv-sesion-datos{
    display:flex;

    flex-wrap:wrap;

    gap:8px 22px;

    margin-top:8px;

    color:var(--gris);

    font-size:1.2rem;
}

.tv-sesion-dato{
    display:inline-flex;

    align-items:center;

    gap:6px;
}


/* Iconos Font Awesome */

.tv-sesion-dato i{
    color:var(--principal);

    font-size:1.2rem;

    width:18px;

    text-align:center;
}


/* =========================================================
   CONTEXTO PARLAMENTARIO
   ========================================================= */

.tv-contexto{
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    margin-bottom:15px;
    padding-bottom:11px;
    border-bottom:1px solid #e5e7eb;
}

.tv-legislatura{
    width:100%;
}

.tv-legislatura-nombre{
    font-size:1.2rem;
    line-height:1.3;
    font-weight:bold;
    color:var(--principal);
}

.tv-legislatura-periodo{
    font-size:1.1rem;
    line-height:1.3;
    color:var(--gris);
	font-weight:bold;
}

.tv-periodo-fotos{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-top:3px;
}



.tv-fotos{
    flex-shrink:0;
	margin-top:2px;
}

.tv-fotos a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:7px 12px;
    background:#fff;
    border:1px solid #d8dce1;
    border-radius:6px;
    color:#4b5563 !important;
    text-decoration:none;
    font-size:1.1rem;
    font-weight:600;
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.tv-fotos a:hover{
    background:#f8f9fa;
    border-color:var(--principal);
    color:var(--principal) !important;
}

.tv-fotos img{
    width:22px;
    height:22px;
    object-fit:contain;
}

.tv-separador{
    width:100%;
    height:1px;
    background:#e5e7eb;
    margin:16px 0 13px 0;
}


/* =========================================================
   DIRECTO
   ========================================================= */

.tv-cabecera.directo{
    border-top:4px solid var(--principal);
}

.tv-cabecera.directo .tv-estado{
    background:#fff7f8;
}

.tv-cabecera.directo .tv-estado-titulo{
    color:var(--principal);
}

.tv-cabecera.directo .tv-estado-icono{
    background:var(--principal);
}


/* Punto blanco */

.tv-cabecera.directo .tv-estado-icono::before{
    content:"";

    width:10px;
    height:10px;

    background:#fff;

    border-radius:50%;

    display:block;

    animation:directoPulse 1.5s infinite ease-in-out;
}


/* Anillo exterior */

.tv-cabecera.directo .tv-estado-icono::after{
    content:"";

    position:absolute;

    width:10px;
    height:10px;

    border:2px solid var(--principal);

    border-radius:50%;

    animation:directoRing 1.5s infinite ease-out;
}


/* =========================================================
   DIFERIDO
   ========================================================= */

.tv-cabecera.diferido{
    border-top:4px solid #6b7280;
}

.tv-cabecera.diferido .tv-estado{
    background:#f8f9fa;
}

.tv-cabecera.diferido .tv-estado-titulo{
    color:#4b5563;
}

.tv-cabecera.diferido .tv-estado-icono{
    background:#6b7280;
}


/* Triángulo de reproducción */

.tv-cabecera.diferido .tv-estado-icono::before{
    content:"";

    width:0;
    height:0;

    margin-left:3px;

    border-top:6px solid transparent;
    border-bottom:6px solid transparent;
    border-left:10px solid #fff;
}


/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes directoPulse{

    0%,100%{
        opacity:1;
        transform:scale(1);
    }

    50%{
        opacity:.45;
        transform:scale(.75);
    }
}

@keyframes directoRing{

    0%{
        opacity:.8;
        transform:scale(1);
    }

    100%{
        opacity:0;
        transform:scale(2.2);
    }
}


/* =========================================================
   Títulos de secciones
   ========================================================= */

.tv-seccion{
    width:100%;
    max-width:1200px;
    margin:26px auto 14px auto;
}

.tv-seccion-titulo{
    display:flex;
    align-items:center;
    gap:10px;

    margin:0;
    padding:10px 14px;

    background:#fff;
    border:1px solid var(--borde);
    border-left:5px solid var(--principal);
    border-radius:8px;

    color:#30343b;

    font-size:1.05rem;
    line-height:1.3;
    font-weight:bold;

    box-shadow:0 2px 8px rgba(0,0,0,.04);
}

.tv-seccion-titulo i{
    width:22px;
    text-align:center;
    color:var(--card);
    font-size:1.5rem;
}


/* Contenido que acompaña al título */

.tv-seccion-contenido{
    margin-top:10px;
}

/* =========================================================
   Orden del día
   ========================================================= */

.tv-orden-dia .tv-seccion-titulo{
    background:#fff;
}


/* =========================================================
   Propuestas de resolución
   ========================================================= */

.tv-propuestas .tv-seccion-titulo{
    background:#fff;
}



/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width:900px){

    body{
        padding:15px;
    }

    h1:first-of-type{
        font-size:1.45rem;
    }

    #texto h2:first-of-type{
        font-size:1.45rem;
    }

    #texto h2{
        font-size:1.35rem;
    }

    .contenido-descripcion{
        padding:18px;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media screen and (max-width:600px){

    body{
        padding:8px;
    }


    /* -------------------------
       EMISIÓN
       ------------------------- */

    h1:first-of-type{
        margin-bottom:12px;

        padding:10px 8px;

        font-size:1.15rem;

        border-radius:6px;
    }


    /* -------------------------
       REPRODUCTOR
       ------------------------- */

    #frame{
        margin-bottom:15px;

        border-radius:8px;
    }

    #frame iframe{
        width:100%;

        aspect-ratio:16 / 9;

        height:auto;
    }


    /* -------------------------
       LEGISLATURA
       ------------------------- */

    #texto h2:first-of-type{
        margin:15px 0;

        padding:10px 12px;

        font-size:1.15rem;

        line-height:1.4;

        text-align:left;
    }


    /* -------------------------
       TÍTULOS
       ------------------------- */

    #texto h2{
        margin:15px 0;

        padding:8px 10px;

        border-left-width:4px;

        font-size:1.1rem;

        line-height:1.4;
    }


    /* -------------------------
       LEGISLATURA
       ------------------------- */

    .titulo-legislatura{
        display:block;
    }

    .titulo-legislatura .separador{
        display:none;
    }

    .titulo-legislatura .periodo{
        display:block;

        margin-top:3px;

        font-size:.95rem;

        font-weight:500;
    }


    /* -------------------------
       DESCRIPCIÓN
       ------------------------- */

    .descripcion-seccion{
        margin:20px 0;
    }

    .seccion-titulo{
        padding:10px 12px;

        font-size:1.1rem;
    }

    .contenido-descripcion{
        padding:14px;

        line-height:1.6;

        font-size:.95rem;
    }

    .contenido-descripcion p{
        font-size:.95rem;

        line-height:1.6;
    }


    /* -------------------------
       TABLAS
       ------------------------- */

    .contenido-descripcion table{
        font-size:.85rem;
    }


    /* -------------------------
       PROPUESTAS
       ------------------------- */

    .propuestas-resolucion{
        margin-top:20px;

        margin-bottom:20px;
    }

    .propuestas-resolucion-titulo{
        padding:10px 12px;

        font-size:1.1rem;
    }

    .lista-propuestas{
        padding:0 10px;
    }


    /* -------------------------
       PROPUESTA
       ------------------------- */

    .propuesta-item{
        grid-template-columns:40px minmax(0,1fr);

        column-gap:10px;

        align-items:start;

        padding:14px 2px;
    }


    /* Número */

    .propuesta-numero{
        width:34px;
        height:34px;

        font-size:.9rem;
    }


    /* Título */

    .propuesta-titulo{
        font-size:14px;

        line-height:1.4;

        margin-bottom:7px;
    }


    /* Grupos */

    .propuesta-grupos-titulo{
        font-size:10px;

        margin-bottom:5px;
    }

    .propuesta-grupos{
        gap:5px;
    }

    .propuesta-grupo{
        padding:5px 9px;

        font-size:12px;
    }


    /* Documentos */

    .propuesta-documentos{
        grid-column:2;

        text-align:left;

        margin-top:7px;

        font-size:12px;

        white-space:normal;
    }


    /* Recursos */

    .recursos-bar{
        margin:10px 0;
    }

    .btn-video{
        font-size:13px;

        padding:6px 10px;
    }
	
	.tv-cabecera{
        margin-bottom:12px;

        border-radius:8px;
    }


    /* Estado */

    .tv-estado{
        padding:10px 12px;

        gap:10px;
    }

    .tv-estado-icono{
        width:32px;
        height:32px;
        min-width:32px;
    }

    .tv-estado-titulo{
        font-size:.95rem;
    }

    .tv-estado-subtitulo{
        font-size:.78rem;
    }


    /* Sesión */

    .tv-sesion{
        padding:13px 12px 14px 12px;
    }
	
	.tv-sesion-cabecera{
        display:block;
    }


    .tv-sesion-nombre{
        font-size:1.05rem;

        line-height:1.4;
    }


    /* Fecha y hora */

.tv-sesion-datos{
    display:flex;

    flex-direction:column;

    gap:5px;

    margin-top:7px;

    font-size:.82rem;
}

.tv-sesion-dato{
        display:flex;
        align-items:center;
        gap:6px;
    }

.tv-sesion-dato i{
    width:17px;

    font-size:.85rem;
}


    /* Contexto */

    .tv-contexto{
        display:block;
        margin-bottom:12px;
        padding-bottom:9px;
    }

    .tv-legislatura-nombre{
        font-size:.95rem;
    }

    .tv-legislatura-periodo{
        font-size:.82rem;
		font-weight:bold;
    }


    /* Fotos */

     .tv-periodo-fotos{
        display:block;
    }

    .tv-fotos{
        margin-top:11px;
    }

    .tv-fotos a{
        width:100%;
        padding:7px 10px;
        font-size:.82rem;
    }
	
	.tv-seccion{
        margin:20px auto 11px auto;
    }

    .tv-seccion-titulo{
        padding:9px 11px;
        border-left-width:4px;
        border-radius:7px;
        font-size:.95rem;
    }

    .tv-seccion-titulo i{
        width:20px;
        font-size:.9rem;
    }

    .tv-seccion-contenido{
        margin-top:8px;
    }

}


/* =========================================================
   MÓVILES MUY PEQUEÑOS
   ========================================================= */

@media screen and (max-width:380px){

    body{
        padding:5px;
    }

    h1:first-of-type{
        font-size:1.05rem;
    }

    #texto h2:first-of-type{
        font-size:1.05rem;
    }

    #texto h2{
        font-size:1rem;
    }

    .contenido-descripcion{
        padding:12px;
    }

    .lista-propuestas{
        padding:0 7px;
    }

    .propuesta-item{
        grid-template-columns:34px minmax(0,1fr);

        column-gap:8px;
    }

    .propuesta-numero{
        width:30px;
        height:30px;

        font-size:.8rem;
    }
	
	.tv-estado-titulo{
        font-size:.9rem;
    }

    .tv-estado-subtitulo{
        font-size:.75rem;
    }

    .tv-sesion-nombre{
        font-size:1rem;
    }

    .tv-legislatura-nombre{
        font-size:.9rem;
    }

    

}
