* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.42857143;
    color: #333;
}

h1 {
    margin: 1rem 0px;
}

main {
    background-color: #f5f5f5;
    padding: 2rem 0px 3rem 0px;
}

header {
    background-color: #E3E2DA;
    padding: 20px 0;
    margin: 0;
}

header .container img {
    width: auto;
    height: 2.5rem;
}

footer {
    padding: 20px 0;
    margin: 0;
    text-align: center;
}

footer .container p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

footer .container .mail {
    width: 36px;
    height: auto;
}

.container {
    max-width: 1170px;
    padding: 1rem;
    margin-right: auto;
    margin-left: auto;
}

#imagen-video {
    object-fit: cover;
}

img {

    width: 100%;
    height: auto;
    max-width: 100%;
}

section#video {
    position: relative;
    margin-top: 2em;
}

.play-buttom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-buttom img {
    width: 60px;
    padding-top: 11rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 9999;
}

#popout {
    z-index: 10000;
}

/* Popout*/
.popout-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 800px;
    width: 100%;
    z-index: 1001;
}

.popout-header {
    padding: 16px;
    text-align: center;
    font-size: 1.25em;
    position: relative;
}

.popout-body {
    padding: 16px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.video-container-inline {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: #000;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Para mantener proporción 16:9 */
.video-container-inline::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* Relación 16:9 */
}

.video-container-inline img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container-inline {
    position: relative;
    width: 1000px;
    margin: 0 auto;
}

.iframe-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
}

#imagen-video {
    width: 100%;
    height: auto;
    display: block;
}

/* End*/

@media screen and (max-width: 768px) {
    section#video{
        margin: 1em 1em 0 1em;
    }

    h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 1rem 0px 2rem 0px;
    }

    .video-container-inline {
        max-width: 100%; /* En móviles ocupa todo el ancho disponible */
    }

    #imagen-video {
        object-fit: cover;
    }

    .play-buttom img {
        width: 40px;
        padding-top: 4.5em;
    }
}