/**
 * CSS do Portfólio
 * 
 * @package ViniciusSoaresDev
 */

:root {
    --portfolio-primary: #f5f5f5;
    --portfolio-dark: #2c2c2c;
    --portfolio-light: #f8f9fa;
    --portfolio-accent: #007bff;
    --portfolio-text: #6c757d;
    --portfolio-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --portfolio-border: rgba(0, 0, 0, 0.08);
}

/* ===== HEADER DO PORTFÓLIO ===== */
.portfolio-header-section {
    padding: 10px 0 5px;
    background-color: var(--portfolio-primary);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.portfolio-title-section {
    flex: 1;
}

.portfolio-main-title {
    font-size: 59px;
    font-weight: 400;
    margin-bottom: 0;
    letter-spacing: -0.5px;
    color: var(--portfolio-dark);
}

.portfolio-subtitle {
    font-size: 1rem;
    color: var(--portfolio-text);
    font-weight: 300;
    margin-top: 0.5rem;
}

/* ===== FILTROS ===== */
.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-top: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    color: var(--portfolio-dark);
    cursor: pointer;
    transition: var(--portfolio-transition);
    text-transform: capitalize;
    letter-spacing: 0px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--portfolio-dark);
    color: white;
    border-color: var(--portfolio-dark);
    transform: none;
}

/* ===== GRID DO PORTFÓLIO ===== */
.portfolio-section {
    padding: 0 0 80px;
    background-color: var(--portfolio-primary);
}

.portfolio-section .container {
    overflow: hidden;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 0;
}

/* ===== CARD DO PORTFÓLIO (PADRÃO PARA TODOS) ===== */
.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--portfolio-transition);
    cursor: pointer;
    height: 320px;
    width: 100%;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-item-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--portfolio-transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--portfolio-transition);
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.08);
}

.portfolio-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: var(--portfolio-transition);
    line-height: 1.3;
    max-width: 90%;
}

.portfolio-category {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
    transform: translateY(20px);
    transition: var(--portfolio-transition);
}

.portfolio-item:hover .portfolio-title,
.portfolio-item:hover .portfolio-category {
    transform: translateY(0);
}

/* ===== RELATED PROJECTS SECTION ===== */
.related-projects-section {
    margin: 60px 0 40px;
    background-color: var(--portfolio-primary);
    overflow: hidden;
    width: 100%;
    position: relative;
}

.related-projects-section .related-title {
    font-size: 2.2rem;
    font-weight: 500;
    color: rgb(34, 34, 34);
    margin-bottom: 40px;
}

.related-projects-section .container {
    overflow: hidden !important;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
}

.related-projects-section .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.related-projects-section .portfolio-item {
    height: 300px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
}

.related-projects-section .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== SHORTCODE STYLES ===== */
.portfolio-shortcode-grid {
    margin: 30px 0;
}

.portfolio-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--portfolio-transition);
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-card-link {
    text-decoration: none;
    display: block;
}

.portfolio-card-image {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.08);
}

.portfolio-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--portfolio-transition);
    padding: 20px;
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.portfolio-card-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: var(--portfolio-transition);
    line-height: 1.3;
    max-width: 90%;
}

.portfolio-card-category {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
    transform: translateY(20px);
    transition: var(--portfolio-transition);
}

.portfolio-card:hover .portfolio-card-title,
.portfolio-card:hover .portfolio-card-category {
    transform: translateY(0);
}

/* ===== ANIMAÇÕES ===== */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.hidden {
    display: none !important;
}

/* ===== LOADING ===== */
.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    color: var(--portfolio-dark);
    font-size: 16px;
    position: relative;
    padding-left: 40px;
}

.loading-spinner:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--portfolio-dark);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ===== BOTÃO VER MAIS ===== */
.btn-ver-mais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--portfolio-dark);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 36px;
    border: 2px solid var(--portfolio-dark);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-ver-mais:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--portfolio-dark);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-ver-mais:hover {
    color: #ffffff;
}

.btn-ver-mais:hover:before {
    left: 0;
}

.btn-ver-mais i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-ver-mais:hover i {
    transform: translateX(8px);
}

/* ===== PÁGINA INDIVIDUAL DO PROJETO ===== */

/* Hero */
.project-hero {
    margin-top: 80px;
    padding: 30px 0 20px;
    background-color: var(--portfolio-primary);
}

.project-category {
    font-size: 12px;
    color: var(--portfolio-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    margin-bottom: 8px;
}

.project-title {
    font-size: 50px;
    font-weight: 500;
    color: rgb(34, 34, 34);
    margin-bottom: 12px;
    line-height: 1.2;
}

.project-description {
    font-size: 17px;
    color: rgba(34, 34, 34, 0.8);
    line-height: 1.5;
    width: 100%;
    margin-bottom: 0px;
}

.project-description p {
    margin-bottom: 0;
}

/* Detalhes */
.project-details {
    padding: 15px 0;
    border-top: 1px solid var(--portfolio-border);
    border-bottom: 1px solid var(--portfolio-border);
    margin: 20px 0;
    background-color: var(--portfolio-primary);
}

.detail-item {
    margin-bottom: 12px;
    padding: 5px 0;
}

.detail-label {
    font-size: 13px;
    color: var(--portfolio-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    font-weight: 500;
}

.detail-value {
    font-size: 16px;
    color: rgb(34, 34, 34);
    font-weight: 400;
    line-height: 1.3;
}

.detail-value a {
    color: var(--portfolio-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.detail-value a:hover {
    color: #000;
    text-decoration: underline;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 5px;
    justify-content: center;
}

.tag {
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: rgb(34, 34, 34);
    line-height: 1.3;
}

/* Conteúdo */
.project-content {
    background-color: var(--portfolio-primary);
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 2.2rem;
    font-weight: 500;
    color: rgb(34, 34, 34);
    margin: 19px 0 19px;
    line-height: 34px;
}

.content-section p {
    font-size: 17px;
    color: rgba(34, 34, 34, 0.8);
    line-height: 25px;
    margin-bottom: 15px;
    font-weight: 400;
}

.project-image {
    width: 90%;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Galeria do Projeto */
.project-gallery {
    margin: 60px 0;
}

.project-gallery h2 {
    font-size: 2.2rem;
    font-weight: 500;
    color: rgb(34, 34, 34);
    margin-bottom: 15px;
}

.project-gallery p {
    color: var(--portfolio-text);
    margin-bottom: 30px;
}

.gallery-grid {
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnail {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: block;
}

.gallery-item:hover .gallery-thumbnail {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1.2);
}

/* CTA */
.project-cta {
    padding: 40px 0;
    background-color: var(--portfolio-primary);
}

.project-cta h2 {
    font-size: 38px;
    font-weight: 700;
    color: #222;
    line-height: 0.9;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.project-cta p {
    font-size: 17px;
    color: #666;
    font-weight: 400;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.project-cta .btn {
    background: transparent;
    border: 2px solid var(--portfolio-dark);
    color: var(--portfolio-dark);
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition-delay: 0s !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.project-cta .btn:hover {
    background: var(--portfolio-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== FILTRO SHORTCODE ===== */
.portfolio-filter-shortcode {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.load-more-btn {
    background: transparent;
    border: 2px solid var(--portfolio-dark);
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 6px;
    color: var(--portfolio-dark);
}

.load-more-btn:hover {
    background: var(--portfolio-dark);
    color: white;
}

/* ===== PAGINAÇÃO ===== */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    border: 1px solid #e0e0e0;
    color: var(--portfolio-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 14px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--portfolio-dark);
    color: white;
    border-color: var(--portfolio-dark);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
}

.lightbox .lb-outerContainer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: transparent !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    z-index: 100000 !important;
}

.lightbox .lb-container {
    position: relative !important;
    background: transparent !important;
}

.lightbox .lb-image {
    border: 3px solid white !important;
    border-radius: 8px !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
}

.lightboxOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 99990 !important;
}

.lightbox .lb-close {
    position: fixed !important;
    top: 20px !important;
    right: 30px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.6) url('https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/images/close.png') center center no-repeat !important;
    background-size: 20px 20px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    cursor: pointer !important;
    z-index: 100001 !important;
    opacity: 0.9 !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lightbox .lb-close:hover {
    background-color: rgba(255, 0, 0, 0.8) !important;
    transform: scale(1.1) !important;
}

.lightbox .lb-dataContainer {
    position: fixed !important;
    bottom: 20px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    z-index: 100001 !important;
    background: transparent !important;
}

.lightbox .lb-data {
    display: inline-block !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 10px 25px !important;
    border-radius: 50px !important;
    color: white !important;
    font-size: 14px !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin: 0 auto !important;
}

.lightbox .lb-nav a.lb-prev,
.lightbox .lb-nav a.lb-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    background-size: 30px 30px !important;
    background-repeat: no-repeat !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    z-index: 100001 !important;
}

.lightbox .lb-nav a.lb-prev {
    left: 20px !important;
    background: url('https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/images/prev.png') center center no-repeat !important;
}

.lightbox .lb-nav a.lb-next {
    right: 20px !important;
    background: url('https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.8.2/images/next.png') center center no-repeat !important;
}

.lightbox .lb-nav a.lb-prev:hover,
.lightbox .lb-nav a.lb-next:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.lightbox .lb-loader {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100001 !important;
}

body.lb-disable-scrolling {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ===== RESPONSIVO CONSOLIDADO ===== */
@media (max-width: 991px) {
    .portfolio-header {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .portfolio-title-section {
        text-align: center;
    }
    
    .filter-buttons {
        justify-content: center;
        padding-top: 0;
    }
    
    .portfolio-main-title {
        font-size: 36px;
    }
    
    .project-title {
        font-size: 28px;
    }
    
    .gallery-thumbnail {
        height: 280px;
    }
    
    .portfolio-item,
    .related-projects-section .portfolio-item,
    .portfolio-card-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .portfolio-item,
    .related-projects-section .portfolio-item,
    .portfolio-card-image {
        height: 280px;
    }
    
    .project-hero {
        margin-top: 60px;
    }
    
    .project-hero .project-title {
        text-align: center;
        font-size: 28px;
    }
    
    .project-hero .project-description {
        text-align: center;
    }
    
    .project-hero .project-description p {
        text-align: center;
    }
    
    .project-details .detail-item {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .project-details .detail-label,
    .project-details .detail-value {
        text-align: center;
    }
    
    .project-details .detail-value a {
        display: inline-block;
    }
    
    .project-tags {
        justify-content: center;
    }
    
    .project-tags .tag {
        text-align: center;
    }
    
    .content-section {
        text-align: center;
    }
    
    .content-section h2 {
        text-align: center;
        font-size: 28px;
    }
    
    .content-section p {
        text-align: center;
    }
    
    .project-content-text {
        text-align: center;
    }
    
    .project-content-text p {
        text-align: center;
    }
    
    .project-gallery {
        text-align: center;
    }
    
    .project-gallery h2 {
        text-align: center;
        font-size: 28px;
    }
    
    .project-gallery p {
        text-align: center;
    }
    
    .gallery-grid {
        justify-content: center;
    }
    
    .gallery-thumbnail {
        height: 250px;
    }
    
    .related-projects-section {
        text-align: center;
    }
    
    .related-projects-section .related-title {
        text-align: center;
        font-size: 28px;
    }
    
    .related-projects-section .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .related-projects-section .portfolio-item {
        height: 280px;
        margin: 0 auto;
        max-width: 100%;
    }
    
    .project-cta {
        text-align: center;
    }
    
    .project-cta h2 {
        text-align: center;
        font-size: 32px;
    }
    
    .project-cta p {
        text-align: center;
    }
    
    .project-cta .btn {
        display: inline-block;
        margin: 0 auto;
    }
    
    .btn-ver-mais {
        font-size: 13px;
        padding: 12px 32px;
    }
    
    /* Lightbox mobile */
    .lightbox .lb-close {
        top: 15px !important;
        right: 15px !important;
        width: 35px !important;
        height: 35px !important;
        background-size: 18px 18px !important;
    }
    
    .lightbox .lb-data {
        padding: 8px 20px !important;
        font-size: 13px !important;
        max-width: 90% !important;
    }
    
    .lightbox .lb-nav a.lb-prev {
        left: 5px !important;
    }
    
    .lightbox .lb-nav a.lb-next {
        right: 5px !important;
    }
}

@media (max-width: 576px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-main-title {
        font-size: 36px;
    }
    
    .portfolio-item,
    .related-projects-section .portfolio-item,
    .portfolio-card-image {
        height: 260px;
        max-width: 480px;
        margin: 0 auto;
    }
    
    .project-title {
        font-size: 28px;
    }
    
    .project-cta h2 {
        font-size: 28px;
    }
    
    .gallery-thumbnail {
        height: 220px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 14px;
    }
    
    .related-projects-section .portfolio-grid {
        max-width: 450px;
    }
    
    .btn-ver-mais {
        font-size: 12px;
        padding: 10px 28px;
    }
}

@media (max-width: 480px) {
    .project-hero {
        font-size: 24px;
    }
    
    .project-title {
        font-size: 28px;
    }
    
    .project-cta h2 {
        font-size: 24px;
    }
    
    .portfolio-item,
    .related-projects-section .portfolio-item,
    .portfolio-card-image {
        height: 240px;
        max-width: 400px;
    }
    
    .gallery-thumbnail {
        height: 200px;
    }
    
    .related-projects-section .portfolio-grid {
        max-width: 380px;
        gap: 20px;
    }
    
    .pagination .page-numbers {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .portfolio-title,
    .portfolio-card-title {
        font-size: 18px;
    }
    
    .portfolio-category,
    .portfolio-card-category {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    /* Lightbox mobile pequeno */
    .lightbox .lb-close {
        top: 10px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        background-size: 15px 15px !important;
    }
    
    .lightbox .lb-data {
        padding: 6px 15px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 375px) {
    .project-hero .project-title {
        font-size: 28px;
    }
    
    .portfolio-item,
    .related-projects-section .portfolio-item,
    .portfolio-card-image {
        height: 220px;
        max-width: 340px;
    }
    
    .gallery-thumbnail {
        height: 180px;
    }
    
    .related-projects-section .portfolio-grid {
        max-width: 320px;
    }
    
    .btn-ver-mais {
        font-size: 11px;
        padding: 8px 24px;
        letter-spacing: 1px;
    }
    
    .btn-ver-mais i {
        font-size: 14px;
    }
}

/* ===== ANIMAÇÕES DE SCROLL - SLIDE LATERAL ===== */
.scroll-title,
.scroll-subtitle,
.scroll-text,
.scroll-item,
.scroll-fade {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    overflow: visible !important;
}

.scroll-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.scroll-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.scroll-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-item {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* Itens pares vêm da esquerda, ímpares da direita */
.scroll-item:nth-child(even) {
    transform: translateX(-30px);
}

.scroll-item:nth-child(odd) {
    transform: translateX(30px);
}

/* Estado visível */
.scroll-title.visible,
.scroll-subtitle.visible,
.scroll-text.visible,
.scroll-item.visible,
.scroll-fade.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== ANIMAÇÕES ESPECÍFICAS PARA SINGLE PORTFOLIO ===== */

/* Hero */
.project-hero .scroll-item.visible {
    transition-delay: 0.1s;
}

.project-hero .scroll-title.visible {
    transition-delay: 0.2s;
}

.project-hero .scroll-text.visible {
    transition-delay: 0.3s;
}

/* Detalhes do projeto */
.project-details .scroll-item.visible:nth-child(1) { transition-delay: 0.1s; }
.project-details .scroll-item.visible:nth-child(2) { transition-delay: 0.2s; }
.project-details .scroll-item.visible:nth-child(3) { transition-delay: 0.3s; }
.project-details .scroll-item.visible:nth-child(4) { transition-delay: 0.4s; }

/* Tags de tecnologia */
.project-tags .tag.scroll-item.visible {
    animation: tagPop 0.3s ease forwards;
}

@keyframes tagPop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Imagens */
.project-content .scroll-fade.visible {
    transition-delay: 0.2s;
}

/* Título da seção */
.content-section .scroll-title.visible {
    transition-delay: 0.1s;
}

.content-section .scroll-text.visible {
    transition-delay: 0.2s;
}

/* Galeria */
.project-gallery .scroll-title.visible {
    transition-delay: 0.1s;
}

.project-gallery .scroll-text.visible {
    transition-delay: 0.2s;
}

.project-gallery .scroll-item.visible:nth-child(1) { transition-delay: 0.1s; }
.project-gallery .scroll-item.visible:nth-child(2) { transition-delay: 0.2s; }
.project-gallery .scroll-item.visible:nth-child(3) { transition-delay: 0.3s; }
.project-gallery .scroll-item.visible:nth-child(4) { transition-delay: 0.4s; }
.project-gallery .scroll-item.visible:nth-child(5) { transition-delay: 0.5s; }
.project-gallery .scroll-item.visible:nth-child(6) { transition-delay: 0.6s; }

/* Projetos relacionados - APENAS O TÍTULO */
.related-projects-section .scroll-title.visible {
    transition-delay: 0.1s;
}

/* CTA */
.project-cta .scroll-title.visible {
    transition-delay: 0.1s;
}

.project-cta .scroll-text .scroll-item.visible:nth-child(1) { transition-delay: 0.2s; }
.project-cta .scroll-text .scroll-item.visible:nth-child(2) { transition-delay: 0.3s; }

.project-cta .scroll-fade.visible {
    transition-delay: 0.4s;
}

/* Efeito hover suave para as imagens da galeria */
.gallery-item {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item .gallery-overlay {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-overlay i {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1.3) rotate(5deg);
}

/* ===== ANIMAÇÕES ESPECÍFICAS PARA O CTA ===== */
.cta-section .cta-content {
    perspective: 1000px;
}

.cta-section .scroll-item {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cta-section .scroll-title {
    transition: opacity 1s ease, transform 1s ease;
}

.cta-section .scroll-fade {
    transition: opacity 0.8s ease;
}

/* Delays específicos para o CTA */
.cta-section .scroll-item.visible {
    transition-delay: 0.1s;
}

.cta-section .scroll-title.delay-1.visible {
    transition-delay: 0.2s;
}

.cta-section .scroll-title.delay-2.visible {
    transition-delay: 0.3s;
}

.cta-section .scroll-fade.visible {
    transition-delay: 0.4s;
}

/* Efeito adicional para o título do CTA (opcional) */
.cta-section .cta-title-line {
    display: inline-block;
    transform-origin: center;
}

.cta-section .cta-title-line.visible {
    animation: gentlePop 0.5s ease forwards;
}

@keyframes gentlePop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Garantir que as animações funcionem */
.cta-section .scroll-item,
.cta-section .scroll-title,
.cta-section .scroll-fade {
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* ===== CORREÇÃO ADICIONAL PARA EVITAR SCROLL EM TODOS OS CARDS ===== */
.portfolio-item,
.related-projects-section .portfolio-item,
.portfolio-card {
    overflow: hidden;
    position: relative;
}

.portfolio-item img,
.related-projects-section .portfolio-item img,
.portfolio-card img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== ANIMAÇÕES ESPECÍFICAS PARA PÁGINA SOBRE ===== */

/* Hero da página sobre */
.about-hero .scroll-title.visible {
    transition-delay: 0.1s;
}

.about-hero .scroll-text.visible:nth-of-type(1) {
    transition-delay: 0.2s;
}

.about-hero .scroll-text.visible:nth-of-type(2) {
    transition-delay: 0.3s;
}

.about-hero .scroll-item.visible {
    transition-delay: 0.4s;
}

/* Seções de formação e especialidades */
.about-section h2.scroll-title.visible {
    transition-delay: 0.1s;
}

/* Itens de formação */
.formation-item .scroll-subtitle.visible {
    transition-delay: 0.2s;
}

.formation-item .scroll-text.visible {
    transition-delay: 0.3s;
}

/* Itens de especialidades */
.specialty-item .scroll-subtitle.visible {
    transition-delay: 0.2s;
}

.specialty-item .scroll-text.visible {
    transition-delay: 0.3s;
}

/* Listas com ícones */
.specialty-item .scroll-item.visible:nth-child(1) { transition-delay: 0.1s; }
.specialty-item .scroll-item.visible:nth-child(2) { transition-delay: 0.2s; }
.specialty-item .scroll-item.visible:nth-child(3) { transition-delay: 0.3s; }
.specialty-item .scroll-item.visible:nth-child(4) { transition-delay: 0.4s; }
.specialty-item .scroll-item.visible:nth-child(5) { transition-delay: 0.5s; }
.specialty-item .scroll-item.visible:nth-child(6) { transition-delay: 0.6s; }

/* Efeito suave para os ícones da lista */
.specialty-item .fa-li i {
    transition: transform 0.3s ease;
}

.specialty-item .scroll-item.visible .fa-li i {
    animation: gentlePop 0.5s ease forwards;
}

/* ===== ANIMAÇÕES DE SCROLL - SLIDE LATERAL ===== */
.scroll-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
    will-change: opacity, transform;
}

.scroll-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    will-change: opacity, transform;
}

.scroll-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.scroll-item {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.scroll-fade {
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: opacity;
}

/* Itens pares vêm da esquerda, ímpares da direita */
.scroll-item:nth-child(even) {
    transform: translateX(-30px);
}

.scroll-item:nth-child(odd) {
    transform: translateX(30px);
}

/* Estado visível */
.scroll-title.visible,
.scroll-subtitle.visible,
.scroll-text.visible,
.scroll-item.visible,
.scroll-fade.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delays específicos para o hero */
.hero-section .scroll-title.visible {
    transition-delay: 0.1s;
}

.hero-section .scroll-text.visible {
    transition-delay: 0.2s;
}

.hero-section .scroll-item.visible {
    transition-delay: 0.3s;
}

/* Delays para botões (o primeiro botão, depois o segundo) */
.hero-section .btn-hero .scroll-fade:nth-child(1).visible {
    transition-delay: 0.4s;
}

.hero-section .btn-hero .scroll-fade:nth-child(2).visible {
    transition-delay: 0.5s;
}

/* Delays para ícones */
.hero-section .col-lg-4.scroll-fade.visible {
    transition-delay: 0.3s;
}

/* Garantias de performance */
.scroll-title,
.scroll-subtitle,
.scroll-text,
.scroll-item,
.scroll-fade {
    backface-visibility: hidden;
    transform: translateZ(0);
    overflow: visible !important;
}

/* ===== ANIMAÇÕES ESPECÍFICAS PARA O CTA ===== */
.cta-section .cta-content {
    perspective: 1000px;
}

.cta-section .scroll-item {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cta-section .scroll-title {
    transition: opacity 1s ease, transform 1s ease;
}

.cta-section .scroll-fade {
    transition: opacity 0.8s ease;
}

/* Delays específicos para o CTA */
.cta-section .scroll-item.visible {
    transition-delay: 0.1s;
}

.cta-section .scroll-title.delay-1.visible {
    transition-delay: 0.2s;
}

.cta-section .scroll-title.delay-2.visible {
    transition-delay: 0.3s;
}

.cta-section .scroll-fade.visible {
    transition-delay: 0.4s;
}

/* Efeito adicional para o título do CTA (opcional) */
.cta-section .cta-title-line {
    display: inline-block;
    transform-origin: center;
}

.cta-section .cta-title-line.visible {
    animation: gentlePop 0.5s ease forwards;
}

@keyframes gentlePop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Garantir que as animações funcionem */
.cta-section .scroll-item,
.cta-section .scroll-title,
.cta-section .scroll-fade {
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* Para Chrome, Edge, Safari */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--portfolio-primary);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--portfolio-dark);
    border-radius: 20px;
    border: 2px solid var(--portfolio-primary);
}