* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}


/* ==========================================
   HTML / BODY
========================================== */

html,
body {
    width: 100%;
    min-height: 100%;
}


body {
    background-color: #eee;
}


/* ==========================================
   NAVBAR
========================================== */

.navbar {
    padding: 1rem;
}


.navbar-brand img {
    width: 80px;
}


.navbar-brand h1 {
    font-size: 2rem;
    color: #FFFFFF;
    margin: 0;
}


.d-flex i {
    color: #FFFFFF;
    margin-left: 15px;
}


.navbar-toggler {
    padding: 0.5rem;

    width: 60px;
    height: 60px;
}


.navbar-toggler-icon {
    width: 100%;
    height: 100%;
}


/* ==========================================
   MAIN
========================================== */

main {

    background-color: #eee;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding: 4rem 2rem;

    min-height: calc(100vh - 90px);
}


/* ==========================================
   CONTENEDOR
========================================== */

.memo-demo {

    width: 100%;

    max-width: 900px;

    margin: 0 auto;

    padding: 30px 20px;
}


/* ==========================================
   TÍTULO
========================================== */

.titulo-memo {

    text-align: center;

    font-weight: 600;

    color: #343a40;
}


/* ==========================================
   LISTADO DE VIDEOS
========================================== */

.videos-acordeon {

    display: flex;

    flex-direction: column;

    gap: 12px;
}


/* ==========================================
   ACORDEÓN
========================================== */

.video-item {

    background: #fff;

    border: 1px solid #dee2e6;

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 .125rem .25rem rgba(0, 0, 0, .075);

    transition:
        box-shadow .25s ease,
        border-color .25s ease;
}


/* ==========================================
   HEADER
========================================== */

.video-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 85px;

    padding: 14px 18px;

    cursor: pointer;

    list-style: none;

    background-color: #fff;

    transition:
        background-color .2s ease,
        color .2s ease;
}


.video-header::-webkit-details-marker {
    display: none;
}


.video-header::marker {
    display: none;
}


.video-header:hover {

    background-color: #f8f9fa;

}


/* ==========================================
   CONTENIDO HEADER
========================================== */

.video-header-content {

    display: flex;

    align-items: center;

    min-width: 0;
}


/* ==========================================
   ICONO PLAY
========================================== */

.video-icon {

    width: 48px;

    height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-right: 15px;

    border-radius: 50%;

    background-color: #e9f5ff;

    color: #0d6efd;

    font-size: 24px;

    flex-shrink: 0;
}


/* ==========================================
   INFORMACIÓN
========================================== */

.video-info {

    display: flex;

    flex-direction: column;

    min-width: 0;
}


.video-titulo {

    font-size: 17px;

    font-weight: 600;

    color: #343a40;

    line-height: 1.3;
}


.video-descripcion {

    margin-top: 4px;

    color: #6c757d;

    font-size: 13px;
}


/* ==========================================
   DERECHA
========================================== */

.video-header-right {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-left: 20px;

    flex-shrink: 0;
}


/* ==========================================
   LOGO
========================================== */

.video-logo {

    width: 55px;

    height: 55px;

    object-fit: contain;

    border-radius: 8px;
}


/* ==========================================
   CHEVRON
========================================== */

.accordion-icon {

    width: 32px;

    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    color: #6c757d;

    transition:
        transform .25s ease,
        background-color .25s ease,
        color .25s ease;
}


.accordion-icon i {

    font-size: 16px;

}


.video-item[open] .accordion-icon {

    transform: rotate(180deg);

    background-color: #e9f5ff;

    color: #0d6efd;

}


/* ==========================================
   ACORDEÓN ABIERTO
========================================== */

.video-item[open] {

    border-color: #b6d4fe;

    box-shadow:
        0 .25rem .75rem rgba(13, 110, 253, .12);
}


.video-item[open] .video-header {

    background-color: #f8fbff;
}


.video-item[open] .video-titulo {

    color: #0d6efd;
}


/* ==========================================
   CONTENIDO
========================================== */

.video-contenido {

    padding: 0 18px 18px;

    border-top: 1px solid #e9ecef;

    animation: abrirVideo .25s ease;
}


@keyframes abrirVideo {

    from {

        opacity: 0;

        transform: translateY(-5px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


/* ==========================================
   VIDEO NORMAL
========================================== */

.video-container {

    position: relative;

    width: 100%;

    padding-bottom: 56.25%;

    height: 0;

    overflow: hidden;

    margin-top: 18px;

    border-radius: 8px;

    background: #000;

    cursor: pointer;
}


.video-container iframe {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    border: 0;

    /*
     * El clic lo recibe el contenedor,
     * no el iframe.
     */

    pointer-events: none;
}


/* ==========================================
   MENSAJE DE FULLSCREEN
========================================== */

.fullscreen-hint {

    position: absolute;

    bottom: 12px;

    right: 12px;

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 7px 11px;

    border-radius: 5px;

    background-color: rgba(0, 0, 0, .70);

    color: #fff;

    font-size: 12px;

    opacity: 0;

    transition: opacity .2s ease;

    pointer-events: none;
}


.video-container:hover .fullscreen-hint {

    opacity: 1;

}


/* ==========================================
   POPUP
========================================== */

.video-popup {

    position: fixed;

    inset: 0;

    width: 100vw;

    height: 100vh;

    background-color: #000;

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 9999;

    overflow: hidden;
}


/*
 * Popup visible
 */

.video-popup.activo {

    display: flex;

}


/* ==========================================
   CONTENEDOR FULLSCREEN
========================================== */

.video-popup-contenido {

    position: relative;

    width: 100%;

    height: 100%;

    background-color: #000;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}


/*
 * FULLSCREEN REAL
 */

.video-popup-contenido:fullscreen {

    width: 100vw;

    height: 100vh;

    background-color: #000;

}


/*
 * Safari
 */

.video-popup-contenido:-webkit-full-screen {

    width: 100vw;

    height: 100vh;

    background-color: #000;

}


/* ==========================================
   IFRAME FULLSCREEN
========================================== */

.video-popup-contenido iframe {

    width: 100%;

    height: 100%;

    border: none;

    display: block;

}


/* ==========================================
   BOTÓN X
========================================== */

.cerrar-video-popup {

    position: absolute;

    top: 20px;

    right: 20px;

    width: 54px;

    height: 54px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 50%;

    /*
     * Rojo para que sea muy visible
     */

    background-color: rgba(220, 53, 69, .95);

    color: #fff;

    font-size: 21px;

    cursor: pointer;

    z-index: 100000;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, .5);

    transition:
        background-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


/* ==========================================
   HOVER X
========================================== */

.cerrar-video-popup:hover {

    background-color: #bb2d3b;

    transform: scale(1.08);

    box-shadow:
        0 4px 16px rgba(0, 0, 0, .6);
}


/* ==========================================
   CLICK X
========================================== */

.cerrar-video-popup:active {

    transform: scale(.94);

}


/* ==========================================
   FOCUS
========================================== */

.cerrar-video-popup:focus {

    outline: 3px solid rgba(255, 255, 255, .8);

    outline-offset: 3px;
}


/* ==========================================
   BODY CUANDO POPUP ESTÁ ABIERTO
========================================== */

body.popup-abierto {

    overflow: hidden;

}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 768px) {


    main {

        padding: 2rem 1rem;

    }


    .memo-demo {

        padding: 20px 10px;

    }


    .video-header {

        padding: 12px;

        min-height: 75px;

    }


    .video-icon {

        width: 40px;

        height: 40px;

        margin-right: 10px;

        font-size: 20px;

    }


    .video-titulo {

        font-size: 15px;

    }


    .video-descripcion {

        font-size: 12px;

    }


    .video-logo {

        width: 42px;

        height: 42px;

    }


    .video-header-right {

        gap: 7px;

        margin-left: 8px;

    }


    .accordion-icon {

        width: 28px;

        height: 28px;

    }


    .video-contenido {

        padding: 0 12px 12px;

    }


    /*
     * Indicador siempre visible
     * en móvil.
     */

    .fullscreen-hint {

        opacity: 1;

        bottom: 8px;

        right: 8px;

        font-size: 10px;

        padding: 5px 8px;

    }


    /*
     * X más grande y fácil
     * de tocar en celular.
     */

    .cerrar-video-popup {

        top: 15px;

        right: 15px;

        width: 52px;

        height: 52px;

        font-size: 19px;

    }

}


/* ==========================================
   CELULARES PEQUEÑOS
========================================== */

@media (max-width: 400px) {


    .video-header-right {

        gap: 4px;

    }


    .video-logo {

        width: 35px;

        height: 35px;

    }


    .accordion-icon {

        width: 25px;

        height: 25px;

    }


    .video-titulo {

        font-size: 14px;

    }


    .video-descripcion {

        font-size: 11px;

    }


    .cerrar-video-popup {

        top: 12px;

        right: 12px;

        width: 50px;

        height: 50px;

        font-size: 18px;

    }

}
