@import url('https://fonts.googleapis.com/css2?family=Outfit:ital,wght@0,100..900;1,100..900&display=swap');

/* ── Fixed Canvas (Background Layer) ── */
#cinema-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}


#cinema-wrapper {
    position: relative;
    z-index: 2;
}

/* ── Premium Global Headers ── */
.premium-header {
    text-align: center;
    padding: 1.5rem 1.5rem 0.5rem;
    max-width: 850px;
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

.premium-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #3b82f6;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.premium-label::before,
.premium-label::after {
    display: none;
}

.premium-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: clamp(2.5rem, 8vw, 4.2rem);
    font-weight: 900;
    font-style: italic;
    color: #ffffff;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* Specific color for light backgrounds if needed */
.bg-white .premium-title,
.bg-gray-50 .premium-title {
    color: #0f172a;
}

.premium-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
}

.bg-white .premium-subtitle,
.bg-gray-50 .premium-subtitle {
    color: #475569;
}


/* ── Counter Cards (Resultados em Números) ── */
.counter-card {
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    transition: all 0.4s ease;
}

.counter-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}

.counter-value {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 300;
    /* More elegant, less heavy */
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.04em;
    display: inline;
}

.counter-suffix {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 300;
    /* Matching weight for suffix */
    color: #3b82f6;
    display: inline;
    margin-left: 2px;
}

.counter-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* ── 3D Testimonial Carousel ── */
.testimonial-3d-wrapper {
    perspective: 1500px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    padding: 3rem 0;
}

.testimonial-3d-track {
    display: flex;
    gap: 1.5rem;
    /* Gap levemente menor no mobile */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* No mobile, ajustamos o padding para que as bordas dos próximos cards fiquem visíveis (dando a dica de scroll) */
    /* 280px width / 2 = 140px. Subtraindo menos (ex: 100px) revela mais dos cards adjacentes */
    padding: 0 calc(50% - 140px);
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .testimonial-3d-track {
        gap: 2rem;
        /* No desktop, mantemos o espaçamento ideal e centralizado (340/2 = 170) */
        padding: 0 calc(50% - 170px);
    }
}

.testimonial-3d-track::-webkit-scrollbar {
    display: none;
}

/* ── Navigation Arrows ── */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.nav-arrow svg {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.nav-arrow:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-50%) scale(1.1);
}

/* Posiciona as setas coladas no card central no mobile */
.nav-left {
    left: 10px;
}

.nav-right {
    right: 10px;
}

@media (min-width: 768px) {
    .nav-left {
        left: calc(50% - 240px);
    }

    .nav-right {
        right: calc(50% - 240px);
    }
}

.testimonial-3d-card {
    flex: 0 0 auto;
    width: 280px;
    height: 500px;
    scroll-snap-align: center;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #020617;
    /* Estado padrão: levemente rotacionado, menor e mais transparente.
       O JS cuidará do elemento central */
    transform: scale(0.8) translateZ(-100px);
    opacity: 0.4;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
    will-change: transform, opacity;
}

@media (min-width: 768px) {
    .testimonial-3d-card {
        width: 340px;
        height: 600px;
    }
}

.testimonial-3d-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Impede o drag da imagem nativa e bugs de scroll */
}

/* ── Process Timeline (Nosso Processo) ── */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

/* Connector line between steps — animated fill */
.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 4rem;
    /* Perfectly centered with 64px circle */
    left: 50%;
    width: 100%;
    height: 1px;
    /* Thinner for premium feel */
    background: rgba(59, 130, 246, 0.1);
    z-index: 0;
}

.process-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 4rem;
    left: 50%;
    width: 0%;
    height: 1px;
    background: #3b82f6;
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* Animated states */
.process-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.active {
    opacity: 1;
    transform: translateY(0);
}

.process-step.active:not(:last-child)::before {
    width: 100%;
    background: linear-gradient(90deg, #3b82f6, #93c5fd, #3b82f6);
    background-size: 200% 100%;
    animation: flowLine 3s ease-in-out infinite alternate;
}

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

    100% {
        background-position: 0% 0;
    }
}

.process-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #020617;
    /* Solid background to mask the line */
    border: 2px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    /* Matching elegant weight */
    font-size: 1.5rem;
    color: rgba(59, 130, 246, 0.4);
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step.active .process-number {
    background: #020617;
    /* Keep it solid on active to mask line */
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3), 0 0 50px rgba(59, 130, 246, 0.1);
}

.process-step:hover .process-number {
    background: #3b82f6;
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

.process-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.process-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    max-width: 220px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .process-step {
        padding: 1.5rem 0.75rem;
    }

    .process-step:not(:last-child)::after,
    .process-step:not(:last-child)::before {
        display: none;
    }

    .process-number {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .process-title {
        font-size: 1rem;
    }

    .process-desc {
        font-size: 0.8rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .process-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 300px;
        margin: 0 auto;
    }
}


.step-section {
    height: 100vh;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
}

.step-section .split-layout {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

.step-section .content-side {
    width: 50%;
    display: flex;
    justify-content: flex-start;
}

.step-section .visual-side {
    width: 50%;
}

/* ── Portfolio Section ── */
.portfolio-carousel {
    padding-bottom: 8rem;
}

.clickable-image {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) saturate(0.9);
}

.clickable-image:hover {
    transform: scale(1.05) translateY(-10px);
    filter: brightness(1.1) saturate(1.1);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    z-index: 50;
    cursor: pointer;
}

@media (max-width: 900px) {
    .premium-header {
        padding: 2.5rem 1.25rem 1rem;
    }

    .premium-title {
        font-size: 2.8rem;
    }

    .premium-subtitle {
        font-size: 1rem;
    }

    .portfolio-carousel {
        padding-bottom: 5rem;
    }
}

/* ── Content Box (Premium UI Redesign) ── */
.step-section {
    overflow: hidden;
}

.step-section .content-box {
    position: relative;
    width: 100%;
    max-width: 650px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    padding: 2.5rem 3.5rem;
    box-shadow:
        0 40px 80px -15px rgba(0, 0, 0, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

/* Background Numbering */
.step-section .step-number {
    position: absolute;
    top: -40px;
    left: -20px;
    font-size: 15rem;
    font-weight: 900;
    color: rgba(59, 130, 246, 0.08);
    pointer-events: none;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

/* Service Category Label */
.step-section .content-box .service-category {
    font-size: 0.75rem;
    font-weight: 400;
    color: #93c5fd;
    margin-bottom: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.step-section .content-box .service-category::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: #93c5fd;
}

/* Title */
.step-section .content-box h2 {
    font-size: 3.2rem;
    font-weight: 900;
    font-style: italic;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    line-height: 1;
    text-transform: uppercase;
}

/* Subtitle (new) */
.step-section .content-box .card-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

/* Tagline (new) */
.step-section .content-box .card-tagline {
    font-size: 1.15rem;
    font-weight: 600;
    font-style: italic;
    color: #93c5fd;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Description */
.step-section .content-box p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    max-width: 100%;
    margin-bottom: 2rem;
}

/* Section Label (new - "O que entregamos:", "Inclui:", etc.) */
.step-section .content-box .section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.2rem;
}

/* Feature List */
.step-section .feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.step-section .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

.step-section .feature-item svg {
    width: 16px;
    height: 16px;
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-section .content-box .accent-bar {
    width: 50px;
    height: 3px;
    background: #3b82f6;
    border-radius: 99px;
    margin-top: 1.5rem;
}

/* ── Final Section (Logo Reveal) ── */
.final-section {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* ── Mobile ── */
@media (max-width: 900px) {
    .premium-header {
        padding: 2.5rem 1rem 1.5rem;
    }

    .premium-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.05;
        margin-bottom: 1rem;
    }

    .premium-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .step-section {
        height: 140vh;
        padding: 0 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .step-section .split-layout {
        flex-direction: column-reverse;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .step-section .content-side {
        width: 100% !important;
        display: block;
    }

    .step-section .visual-side {
        display: none;
    }

    .step-section .content-box {
        padding: 3rem 1.8rem;
        background: rgba(15, 23, 42, 0.95);
        /* Deeper contrast for mobile */
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 28px;
        width: 100%;
        max-width: 100%;
        text-align: left;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
        opacity: 0;
        /* Let JS handle opacity animation */
    }

    .step-section .step-number {
        font-size: 7rem;
        top: -20px;
        left: -10px;
        color: rgba(59, 130, 246, 0.08);
    }

    .step-section .content-box .service-category {
        font-size: 0.65rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.3em;
        color: #93c5fd;
    }

    .step-section .content-box h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        line-height: 1.1;
        letter-spacing: -0.02em;
        color: #ffffff;
    }

    .step-section .content-box p {
        font-size: 1.05rem;
        line-height: 1.6;
        margin-bottom: 2.5rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .step-section .feature-list {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding-top: 1.8rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .step-section .feature-item {
        font-size: 0.95rem;
        color: #ffffff;
    }

    .step-section .feature-item svg {
        width: 16px;
        height: 16px;
    }
}

/* ═══════════════════════════════════════════
   PILL HEADER REDESIGN
   ═══════════════════════════════════════════ */
#main-header {
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 1100px !important;
    background: #fdfcf0ee !important;
    /* Cream theme */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 999px !important;
    padding: 12px 30px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    margin: 0 auto !important;
    transition: all 0.3s ease !important;
}

#main-header .max-w-7xl {
    max-width: 100% !important;
    margin: 0 !important;
}

/* Ensure links are dark on the cream background */
#main-header .nav-link {
    color: #1a1a1a !important;
    background-color: transparent !important;
}

#main-header #hamburger-btn .hamburger-line {
    background-color: #1a1a1a !important;
}

#main-header #hamburger-btn .hamburger-line {
    height: 1.5px !important;
}

#main-header #hamburger-btn::after {
    display: none !important;
}

/* Specific fix for text color in nav-link */
#main-header ul li a.nav-link {
    color: #4a4a4a !important;
    font-weight: 500 !important;
}

/* Adjust button for the pill shape */
#main-header a[href*="compresuafoto"] {
    border-radius: 999px !important;
    /* Match pill shape */
    padding: 8px 24px !important;
    font-size: 11px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
}

@media (max-width: 768px) {
    .step-section {
        height: 85vh;
        padding: 0 4%;
    }

    .step-section .content-box {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .step-section .content-box h2 {
        font-size: 2rem;
    }

    .step-section .step-number {
        font-size: 6rem;
        top: -20px;
        left: -10px;
    }

    #main-header {
        width: 95% !important;
        top: 15px !important;
        padding: 8px 18px !important;
    }

    #main-header img {
        height: 24px !important;
        /* Slightly smaller logo on mobile header */
    }
}

/* ── Institutional Videos Mobile Fixes ── */
@media (max-width: 768px) {
    #videos-institucionais-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    #videos-institucionais-section .premium-header {
        padding: 1rem 0.5rem 1.5rem;
    }

    #videos-institucionais-section .premium-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    #videos-institucionais-section .premium-subtitle {
        font-size: 0.85rem;
    }

    .video-card {
        border-radius: 16px !important;
    }

    .play-icon {
        width: 40px;
        height: 40px;
    }

    .play-icon svg {
        width: 20px;
        height: 20px;
    }
}