/* Portfolio Hero */
.portfolio-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../Src/imagens/bg_hero.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 150px 0 100px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.portfolio-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Projects Grid */
.projects-grid {
    padding: 120px 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.projects-grid .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-filter {
    text-align: center;
    margin: 0 auto 60px auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 20px;
    max-width: 800px;
    width: 100%;
}

.filter-btn {
    background: none;
    border: 2px solid #e53e3e;
    color: #e53e3e;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.filter-btn:hover::before,
.filter-btn.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(229, 62, 62, 0.3);
}

.filter-btn:active {
    transform: translateY(-1px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.project-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: transparent !important;
    border-radius: 12px 12px 0 0;
    margin: 8px 8px 0 8px;
    transition: all 0.5s ease;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.45, 0.45, 0.95);
    opacity: 1 !important;
    filter: none !important;
    visibility: visible !important;
    display: block !important;
    background: none !important;
    mix-blend-mode: normal !important;
    z-index: 1;
}

.project-item:hover .project-image {
    margin: 0;
    border-radius: 0;
}

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

.project-image > a {
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(229, 62, 62, 0.85);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(10px);
    pointer-events: none;
}

.project-item:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay span {
    color: white;
    background: transparent;
    padding: 12px 28px;
    border: 2px solid white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.overlay:hover span {
    background: white;
    color: #e53e3e;
    transform: translateY(-3px);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin: 0 0 10px;
    color: #333;
}

.project-info p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* Image Slider */
.image-slider {
    padding: 100px 0;
    background-color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.image-slider h2 {
    margin-bottom: 15px;
    color: #222;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.image-slider p {
    color: #666;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.slider-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
}

.slide {
    min-width: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 8s cubic-bezier(0.2, 0.6, 0.2, 1);
    display: block;
}

.slide.active img {
    transform: scale(1.05);
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    color: white;
    padding: 40px;
    text-align: left;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.slide.active .slide-caption {
    transform: translateY(0);
    opacity: 1;
}

.slide-caption h3 {
    margin: 0 0 15px;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: #fff;
}

.slide-caption p {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 80%;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #e53e3e;
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
    visibility: visible;
}

.slider-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 30px;
}

.slider-btn.next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    padding: 10px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: #e53e3e;
    transform: scale(1.2);
}

.slider-dots .dot:hover {
    background: #fff;
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-caption {
        padding: 25px;
    }
    
    .slide-caption h3 {
        font-size: 2rem;
    }
    
    .slide-caption p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .slider {
        height: 50vh;
        min-height: 300px;
    }
    
    .slider-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .slider-btn.prev {
        left: 15px;
    }
    
    .slider-btn.next {
        right: 15px;
    }
    
    .slide-caption {
        padding: 20px;
    }
    
    .slide-caption h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .slide-caption p {
        font-size: 1rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 40vh;
        min-height: 250px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-dots .dot {
        width: 8px;
        height: 8px;
    }
}


.slider-btn:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 8px 30px rgba(229, 62, 62, 0.3);
}

.slider-btn.prev {
    left: 40px;
}

.slider-btn.next {
    right: 40px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    padding: 0 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: #e53e3e;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Animation for slide content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-caption h3,
.slide-caption p {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-caption p {
    animation-delay: 0.2s;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover,
.dot.active {
    background: #e53e3e;
    border-color: white;
    transform: scale(1.2);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="rgba(255,255,255,0.03)" d="M30,10L50,30L70,10L90,30L90,70L70,90L50,70L30,90L10,70L10,30L30,10Z"></path></svg>');
    background-size: 100px;
    opacity: 0.3;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-section p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.cta-section .btn-primary {
    background: white;
    color: #e53e3e;
    padding: 18px 45px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cta-section .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s ease;
}

.cta-section .btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.cta-section .btn-primary:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

.cta-section .btn-primary:active {
    transform: translateY(-2px);
}

/* Lightbox Customization */
.lb-data .lb-caption {
    font-size: 16px;
    line-height: 1.4;
}

.lb-data .lb-close {
    background: url('../Src/icones/close.svg') no-repeat center center;
    width: 30px;
    height: 30px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lb-data .lb-close:hover {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .section-filter {
        gap: 10px;
        margin-bottom: 45px;
    }
    
    .filter-btn {
        padding: 10px 22px;
        font-size: 0.95rem;
    }
}

@media (max-width: 1200px) {
    .slide img {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-caption {
        padding: 30px;
    }
    
    .slide-caption h3 {
        font-size: 2rem;
    }
    
    .slide-caption p {
        font-size: 1.1rem;
        max-width: 100%;
    }
    
    .slider-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .slider-btn.prev {
        left: 15px;
    }
    
    .slider-btn.next {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        padding: 60px 0;
    }
    
    .slider-container {
        padding: 0 10px;
    }
    
    .slide img {
        height: 50vh;
        min-height: 300px;
    }
    
    .slide-caption {
        padding: 25px 20px;
    }
    
    .slide-caption h3 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .slide-caption p {
        font-size: 1rem;
    }
    
    .slider-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) scale(0.8);
    }
    
    .slider-dots {
        bottom: 20px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .section-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 20px 25px;
        margin: 0 -20px 40px;
        scrollbar-width: none;
    }
    
    .section-filter::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
}

@media (max-width: 992px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .slide img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 100px 20px;
    }
    
    .portfolio-hero h1 {
        font-size: 2.5rem;
    }
    
    .slide img {
        height: 300px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 220px;
    }
    
    .slide img {
        height: 250px;
    }
    
    .slide-caption h3 {
        font-size: 1.2rem;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
}
