/* ============================================================
   RESPONSIVE
   ============================================================ */

html {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}


/* ============================================================
   DESKTOP GRANDE — > 1440px
   ============================================================ */

@media only screen and (min-width: 1441px) {

    :root {
    }

}


/* ============================================================
   DESKTOP — > 1080px
   hover states solo en dispositivos con puntero fino
   ============================================================ */

@media only screen and (min-width: 1081px) {

    .mobile      { display: none !important; }
    .desktop     { display: block !important; }

    /* Label de vídeo: en desktop solo visible en hover */
    @media (hover: hover) and (pointer: fine) {

        .media-video-label { display: none; }
        .media-video:hover .media-video-label { display: block; }

    }

}


/* ============================================================
   TABLET + MÓVIL LANDSCAPE + TABLET COARSE
   — ≤ 1080px  |  landscape coarse  |  portrait coarse ≤ 1024px
   ============================================================ */

@media only screen and (max-width: 1080px),
       only screen and (pointer: coarse) and (orientation: landscape),
       only screen and (max-width: 1024px) and (pointer: coarse) and (orientation: portrait) {

    .desktop { display: none !important; }
    .mobile  { display: block !important; }

    :root {
        /* Alturas de media en mobile: verticales 55vh,
           horizontales proporcional (55 × 22/27.5 = 44vh) */
        --cover-v:  55vh;
        --cover-hz: 44vh;
    }


    /* Contact — items, imagen y represented-by en un grupo flex
       centrado con 145px de gap (duplicados .mobile en contact.php;
       las versiones de header y footer se ocultan) */
    .page-template-contact .header-center,
    .page-template-contact #footer .represented-by {
        display: none;
    }

    .contact-stack {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 100px;
        min-height: calc(var(--real100) - var(--header) * 2);
        padding-left: var(--pad);
    }

    .contact-stack .contact-image {
        min-height: 0;
    }

    /* Textos del stack alineados a la izquierda */
    .contact-stack .contact-items,
    .contact-stack .represented-by {
        justify-content: flex-start;
        text-align: left;
    }

    .contact-image img{
        width: calc(100vw - (var(--pad) * 2));
        height: auto;
    }

    /* Nav — mismo menú que desktop (sin hamburger) */

    /* Header — el título de proyecto / items de contacto pasan debajo */
    .header-center {
        position: absolute;
        top: calc(100% + var(--padm));
        left: 0;
        transform: none;
        text-align: left;
    }

    /* Home — bloque de 2 posts en columna tipo collage:
       el 1º desplazado a la izquierda, el 2º pegado debajo y
       desplazado a la derecha, ambos al mismo ancho */
    .home-row--two {
        flex-direction: column;
        height: auto;
        max-height: none;
        padding: 0;
    }

    .home-row--two .home-project-1,
    .home-row--two .home-project-2 {
        width: 60vw;
        max-width: none;
        height: auto;
        align-self: flex-start;
    }

    .home-row--two .home-project-1 {
    }

    .home-row--two .home-project-2 {
        margin-left: 30vw;
    }

    .home-row--two .home-project img,
    .home-row--two .home-project video {
        width: 100%;
        height: auto;
        max-height: none;
    }

    /* Single — rows de 2 imágenes en columna, cada una a un lado */
    .project-row--two {
        flex-direction: column;
        gap: var(--padm);
        height: auto;
    }

    .project-row--two .project-image:first-child { align-self: flex-start; }
    .project-row--two .project-image:last-child  { align-self: flex-end; }

    /* En mobile mandan las ALTURAS por orientación (Figma):
       verticales 27.5vh, horizontales 22vh — mismas medidas siempre.
       El ancho sale del ratio de cada imagen. */
    .project-image.media-v img,
    .project-image.media-v video {
        height: var(--cover-v);
        width: auto;
    }

    .project-image.media-h img,
    .project-image.media-h video {
        height: var(--cover-hz);
        width: auto;
    }

    /* Si el primer row es un bloque de texto, sin padding superior */
    .project-rows .project-row--text:first-child {
        padding-top: 0;
    }

    /* Overlay — los filtros bajan bajo el header (como el título del
       single) y el listado se alinea a la izquierda, máx 70vw */
    .cat-overlay.appear {
        display: flex;
        flex-direction: column;
    }

    .cat-overlay .overlay-filters {
        position: static;
        justify-content: flex-start;
        padding: calc(var(--header) + var(--padm)) var(--pad) var(--padm);
    }

    /* flex 1: el listado rellena todo el hueco hasta abajo y
       space-between reparte los items */
    .cat-overlay .project-list {
        flex: 1;
        width: 70vw;
        max-width: 70vw;
        margin: 0 0 0 var(--pad);
        min-height: 0;
    }

    /* Footer */
    #footer {
        grid-template-columns: 1fr;
        padding: var(--pad);
    }

    .single #main {
  padding-top: calc(var(--header) + 100px);
}
.home-row,
.project-row {
  margin-bottom: var(--padm);
}
.project-row--text{
    margin-bottom: 0;
}

    .project-text {
       text-align: left;
    }

}


/* ============================================================
   TELÉFONO — ≤ 768px
   ============================================================ */

@media only screen and (max-width: 768px) {

    :root {
        --real100:   100dvh; 
    }




}


/* ============================================================
   TELÉFONO PEQUEÑO — ≤ 480px
   ============================================================ */

@media only screen and (max-width: 480px) {

    :root {

    }

}


/* ============================================================
   HAMBURGER — base (visible solo en mobile)
   ============================================================ */

.mobile-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    width: 24px;
    height: 18px;
    margin-left: auto;
}

.mobile-menu .line {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--contrast);
    transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.mobile-menu.is-active .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu.is-active .line:nth-child(2) { opacity: 0; width: 0; }
.mobile-menu.is-active .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }