/**
 * WAYSHIP Projetos - CSS v3
 */

/* ===== BASE ===== */
html {
    overflow-x: hidden; /* garante que nenhum elemento vaze e crie scroll horizontal */
}

body.wayship-dark-theme {
    background-color: #111111;
    color: #f2f2f2;
    -webkit-font-smoothing: antialiased;
    margin-top: -80px;
    overflow-x: hidden;
}

.wayship-dark-theme .site-content,
.wayship-dark-theme main {
    background-color: #111111;
}

.wayship-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1024px) {
    .wayship-container {
        padding: 0 48px;
    }
}

.wayship-label {
    font-size: 12px;
    letter-spacing: 0.19em;
    text-transform: uppercase;
    color: #666666;
    font-weight: 400;
    line-height: 1.4;
}

/* ===================================================================
   HERO (Case Interno)
   =================================================================== */
.wayship-hero {
    position: relative;
    min-height: 80vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (min-width: 1024px) {
    .wayship-hero { min-height: 100vh; }
}

.wayship-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #111111 0%, rgba(17,17,17,0.6) 40%, rgba(17,17,17,0.2) 70%, transparent 100%);
}

.wayship-hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 24px 80px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .wayship-hero-content { padding: 80px 48px 120px; }
}

/* Botão Voltar */
.wayship-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #999999;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 40px;
    transition: color 0.3s ease;
}

.wayship-back:hover { color: #f2f2f2; }

.wayship-hero-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.wayship-hero-tax {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
}

.wayship-hero-title {
    font-size: clamp(40px, 8vw, 96px);
    font-weight: 700;
    line-height: 1.05;
    color: #ffffff;
    margin: 0;
}

.wayship-hero-subtitle {
    font-size: 18px;
    color: #999999;
    margin-top: 16px;
    max-width: 500px;
}

/* ===================================================================
   DESAFIO
   =================================================================== */
.wayship-challenge { padding: 80px 0; }

@media (min-width: 1024px) { .wayship-challenge { padding: 120px 0; } }

.wayship-challenge-grid { display: grid; gap: 48px; }

@media (min-width: 1024px) {
    .wayship-challenge-grid { grid-template-columns: 1fr 2fr; gap: 80px; }
}

.wayship-challenge-left .wayship-label { display: block; margin-bottom: 24px; }

.wayship-challenge-title {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: #f2f2f2;
}

.wayship-challenge-right .wayship-challenge-text {
    font-size: 18px;
    line-height: 1.7;
    color: #999999;
    margin-bottom: 24px;
}

.wayship-challenge-quote {
    margin: 40px 0 0;
    padding-left: 24px;
    border-left: 2px solid rgba(255,255,255,0.2);
    font-size: clamp(18px, 2vw, 24px);
    font-style: italic;
    color: #f2f2f2;
    line-height: 1.5;
}

/* ===================================================================
   GALERIA (Case Interno) — largura total, masonry 1-2 cols
   =================================================================== */
.wayship-gallery { padding: 0 0 60px; }

.wayship-gallery-masonry {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
    /* Full width sem scrollbar horizontal */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
}

@media (min-width: 768px) {
    .wayship-gallery-masonry {
        grid-template-columns: 1fr 1fr;
    }

    .wayship-gallery-item:first-child,
    .wayship-gallery-item.gallery-wide {
        grid-column: 1 / -1;
    }
}

.wayship-gallery-item {
    overflow: hidden;
    background: #181818;
    position: relative;
}

.wayship-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    aspect-ratio: 16/9;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.wayship-gallery-item.gallery-wide img {
    aspect-ratio: 21/9;
}

.wayship-gallery-item:hover img {
    transform: scale(1.03);
}

/* ===================================================================
   FICHA TÉCNICA
   =================================================================== */
.wayship-ficha-tecnica {
    padding: 80px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

@media (min-width: 1024px) { .wayship-ficha-tecnica { padding: 120px 0; } }

.wayship-ficha-grid { display: grid; gap: 48px; }

@media (min-width: 768px) {
    .wayship-ficha-grid { grid-template-columns: repeat(3, 1fr); gap: 64px; }
}

.wayship-ficha-heading {
    font-size: 14px;
    font-weight: 600;
    color: #f2f2f2;
    margin-bottom: 24px;
}

.wayship-ficha-list { list-style: none; padding: 0; margin: 0; }

.wayship-ficha-list li {
    font-size: 16px;
    color: #999999;
    margin-bottom: 12px;
}

.wayship-ficha-role { color: #666666; }

/* ===================================================================
   PRÓXIMOS PROJETOS
   =================================================================== */
.wayship-next-projects { padding: 80px 0; }

@media (min-width: 1024px) { .wayship-next-projects { padding: 120px 0; } }

.wayship-next-projects .wayship-label { display: block; margin-bottom: 48px; }

.wayship-next-grid { display: grid; gap: 24px; }

@media (min-width: 768px) {
    .wayship-next-grid { grid-template-columns: repeat(2, 1fr); }
}

.wayship-next-card a { text-decoration: none; color: inherit; }

.wayship-next-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #181818;
}

.wayship-next-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.wayship-next-card:hover .wayship-next-image img { transform: scale(1.05); }

.wayship-next-tax {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    display: block;
    margin-bottom: 8px;
}

.wayship-next-title {
    font-size: 22px;
    font-weight: 600;
    color: #f2f2f2;
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
}

.wayship-next-card:hover .wayship-next-title { color: #999999; }

/* ===================================================================
   PROJECT CARDS — MASONRY FULL WIDTH, GAP 10, ALINHADO NO TOPO
   ===================================================================
   Estratégia:
   - .wayship-masonry-full: 100vw, rompe o container do tema
   - .wayship-projects-masonry: grid 2 colunas, gap 10px
   - .wayship-col: flex coluna, gap 10px
   - SEM offset na segunda coluna — as colunas sempre iniciam no topo
   - A variação de altura natural das imagens cria o efeito masonry
   =================================================================== */

/* Wrapper que escapa do container e ocupa toda a largura — sem scrollbar horizontal */
.wayship-masonry-full {
    /* Margem negativa para romper o padding do container pai */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
    overflow: hidden; /* garante que não vaze */
}

/* Grid: layout flat 2 colunas — sem div .wayship-col separadas */
.wayship-projects-masonry {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .wayship-projects-masonry {
        grid-template-columns: 1fr 1fr;
        padding: 0;
        gap: 10px;
        align-items: start;
    }

    /* Cards full-width (reservado para uso futuro) */
    .wayship-card-full {
        grid-column: 1 / -1;
    }
}

/* Compatibilidade com layout de colunas legado */
.wayship-col {
    display: contents; /* transparente no grid — os cards ficam direto no masonry */
}

/* Card: sem margin extra — gap da coluna cuida do espaçamento */
.wayship-project-card {
    margin: 0;
    /* Fade-up de entrada */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.wayship-project-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delays escalonados por coluna */
.wayship-col:first-child .wayship-project-card:nth-child(1) { transition-delay: 0s; }
.wayship-col:first-child .wayship-project-card:nth-child(2) { transition-delay: 0.1s; }
.wayship-col:first-child .wayship-project-card:nth-child(3) { transition-delay: 0.2s; }
.wayship-col:first-child .wayship-project-card:nth-child(4) { transition-delay: 0.3s; }
.wayship-col:last-child  .wayship-project-card:nth-child(1) { transition-delay: 0.07s; }
.wayship-col:last-child  .wayship-project-card:nth-child(2) { transition-delay: 0.17s; }
.wayship-col:last-child  .wayship-project-card:nth-child(3) { transition-delay: 0.27s; }
.wayship-col:last-child  .wayship-project-card:nth-child(4) { transition-delay: 0.37s; }

/* ===================================================================
   CARD — background-image cover, SEM <img> visível, hover fade-up
   =================================================================== */

.wayship-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* O wrapper É a imagem — usa background-image */
.wayship-card-image-wrapper {
    position: relative;
    border-radius: 0; /* sem borda para visual full-bleed */
    overflow: hidden;
    background: #181818;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Pseudo-elemento faz o zoom fluido — sem espremer a imagem */
.wayship-card-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -6%;
    background: inherit;
    background-size: cover;
    background-position: center center;
    transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1);
    will-change: transform;
    z-index: 0;
}

.wayship-card-link:hover .wayship-card-image-wrapper::before {
    transform: scale(1.07);
}

.wayship-card-link:hover .wayship-card-image-wrapper {
    /* Sem mudança de background-size — o ::before cuida do zoom */
}
/* Aspect ratios */
.wayship-card-image-wrapper.aspect-16-10 { aspect-ratio: 16/10; }
.wayship-card-image-wrapper.aspect-1-1   { aspect-ratio: 1/1; }
.wayship-card-image-wrapper.aspect-16-9  { aspect-ratio: 16/9; }
.wayship-card-image-wrapper.aspect-3-4   { aspect-ratio: 3/4; }

/* Tall: sem aspect-ratio fixo — a imagem define a altura, mostrando tudo */
.wayship-card-image-wrapper.aspect-tall {
    aspect-ratio: auto;
    min-height: 400px; /* mínimo para não colapsar se não tiver img real */
    /* background-size: contain mostra a imagem inteira sem cortar */
    background-size: contain;
    background-color: #111111; /* fundo para as bordas laterais */
}
.wayship-card-image-wrapper.aspect-tall::before {
    background-size: contain;
}

/* <img> existe apenas para SEO/acessibilidade — invisível */
.wayship-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    pointer-events: none;
}

/* Overlay gradiente — aparece no hover */
.wayship-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.80) 0%,
        rgba(0,0,0,0.25) 45%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 1;
}

.wayship-card-link:hover .wayship-card-overlay {
    opacity: 1;
}

/* Conteúdo do card: fade up no hover */
.wayship-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 32px 32px;
    z-index: 2;
    /* Estado inicial: abaixo e invisível */
    transform: translateY(18px);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity   0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wayship-card-link:hover .wayship-card-content {
    transform: translateY(0);
    opacity: 1;
}

.wayship-card-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.wayship-card-tax {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
    color: #ffffff;
    letter-spacing: 0.03em;
}

.wayship-card-title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 0 4px;
}

.wayship-card-category {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* ===================================================================
   FILTROS — PILLS #f2f2f2 no hover e active
   =================================================================== */

/* Bar do shortcode [wayship_filtros] — respeita o container mas também
   funciona quando inserido fora dele */
.wayship-filtros-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .wayship-filtros-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0;
    }
}

.wayship-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wayship-filter-pill {
    padding: 9px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit; /* herda tipografia global, não impõe Inter */
    line-height: 1;
    letter-spacing: 0.01em;
}

.wayship-filter-pill:hover {
    background: rgba(242,242,242,0.12);
    color: #f2f2f2;
    border-color: rgba(242,242,242,0.35);
}

.wayship-filter-pill.active {
    background: #f2f2f2;
    color: #111111;
    border-color: #f2f2f2;
    font-weight: 600;
}

.wayship-filter-count {
    font-size: 14px;
    color: #999999;
    margin: 0;
    white-space: nowrap;
}

.wayship-filter-count strong { color: #f2f2f2; }

/* ===================================================================
   ARCHIVE PAGE
   =================================================================== */
.wayship-archive-hero { padding: 120px 0 48px; }

@media (min-width: 1024px) { .wayship-archive-hero { padding: 160px 0 64px; } }

.wayship-archive-grid { display: grid; gap: 48px; }

@media (min-width: 1024px) {
    .wayship-archive-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
}

.wayship-archive-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    color: #f2f2f2;
    margin: 0;
}

.wayship-archive-intro { display: flex; align-items: center; }

.wayship-archive-intro p {
    font-size: 18px;
    line-height: 1.6;
    color: #999999;
    max-width: 500px;
}

.wayship-archive-filters { padding: 24px 0 32px; }

.wayship-filters-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .wayship-filters-wrap {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.wayship-archive-grid-section { padding: 0 0 80px; }

/* Paginação */
.wayship-pagination {
    display: flex;
    justify-content: center;
    margin-top: 64px;
    gap: 8px;
}

.wayship-pagination a,
.wayship-pagination span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.1);
    color: #999999;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wayship-pagination a:hover { background: rgba(255,255,255,0.05); color: #f2f2f2; }

.wayship-pagination .current {
    background: #f2f2f2;
    color: #111111;
    border-color: #f2f2f2;
}

/* ===================================================================
   EMPTY STATE
   =================================================================== */
.wayship-no-projects,
.wayship-no-results {
    text-align: center;
    padding: 80px 0;
    color: #999999;
    font-size: 18px;
}

/* ===================================================================
   GALLERY ITEM SCROLL ANIMATION
   =================================================================== */
.wayship-gallery-item,
.wayship-next-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.wayship-gallery-item.is-visible,
.wayship-next-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
