/* ==========================================================
   Proyecto: Hero
   ========================================================== */

.pwb-proyecto-hero {
    position: relative;
    overflow: hidden;
    padding: var(--wp--preset--spacing--px-120) 0 var(--wp--preset--spacing--px-80);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-block-start: 0;
}

.pwb-proyecto-hero--placeholder {
    min-height: 420px;
    background: var(--wp--preset--color--custom-pwb-main-background);
}

.pwb-proyecto-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    background-color: var(--wp--preset--color--custom-pwb-main-background);
}

.pwb-proyecto-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 78% 15%, rgba(124,92,255,0.28), transparent 70%),
        radial-gradient(50% 50% at 95% 55%, rgba(255,90,46,0.20), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.pwb-proyecto-hero__scrim {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(860px, 58%);
    background: rgba(12, 17, 23, 0.62);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 78%, transparent 100%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 78%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.pwb-proyecto-hero__inner {
    /* Content width/centering/mobile padding come from .pwb-content-width
       (see render.php) — kept in sync with the site's real content edge
       instead of its own hardcoded number. */
    position: relative;
    z-index: 3;
}

.pwb-proyecto-hero__tags {
    display: flex;
    gap: var(--wp--preset--spacing--px-8);
    flex-wrap: wrap;
    margin-bottom: var(--wp--preset--spacing--px-20);
}

.pwb-proyecto-hero__title {
    font-family: var(--wp--preset--font-family--sora, Sora, sans-serif);
    font-size: clamp(36px, 5.2vw, 72px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 820px;
    margin-bottom: var(--wp--preset--spacing--px-20);
    color: var(--wp--custom--color--white);
}

.pwb-proyecto-hero__lede {
    font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
    font-size: var(--wp--custom--font-size--base-plus);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin-bottom: var(--wp--preset--spacing--px-48);
}

.pwb-proyecto-hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--wp--custom--radius--xl);
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    max-width: 880px;
}

.pwb-proyecto-hero__meta-cell {
    padding: var(--wp--preset--spacing--px-22) var(--wp--preset--spacing--px-24);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 17, 23, 0.55);
}

.pwb-proyecto-hero__meta-cell:last-child {
    border-right: none;
}

.pwb-proyecto-hero__meta-label {
    font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
    font-size: var(--wp--preset--font-size--2-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    margin-bottom: var(--wp--preset--spacing--px-6);
}

.pwb-proyecto-hero__meta-label--gap {
    margin-top: var(--wp--preset--spacing--px-14);
}

.pwb-proyecto-hero__meta-value {
    font-family: var(--wp--preset--font-family--inter, Inter, sans-serif);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.pwb-proyecto-hero__meta-value--sm {
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
}

.pwb-proyecto-hero__dims {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--px-6);
    margin-top: var(--wp--preset--spacing--px-6);
}

.pwb-proyecto-hero__bar {
    height: 5px;
    border-radius: var(--wp--custom--radius--sm);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: var(--wp--preset--spacing--px-6);
}

.pwb-proyecto-hero__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--wp--preset--color--custom-pwb-primary-color), rgba(255, 153, 0, 0.65));
    border-radius: var(--wp--custom--radius--sm);
}

@media (max-width: 781px) {
    .pwb-proyecto-hero__meta {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .pwb-proyecto-hero__meta-cell {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .pwb-proyecto-hero__meta-cell:last-child {
        border-bottom: none;
    }
}

@media (max-width: 640px) {
    .pwb-proyecto-hero {
        padding: var(--wp--preset--spacing--px-80) 0 var(--wp--preset--spacing--px-60);
    }

    .pwb-proyecto-hero__scrim {
        width: 100%;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* =====================================================
   PROYECTOS — rejilla con filtro (página /proyectos/)
   ===================================================== */

/* Mismo espaciado que Recursos (.pwb-yt-resources): 14px arriba y 80px abajo
   del bloque, 40px entre la barra de filtro y los resultados — así el título
   de la página queda a la misma distancia del filtro en las dos páginas. */
.pwb-proyectos-grid {
    padding-block: var(--wp--preset--spacing--px-14) var(--wp--preset--spacing--px-80);
}

/* Barra de filtro compartida (.pwb-filter-bar, ver sección FILTER BUTTON);
   aquí solo el espacio hasta la rejilla. */
.pwb-proyectos-grid .pwb-filter-bar {
    margin-bottom: var(--wp--preset--spacing--px-40);
}

/* Misma rejilla que la de vídeos de Recursos (3 / 2 / 1 columnas, 24px de
   separación, mismos puntos de corte): con el mismo ancho y la proporción 16:9
   de la tarjeta, una tarjeta de proyecto mide exactamente lo mismo que una de
   vídeo. */
.pwb-proyectos-grid__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--px-24);
}

@media (max-width: 960px) {
    .pwb-proyectos-grid__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .pwb-proyectos-grid__items { grid-template-columns: 1fr; }
}

/* Tarjeta de proyecto: imagen con fase y sector encima y, debajo de ella, el
   bloque de información (título, descripción corta —PWB_PROYECTOS_CARD_WORDS
   palabras, ver functions.php—, dimensiones y enlace "Ver proyecto"). Las
   tarjetas de una misma fila se igualan en alto (el pie queda abajo). */
.pwb-proyectos-grid__card {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    background: #0f141b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--wp--custom--radius--md-plus);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.pwb-proyectos-grid__card:hover,
.pwb-proyectos-grid__card:focus-visible {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Área de imagen con la proporción de la imagen del hero (1900 × 960 px, la
   recomendada en el editor): con esa imagen no se recorta nada. Si se sube otra
   proporción se recorta a esta (cover), fuera del flujo (absolute): ni su
   tamaño ni su proporción pueden cambiar el de la tarjeta. */
.pwb-proyectos-grid__card-media {
    position: relative;
    aspect-ratio: 1900 / 960;
    overflow: hidden;
    background: var(--wp--preset--color--custom-pwb-secondary-background);
}

.pwb-proyectos-grid__card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.pwb-proyectos-grid__card:hover .pwb-proyectos-grid__card-media img {
    transform: scale(1.03);
}

.pwb-proyectos-grid__card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wp--preset--color--custom-pwb-secondary-background) 0%, var(--wp--preset--color--custom-pwb-secondary-background) 100%);
}

.pwb-proyectos-grid__card-badges {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--px-6);
}

/* Bloque de información: va completamente por debajo de la imagen, con fondo
   opaco. */
.pwb-proyectos-grid__card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: var(--wp--preset--spacing--px-16);
    background: #0f141b;
}

.pwb-proyectos-grid__card-title {
    font-family: 'Sora', sans-serif;
    font-size: var(--wp--custom--font-size--md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--wp--custom--color--white);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pwb-proyectos-grid__card-desc {
    font-family: var(--wp--preset--font-family--inter);
    font-size: var(--wp--preset--font-size--sm-plus);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    margin: var(--wp--preset--spacing--px-6) 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pwb-proyectos-grid__card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--px-8) var(--wp--preset--spacing--px-12);
    margin-top: auto;
    padding-top: var(--wp--preset--spacing--px-12);
}

.pwb-proyectos-grid__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--px-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* "Ver proyecto →": mismo estilo que los enlaces del pie (.pwb-footer-link:
   blanco, sin subrayar, y 70% de opacidad al pasar el ratón). Es un <span>
   porque la tarjeta entera ya es el enlace, así que el hover se lee de la
   tarjeta. */
.pwb-proyectos-grid__card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--px-4);
    margin-left: auto;
    font-family: var(--wp--preset--font-family--inter);
    font-size: 0.8125rem;
}

.pwb-proyectos-grid__card-cta svg {
    width: 14px;
    height: 14px;
}

.pwb-proyectos-grid__card:hover .pwb-proyectos-grid__card-cta,
.pwb-proyectos-grid__card:focus-visible .pwb-proyectos-grid__card-cta {
    opacity: 0.7;
}

/* Ficha de proyecto (single-proyectos.html): contenido bajo el hero. */
.pwb-proyecto-main {
    padding-top: var(--wp--preset--spacing--px-80);
    padding-bottom: var(--wp--preset--spacing--px-120);
}

/* =====================================================
   404
   ===================================================== */

.pwb-404 {
    background-color: var(--wp--preset--color--custom-pwb-main-background, #0c1117);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: var(--wp--preset--spacing--px-120);
}

.pwb-404__text {
    color: rgba(255, 255, 255, 0.9);
    margin-top: -8px;
    margin-bottom: var(--wp--preset--spacing--px-40);
}

.pwb-proyectos-grid__empty {
    text-align: center;
    color: var(--wp--custom--color--text-muted);
    padding: var(--wp--preset--spacing--px-60) 0;
    grid-column: 1 / -1;
}
