/* ========================================================================== */
/* PORTFÓLIO CSS - HGRÁFICA */
/* ========================================================================== */

/* HERO PORTFÓLIO */
.portfolio-hero {
    background: linear-gradient(135deg, #1a5e1a 0%, #0a280a 100%);
    color: white;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Partículas animadas */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    top: 50%;
    left: 50%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }
    33% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.6;
    }
    66% {
        transform: translateY(-15px) translateX(-15px) scale(0.9);
        opacity: 0.4;
    }
}

.hero-content-portfolio {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-text-portfolio {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title-portfolio {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
}

.title-line {
    display: block;
}

.accent-word {
    color: #e53935;
    font-size: 4.5rem;
}

.hero-description-portfolio {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 50px;
    line-height: 1.7;
}

/* STATS PORTFÓLIO */
.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-portfolio {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-portfolio:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-portfolio .stat-icon {
    width: 50px;
    height: 50px;
    background: #e53935;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-portfolio .stat-info {
    text-align: left;
}

.stat-portfolio .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-portfolio .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================================================== */
/* FILTROS */
/* ========================================================================== */

.portfolio-filters {
    background: #f5f5f5;
    padding: 40px 0;
    border-bottom: 2px solid #e0e0e0;
}

.filters-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: white;
    border: 2px solid #2e7d32;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #2e7d32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.filter-btn.active {
    background: #d32f2f;
    border-color: #d32f2f;
    color: white;
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.4);
}

.filter-btn i {
    font-size: 1rem;
}

/* ========================================================================== */
/* GALERIA DE PROJETOS */
/* ========================================================================== */

.portfolio-gallery {
    background: white;
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-bottom: 60px;
}

/* ITEM DO PORTFÓLIO */
.portfolio-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* IMAGEM */
.item-image {
    position: relative;
    padding-top: 75%; /* Proporção 4:3 */
    overflow: hidden;
    background: #f0f0f0;
}

.item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* OVERLAY */
.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9) 0%, rgba(211, 47, 47, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.view-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #2e7d32;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
}

.portfolio-item:hover .view-btn {
    transform: scale(1);
}

.view-btn:hover {
    background: #d32f2f;
    color: white;
    transform: scale(1.1);
}

/* INFO DO ITEM */
.item-info {
    padding: 25px;
}

.item-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0B1A39;
    margin-bottom: 10px;
    line-height: 1.3;
}

.item-description {
    font-size: 0.95rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* TAGS */
.item-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid #c8e6c9;
}

/* ========================================================================== */
/* BOTÃO CARREGAR MAIS */
/* ========================================================================== */

.load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #0a280a 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(46, 125, 50, 0.4);
}

/* ========================================================================== */
/* CTA FINAL */
/* ========================================================================== */

.cta-portfolio {
    background: linear-gradient(135deg, #0B1A39 0%, #1a2f5a 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0,50 Q25,25 50,50 T100,50" stroke="rgba(255,255,255,0.05)" fill="none"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-text h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.cta-text p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    background: #128C7E;
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

/* ========================================================================== */
/* LIGHTBOX MODAL */
/* ========================================================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    font-size: 1.2rem;
    margin-top: 20px;
    text-align: center;
}

/* BOTÕES DO LIGHTBOX */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close {
    top: 30px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

/* ========================================================================== */
/* ANIMAÇÕES DE FILTRO */
/* ========================================================================== */

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

.portfolio-item.visible {
    opacity: 1;
    transform: scale(1);
    position: relative;
}

/* ========================================================================== */
/* RESPONSIVIDADE */
/* ========================================================================== */

/* TABLET */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .hero-title-portfolio {
        font-size: 3.5rem;
    }

    .accent-word {
        font-size: 4rem;
    }

    .portfolio-stats {
        gap: 25px;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 120px 0 60px;
        min-height: 50vh;
    }

    .hero-title-portfolio {
        font-size: 2.8rem;
    }

    .accent-word {
        font-size: 3.2rem;
    }

    .hero-description-portfolio {
        font-size: 1.1rem;
    }

    .portfolio-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .stat-portfolio {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .filters-wrapper {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .cta-text h2 {
        font-size: 2.2rem;
    }

    .cta-text p {
        font-size: 1.1rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* MOBILE PEQUENO */
@media (max-width: 480px) {
    .hero-title-portfolio {
        font-size: 2.2rem;
    }

    .accent-word {
        font-size: 2.6rem;
    }

    .hero-description-portfolio {
        font-size: 1rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .item-title {
        font-size: 1.1rem;
    }

    .item-description {
        font-size: 0.9rem;
    }

    .cta-text h2 {
        font-size: 1.8rem;
    }

    .cta-text p {
        font-size: 1rem;
    }
}
