/* =========================
   BASE
   ========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 12px;
    line-height: 1.4;

    color: #000;
    background: #fff;
}

body {
    overflow-x: hidden;
}

body.lightbox-open {
    overflow: hidden;
}


/* =========================
   MODO VÍDEO — NEGRO SOBRE BLANCO INVERTIDO
   ========================= */

body.video-mode {
    color: #fff;
    background: #000;
}

body.video-mode a {
    color: #fff;
}

body.video-mode .sidebar {
    background: #000;
    border-color: #333;
}

body.video-mode .site-footer {
    color: #fff;
}


/* ENLACES DEL MENÚ */

body.video-mode .sidebar nav a {
    color: #fff;
}


/* BACK TO TOP */

body.video-mode .back-top a {
    color: #fff;
}

/* MODO BLUSH — ABOUT + CONTACT */
body.about-mode {
    color: #0000ee;
    background: #fff5f8;
}

body.about-mode a,
body.about-mode .site-footer,
body.about-mode .sidebar nav a {
    color: #0000ee;
}

body.about-mode .sidebar {
    background: #fff5f8;
    border-color: #ead5de;
}


a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* =========================
   MENÚ — ESCRITORIO
   ========================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: 170px;
    height: 100vh;

    padding: 20px 15px;

    background: #fff;

    border-right: 1px solid #ccc;
}

.site-title {
    margin: 0 0 30px 0;

    font-size: 12px;
    font-weight: normal;
}

.sidebar nav a {
    display: block;

    margin-bottom: 8px;
}


/* =========================
   CONTENIDO
   ========================= */

.content {
    margin-left: 170px;

    width: calc(100% - 170px);

    min-width: 0;

    padding: 20px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* ABOUT + CONTACT — blush suave con detalles de fantasía */
body:not(.video-mode) #about,
body:not(.video-mode) #contact {
    min-height: calc(100vh - 40px);
    margin: -20px;
    padding: 32px 24px;
    color: #0000ee;
    background:
        radial-gradient(ellipse at 88% 12%, rgba(255, 255, 255, 0.92), transparent 30%),
        linear-gradient(145deg, #fff8fa 0%, #fcecf2 54%, #fff5f7 100%);
}

body:not(.video-mode) #about .text-page,
body:not(.video-mode) #contact .text-page {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

body:not(.video-mode) #about a,
body:not(.video-mode) #contact a {
    color: #0000ee;
}

body:not(.video-mode) #about .section-heading::before,
body:not(.video-mode) #contact .section-heading::before {
    content: "✧  ";
    color: #bd8297;
}

body:not(.video-mode) #about .section-heading::after,
body:not(.video-mode) #contact .section-heading::after {
    content: "  ✧";
    color: #bd8297;
}

body:not(.video-mode) #about .back-top,
body:not(.video-mode) #contact .back-top {
    color: #0000ee;
}


/* =========================
   SUBCATEGORÍAS
   ========================= */

.photo-subnav,
.section-heading {
    width: 100%;

    margin: 0 0 35px 0;

    text-align: center;
}

.section-heading {
    font-size: 12px;
    font-weight: normal;
    text-decoration: underline;
}

.photo-category-link {
    display: inline-block;

    margin: 0 10px;
}

.photo-category-link.active {
    text-decoration: underline;
}

.photo-category {
    display: none;
}

.photo-category.active {
    display: block;
}


/* =========================
   GALERÍA
   ========================= */

.gallery {
    display: block;

    width: 100%;
}


/* =========================
   FOTOS
   ========================= */

.work {
    display: block;

    margin: 0 auto 40px auto;
}


/* HORIZONTAL */

.work.horizontal {
    width: 50%;
}


/* VERTICAL */

.work.vertical {
    width: 32%;
}


/* CUADRADA */

.work.square {
    width: 40%;
}


/* =========================
   SEPARADOR ENTRE GRUPOS
   ========================= */

.group-divider {
    width: 100%;

    margin: 130px 0 130px 0;

    text-align: center;

    font-size: 16px;
    line-height: 1;
}


/* =========================
   IMÁGENES
   ========================= */

.work img {
    display: block;

    width: 100%;
    max-width: 100%;

    height: auto;

    cursor: pointer;
}


/* =========================
   VÍDEOS
   ========================= */

.video-list {
    display: block;

    width: 100%;
    max-width: 820px;

    margin: 0 auto;
}

.video-item {
    display: block;

    width: 100%;

    margin-bottom: 50px;
}

#video-otros .video-item:not(:last-child) {
    margin-bottom: 33px;
}

/* Compensa el negro de la primera miniatura para igualar la distancia visible. */
#video-otros .video-list > .video-item:nth-child(2) {
    margin-bottom: calc(33px + 9.5%);
}

/* =========================
   TEXTOS
   ========================= */

.text-page {
    max-width: 600px;
}

.text-page p {
    margin: 0 0 20px 0;
}

.project {
    max-width: 700px;

    margin-bottom: 60px;
}

.project h2 {
    margin: 0 0 15px 0;

    font-size: 12px;
    font-weight: normal;
}

.project p {
    margin: 0;
}


/* =========================
   BACK TO TOP
   ========================= */

.back-top {
    margin-top: 70px;

    padding-bottom: 40px;

    text-align: center;
}

.back-top a {
    font-size: 12px;
}


/* =========================
   COPYRIGHT
   ========================= */

.site-footer {
    margin-top: 100px;

    padding: 20px 0 30px 0;

    font-size: 11px;

    text-align: center;
}


/* =========================
   LIGHTBOX
   ========================= */

.lightbox {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 64px 40px 48px;

    background: rgba(255, 255, 255, 0.97);

    opacity: 0;
    visibility: hidden;

    z-index: 9999;

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
}


/* =========================
   IMAGEN AMPLIADA
   ========================= */

.lightbox img {
    display: block;

    max-width: 88vw;
    max-height: calc(100vh - 112px);

    width: auto;
    height: auto;

    object-fit: contain;
}

.lightbox-full-size {
    position: fixed;
    top: 8px;
    left: 12px;

    min-height: 44px;
    padding: 12px;

    display: inline-flex;
    align-items: center;

    background: rgba(255, 255, 255, 0.92);

    color: #000;
    font-size: 12px;
    text-decoration: underline;

    z-index: 10003;
}


/* =========================
   FLECHAS
   ========================= */

.lightbox-arrow {
    position: fixed;

    top: 50%;
    transform: translateY(-50%);

    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;
    padding: 0;

    background: transparent;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 32px;
    font-weight: normal;

    line-height: 1;

    color: #000;

    cursor: pointer;

    z-index: 10001;
}

.lightbox-arrow:hover {
    opacity: 0.45;
}


/* IZQUIERDA */

.lightbox-prev {
    left: 20px;
    right: auto;
}


/* DERECHA */

.lightbox-next {
    left: auto;
    right: 20px;
}


/* =========================
   CERRAR
   ========================= */

.lightbox-close {
    position: fixed;

    top: 15px;
    right: 20px;

    border: none;
    padding: 0;

    background: transparent;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 28px;
    font-weight: normal;

    line-height: 1;

    color: #000;

    cursor: pointer;

    z-index: 10002;
}

.lightbox-close:hover {
    opacity: 0.5;
}


/* =========================
   MÓVIL
   ========================= */

@media (max-width: 600px) {


    /* MENÚ ARRIBA */

    .sidebar {
        position: fixed;

        top: 0;
        left: 0;
        z-index: 1000;

        width: 100%;
        height: auto;

        padding: 12px 15px;

        border-right: none;
        border-bottom: 1px solid #ccc;
    }


    .site-title {
        margin: 0 0 12px 0;
    }


    .sidebar nav {
        display: flex;

        flex-wrap: wrap;

        gap: 5px 15px;
    }


    .sidebar nav a {
        display: inline-block;

        margin: 0;
    }


    /* CONTENIDO */

    .content {
        margin-left: 0;

        width: 100%;

        padding: 105px 15px 15px;
    }


    /* SUBCATEGORÍAS */

    .photo-subnav {
        margin-bottom: 25px;
    }

    .section-heading {
        margin-bottom: 25px;
    }


    /* GALERÍA */

    .gallery {
        width: 100%;

        margin: 0;
    }


    /* TODAS LAS FOTOS A ANCHO COMPLETO */

    .work.horizontal,
    .work.vertical,
    .work.square {
        width: 100%;
    }


    .work {
        margin-bottom: 25px;
    }


    .work img {
        display: block;

        width: 100%;
        max-width: 100%;

        height: auto;
    }


    /* SEPARADOR */

    .group-divider {
        margin: 80px 0 80px 0;

        font-size: 15px;
    }


    /* VÍDEOS */

    .video-list {
        width: 100%;

        margin: 0;
    }


    .video-item {
        width: 100%;
    }


    /* BACK TO TOP */

    .back-top {
        margin-top: 50px;

        padding-bottom: 25px;

        text-align: center;
    }


    /* COPYRIGHT */

    .site-footer {
        margin-top: 60px;

        padding-bottom: 25px;

        text-align: center;
    }


    /* LIGHTBOX */

    .lightbox {
        padding: 62px 20px 62px;
    }


    .lightbox img {
        max-width: 82vw;
        max-height: calc(100vh - 124px);
        touch-action: pan-y;
    }


    .lightbox-full-size {
        top: calc(6px + env(safe-area-inset-top, 0px));
        left: 8px;
    }


    /* FLECHAS */

    .lightbox-arrow {
        position: fixed;

        top: 10px;
        transform: none;

        width: 38px;
        height: 38px;

        font-size: 28px;

        z-index: 10001;
    }


    .lightbox-prev {
        left: calc(50% - 42px);
    }


    .lightbox-next {
        right: auto;
        left: calc(50% + 4px);
    }


    /* CERRAR */

    .lightbox-close {
        top: 12px;
        right: 15px;

        font-size: 26px;
    }

}

/* =========================
   REPRODUCTORES DE YOUTUBE
   ========================= */

.video-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-item > iframe,
.video-item > video,
.youtube-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.youtube-preview {
    display: block;
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    color: inherit;
    line-height: 0;
    cursor: pointer;
}

.youtube-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-item-contained .youtube-preview img {
    object-fit: contain;
}

.video-item-genesis .youtube-preview img {
    transform: scaleX(0.91);
}

.video-item-sicilia .youtube-preview img {
    object-fit: contain;
}

.youtube-play-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 52px;
    border-radius: 14px;
    background: #f00;
    transform: translate(-50%, -50%);
    transition: background-color 150ms ease, transform 150ms ease;
}

.youtube-play-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: 3px;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 17px solid #fff;
    transform: translate(-50%, -50%);
}

.youtube-preview:hover .youtube-play-icon {
    background: #d90000;
    transform: translate(-50%, -50%) scale(1.06);
}

.youtube-preview:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}

.video-item > iframe {
    display: block;
}

.video-item > video {
    display: block;
    object-fit: contain;
}

.video-buffer-status {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font: inherit;
}

.video-buffer-status:disabled {
    cursor: wait;
    opacity: 1;
}

.video-buffer-status:not(:disabled) {
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

@media (max-width: 600px) {
    .youtube-play-icon {
        width: 62px;
        height: 44px;
        border-radius: 12px;
    }
}
