/* ============================
   SEÇÃO DE PROJETOS - LAYOUT EDITORIAL
   ============================ */

:root {
    --project-gap: 30px;
    --project-gap-mobile: 15px;
    --transition-smooth: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --overlay-dark: rgba(0, 0, 0, 0.65);
    --text-light: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-secondary: #666666;
    --border-light: #E5E5E5;
    --bg-off-white: #FAFAFA;
}

/* Seção Principal de Projetos */
.projects-section {
    padding: 120px 0;
    background: var(--bg-off-white);
    position: relative;
}

.projects-section.home-section {
    padding: 100px 0 120px;
}

/* Container */
.projects-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Header da Seção */
.projects-header {
    margin-bottom: 80px;
    text-align: center;
}

.projects-header.with-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.projects-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 56px;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-dark);
    margin: 0 0 15px;
    position: relative;
    display: inline-block;
}

.projects-header.with-filters .projects-title::after {
    left: 0;
    transform: none;
}

.projects-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin: 30px 0 0;
}

/* Filtros */
.projects-filter {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
}

/* Grid Editorial Assimétrico */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--project-gap);
    grid-auto-rows: 280px;
    position: relative;
}

/* Itens do Grid */
.project-item {
    position: relative;
    overflow: hidden;
    background: #F5F5F5;
    cursor: pointer;
    transition: transform var(--transition-smooth);
}

.project-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Tamanhos dos Cards */
.project-item.size-large {
    grid-column: span 8;
    grid-row: span 2;
}

.project-item.size-wide {
    grid-column: span 6;
    grid-row: span 1;
}

.project-item.size-tall {
    grid-column: span 4;
    grid-row: span 2;
}

.project-item.size-regular {
    grid-column: span 4;
    grid-row: span 1;
}

.project-item.size-small {
    grid-column: span 3;
    grid-row: span 1;
}

/* Imagem do Projeto */
.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover .project-image {
    transform: scale(1.1);
}

/* Overlay com Informações */
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--overlay-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

/* Número do Projeto */
.project-number {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 72px;
    font-weight: 700;
    color: var(--text-light);
    opacity: 0.15;
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1;
    transition: opacity var(--transition-smooth);
}

.project-item:hover .project-number {
    opacity: 0.3;
}

/* Categoria Tag */
.project-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
    width: fit-content;
    font-weight: 600;
}

/* Info do Projeto */
.project-info {
    transform: translateY(20px);
    transition: transform var(--transition-smooth);
}

.project-item:hover .project-info {
    transform: translateY(0);
}

.project-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    color: var(--text-light);
    margin: 0 0 10px;
    line-height: 1.2;
}

.project-item.size-regular .project-name,
.project-item.size-small .project-name {
    font-size: 24px;
}

.project-meta {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* CTA View Project */
.project-cta {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform var(--transition-smooth);
}

.project-item:hover .project-cta {
    transform: scale(1);
}

.project-cta svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-dark);
    stroke-width: 2;
}

/* Ver Todos os Projetos Button */
.projects-more {
    text-align: center;
    margin-top: 80px;
}

.btn-more-projects {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    background: var(--text-dark);
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all var(--transition-smooth);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-more-projects:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-more-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-more-projects:hover::before {
    left: 100%;
}

/* Animação de Entrada */
.project-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }
.project-item:nth-child(7) { animation-delay: 0.7s; }
.project-item:nth-child(8) { animation-delay: 0.8s; }

/* Responsividade */
@media (max-width: 1200px) {
    .projects-container {
        padding: 0 40px;
    }

    .projects-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 20px;
    }

    .project-item.size-large {
        grid-column: span 5;
    }

    .project-item.size-wide {
        grid-column: span 4;
    }

    .project-item.size-tall {
        grid-column: span 3;
    }

    .project-item.size-regular {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding: 80px 0;
    }

    .projects-container {
        padding: 0 20px;
    }

    .projects-header {
        margin-bottom: 50px;
    }

    .projects-title {
        font-size: 36px;
    }

    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--project-gap-mobile);
        grid-auto-rows: 200px;
    }

    .project-item.size-large {
        grid-column: span 4;
        grid-row: span 2;
    }

    .project-item.size-wide {
        grid-column: span 4;
        grid-row: span 1;
    }

    .project-item.size-tall {
        grid-column: span 2;
        grid-row: span 2;
    }

    .project-item.size-regular {
        grid-column: span 2;
        grid-row: span 1;
    }

    .project-overlay {
        opacity: 1;
        padding: 25px;
        background: linear-gradient(180deg, transparent 40%, var(--overlay-dark) 100%);
    }

    .project-info {
        transform: none;
    }

    .project-name {
        font-size: 20px;
    }

    .project-number {
        font-size: 48px;
    }

    .project-cta {
        transform: scale(1);
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .projects-filter {
        justify-content: center;
        margin-top: 30px;
    }

    .projects-header.with-filters {
        flex-direction: column;
        text-align: center;
    }

    .projects-header.with-filters .projects-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .project-item.size-large,
    .project-item.size-wide,
    .project-item.size-tall,
    .project-item.size-regular {
        grid-column: span 1;
        grid-row: span 1;
    }

    .project-item.size-large {
        grid-row: span 2;
    }
}

/* Loading Skeleton */
.project-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}