/* Page Background */
.projetos-page-main {
    background-color: #F8F7F5;
}

/* ================================================
   PROJETOS HERO SECTION
   ================================================ */
.projetos-hero {
    position: relative;
    min-height: 380px;
    height: 45vh;
    max-height: 500px;
    width: 100%;
    background-image: url('../assets/bg-hero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    margin-top: 0;
    padding-top: 110px;
}

.projetos-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(8, 18, 14, 0.55) 0%, rgba(8, 18, 14, 0.45) 60%, rgba(8, 18, 14, 0.75) 100%);
    z-index: 1;
}

.projetos-hero-container {
    position: relative;
    z-index: 2;
    padding-bottom: 56px;
    width: 100%;
}

.projetos-hero-content {
    max-width: 720px;
    text-align: left;
}

.projetos-hero-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
}

.projetos-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4rem);
    color: #FFFFFF;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.projetos-hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    line-height: 1.6;
    max-width: 580px;
}

/* ================================================
   SECTIONS & SECTION HEADERS
   ================================================ */
.projetos-lista {
    background: transparent;
}

.projetos-andamento {
    padding: 80px 0 60px;
}

.projetos-concluidos {
    padding: 40px 0 120px;
}

.projetos-section-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.projetos-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(42, 157, 143, 0.1);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(42, 157, 143, 0.2);
}

.projetos-section-badge.completed {
    background: rgba(13, 13, 13, 0.06);
    color: #08120E;
    border-color: rgba(13, 13, 13, 0.12);
}

.projetos-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Blinking Dot Animation for "Em Obras" */
@keyframes badge-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.6);
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
        box-shadow: 0 0 0 6px rgba(42, 157, 143, 0);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(42, 157, 143, 0);
    }
}

.projetos-section-badge:not(.completed) .projetos-badge-dot {
    animation: badge-pulse 1.8s infinite ease-in-out;
}

.projetos-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--text-primary);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ================================================
   CARD REDESIGN
   ================================================ */
.full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.projeto-card {
    aspect-ratio: auto !important;
    height: auto !important;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.projeto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
    border-color: rgba(42, 157, 143, 0.3);
}

.projeto-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eaeaea;
}

.projeto-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out);
}

.projeto-card:hover .projeto-card-thumb img {
    transform: scale(1.05);
}

.projeto-card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(8, 18, 14, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.projeto-card-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    background: #FFFFFF;
}

.projeto-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.projeto-card-title {
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    font-family: var(--font-body);
}

.projeto-card-meta {
    font-size: 0.86rem;
    color: var(--text-secondary);
    font-weight: 400;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.projeto-card-meta-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.25);
}

.btn-ver-projeto {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #08120E;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid rgba(8, 18, 14, 0.2);
    background: transparent;
    transition: all 0.25s var(--ease);
    align-self: flex-start;
}

.projeto-card:hover .btn-ver-projeto {
    background: #08120E;
    color: #FFFFFF;
    border-color: #08120E;
}

.btn-ver-projeto svg {
    transition: transform 0.25s var(--ease);
}

.projeto-card:hover .btn-ver-projeto svg {
    transform: translateX(4px);
}

/* ================================================
   PROJECT MODAL
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration) var(--ease);
    padding: 40px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-primary);
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    position: relative;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform var(--duration) var(--ease);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.modal-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 600px;
}

/* Gallery */
.modal-gallery {
    padding: 32px;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-right: 1px solid var(--border);
}

.modal-gallery-main {
    flex: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    max-height: 400px;
}

.modal-gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.modal-gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--duration-fast) var(--ease);
    border: 2px solid transparent;
}

.modal-gallery-thumbs img:hover,
.modal-gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--accent);
}

/* Info */
.modal-info {
    padding: 48px 48px 48px 40px;
    display: flex;
    flex-direction: column;
}

.modal-info-header {
    margin-bottom: 32px;
}

.modal-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(42, 157, 143, 0.1);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.modal-info-header h2 {
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.modal-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-item.full-width {
    grid-column: 1 / -1;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.spec-value {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
}

.modal-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

@media (max-width: 1024px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
    }

    .modal-gallery {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .modal-container {
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 16px;
    }

    .modal-info {
        padding: 32px 24px;
    }

    .modal-gallery {
        padding: 24px;
    }

    .projetos-hero {
        min-height: 300px;
        height: auto;
        padding-top: 100px;
        padding-bottom: 24px;
        background-image: url('../assets/bg-hero-mobile.webp');
    }

    .projetos-hero-container {
        padding-bottom: 24px;
    }

    .projetos-andamento {
        padding: 48px 0 40px;
    }

    .projetos-concluidos {
        padding: 32px 0 80px;
    }

    .full-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .projeto-card-body {
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .projeto-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .btn-ver-projeto {
        align-self: flex-start;
    }
}