/* ==========================================================================
   Prévia Exclusiva — Novo site de Bruno Mota Lopes
   Usa as variáveis do global.css do tema (--navy-950, --gold, --font-display...)
   Não redefine :root — depende do global.css já carregado no site.
   ========================================================================== */

.previa-bruno-section * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.previa-bruno .service-tab,
.previa-bruno .block-thumb,
.previa-bruno .nav-arrow,
.pb-modal-close,
.pb-modal-arrow,
.pb-zoom-btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.previa-bruno-section {
    background: var(--navy-950);
    padding: var(--space-xl) 0;
}

.previa-bruno {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
    color: var(--text-soft);
    font-family: var(--font-body);
    position: relative;
}

/* ---------- Cabeçalho ---------- */

.previa-bruno .section-main-heading {
    max-width: 720px;
    margin: 0 auto 28px auto;
    text-align: center;
}

.previa-bruno .brand-accent {
    display: inline-block;
    font-family: var(--font-body-alt);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
    padding: 6px 18px;
    border: 1px solid var(--border-gold-glow);
    border-radius: 100px;
    margin-bottom: 14px;
    background-color: rgba(217, 164, 65, 0.06);
}

.previa-bruno .brand-accent-text {
    background-image: linear-gradient(
        100deg,
        #8f651f 0%,
        #c9a876 20%,
        #fbe7b8 40%,
        #c9a876 60%,
        #8f651f 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    animation: previa-brand-shine 3.5s linear infinite;
}

@keyframes previa-brand-shine {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -50% center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .previa-bruno .brand-accent-text {
        animation: none;
        background-image: none;
        -webkit-text-fill-color: initial;
        color: var(--gold);
    }
}

.previa-bruno .headline-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.previa-bruno .divider-line {
    flex: 1 1 auto;
    max-width: 180px;
    height: 1px;
}

.previa-bruno .divider-line-left {
    background: linear-gradient(to right, transparent, var(--gold));
}

.previa-bruno .divider-line-right {
    background: linear-gradient(to left, transparent, var(--gold));
}

.previa-bruno .main-headline {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-light);
    line-height: 1.15;
}

.previa-bruno .main-headline span {
    color: var(--gold-accent);
}

.previa-bruno .main-sub {
    max-width: 600px;
    margin: 14px auto 0;
    color: var(--text-muted);
    font-size: 0.99rem;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.previa-bruno .main-sub strong {
    color: var(--text-soft);
    font-weight: 600;
}

/* ---------- Abas do menu (nível 1) ---------- */

.previa-bruno .tabs-container {
    background: var(--navy-900);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border-white);
    border-bottom: none;
    overflow: hidden;
}

.previa-bruno .service-tabs {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.15);
    overflow-x: auto;
    scrollbar-width: none;
}

.previa-bruno .service-tabs::-webkit-scrollbar {
    display: none;
}

.previa-bruno .service-tab {
    flex: 1;
    min-width: 100px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 20px 14px;
    font-family: var(--font-body-alt);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    user-select: none;
    white-space: nowrap;
}

.previa-bruno .service-tab:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.03);
}

.previa-bruno .service-tab.active {
    color: var(--text-light);
}

.previa-bruno .tab-slider {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--gold);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
    box-shadow: 0 0 16px var(--border-gold-glow);
}

/* ---------- Cartão de conteúdo ---------- */

.previa-bruno .fleet-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 50px 60px;
    border: 1px solid var(--border-white);
    border-top: none;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    gap: 48px;
}

.previa-bruno .content-area {
    flex: 1;
    min-width: 0;
}

.previa-bruno .display-title {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.previa-bruno .display-desc {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 460px;
    margin-bottom: 28px;
}

/* ---------- Miniaturas de blocos (nível 2) ---------- */

.previa-bruno .block-thumb-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.previa-bruno .block-thumb {
    cursor: pointer;
    user-select: none;
    width: 112px;
}

.previa-bruno .block-thumb img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-white);
    background: var(--navy-900);
    transition: all 0.3s ease;
    display: block;
}

.previa-bruno .block-thumb:hover img {
    border-color: var(--border-gold-glow);
}

.previa-bruno .block-thumb.active img {
    border-color: var(--gold);
    box-shadow: 0 0 18px var(--border-gold-glow);
}

/* ---------- Imagem principal ---------- */

.previa-bruno .car-img-box {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 260px;
}

.previa-bruno .car-img-inner {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.previa-bruno .car-img-box img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-white);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: zoom-in;
}

.previa-bruno .car-img-box img.pb-transitioning {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
}

/* ---------- Setas de navegação — dentro do card, no espaço logo
   abaixo da imagem (nunca sobre a imagem, nunca fora do card) ---------- */

.previa-bruno .nav-arrows {
    display: flex;
    justify-content: flex-end;
    align-self: stretch;
    gap: 10px;
    margin-top: 12px;
}

.previa-bruno .nav-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    user-select: none;
}

.previa-bruno .nav-arrow:hover {
    background: var(--gold);
    color: var(--navy-950);
    border-color: var(--gold);
}

.previa-bruno .nav-arrow svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    pointer-events: none;
}

/* ---------- Barra de recursos (rodapé) ---------- */

.previa-bruno .feature-bar {
    display: flex;
    flex-wrap: wrap;
    margin-top: 32px;
    background: var(--navy-900);
    border: 1px solid var(--border-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.previa-bruno .feature-item {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 24px;
    border-right: 1px solid var(--border-white);
}

.previa-bruno .feature-item:last-child {
    border-right: none;
}

.previa-bruno .feature-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    color: var(--gold);
}

.previa-bruno .feature-icon svg {
    width: 100%;
    height: 100%;
}

.previa-bruno .feature-text {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 500;
}


/* ==========================================================================
   Modal (lightbox)
   Agora o X, as setas e o zoom ficam FORA da imagem:
   - X: acima do canto superior direito da imagem
   - Setas + legenda + zoom: numa barra abaixo da imagem
   ========================================================================== */

.pb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6, 10, 20, 0.92);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    animation: pb-modal-fade 0.25s ease;
}

.pb-modal.active {
    display: flex;
}

@keyframes pb-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pb-modal-content {
    position: relative; /* âncora para o X, que fica fora, acima do card */
    max-width: 90vw;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.pb-modal-viewport {
    max-width: 90vw;
    max-height: 70vh;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-white);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    background: var(--navy-900);
    cursor: zoom-in;
}

.pb-modal-viewport.pb-zoomed {
    cursor: grab;
}

.pb-modal-viewport.pb-dragging {
    cursor: grabbing;
}

.pb-modal-viewport img {
    display: block;
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: 0 0;
    transition: opacity 0.2s ease, transform 0.08s linear;
    user-select: none;
    -webkit-user-drag: none;
}

.pb-modal-viewport img.pb-no-transition {
    transition: opacity 0.2s ease;
}

.pb-modal-viewport img.pb-transitioning {
    opacity: 0;
}

/* ---------- Botão de fechar — FORA da imagem, acima do canto superior direito ---------- */

.pb-modal-close {
    position: absolute;
    top: -48px;
    right: -8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: var(--navy-950);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0.95;
}

.pb-modal-close:hover {
    background: var(--navy-950);
    color: var(--gold);
    border-color: var(--gold);
    opacity: 1;
}

.pb-modal-close svg {
    width: 15px;
    height: 15px;
}

/* ---------- Barra de controles — FORA da imagem, logo abaixo dela ---------- */

.pb-modal-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pb-modal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.pb-modal-arrow {
    position: static;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: var(--navy-950);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0.9;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.pb-modal-arrow:hover {
    background: var(--navy-950);
    color: var(--gold);
    border-color: var(--gold);
    opacity: 1;
}

.pb-modal-arrow svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    pointer-events: none;
}

.pb-modal-caption {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Controles de zoom — FORA da imagem, dentro da barra de controles ---------- */

.pb-zoom-controls {
    position: static;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(217, 164, 65, 0.45);
    border: 1px solid var(--gold);
    border-radius: 100px;
    padding: 4px;
    backdrop-filter: blur(4px);
    flex: 0 0 auto;
}

.pb-zoom-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--navy-950);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pb-zoom-btn:hover {
    background: var(--navy-950);
    color: var(--gold);
}

.pb-zoom-btn svg {
    width: 15px;
    height: 15px;
    pointer-events: none;
}

.pb-zoom-reset svg {
    width: 13px;
    height: 13px;
}

.pb-zoom-level {
    color: var(--navy-950);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
    user-select: none;
}

@media (max-width: 768px) {
    .pb-modal {
        padding: 50px 16px 24px;
    }
    .pb-modal-content {
        max-height: 84vh;
        gap: 12px;
    }
    .pb-modal-close {
        top: -42px;
        right: 0;
        width: 28px;
        height: 28px;
    }
    .pb-modal-viewport,
    .pb-modal-viewport img {
        max-width: 92vw;
        max-height: 62vh;
    }
    .pb-modal-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .pb-modal-caption {
        order: 3;
        flex: 1 1 100%;
        white-space: normal;
    }
    .pb-modal-arrow {
        width: 34px;
        height: 34px;
    }
    .pb-zoom-btn {
        width: 26px;
        height: 26px;
    }

    .previa-bruno .service-tabs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        background: transparent;
    }

    .previa-bruno .service-tab {
        flex: none;
        min-width: 0;
        padding: 12px 8px;
        font-size: 0.62rem;
        letter-spacing: 0.8px;
        position: relative;
        border: none;
        margin: -1px 0 0 -1px;
    }

    .previa-bruno .tabs-container {
        border-top: none;
        position: relative;
    }

    /* linha vertical (direita) com fade nas pontas */
    .previa-bruno .service-tab::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(180deg, transparent, rgba(217, 164, 65, 0.18), transparent);
    }

    /* linha horizontal (embaixo) com fade nas pontas */
    .previa-bruno .service-tab::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.18), transparent);
    }

    /* remove a linha vertical na última coluna de cada linha (itens 3, 6...) */
    .previa-bruno .service-tab:nth-child(3n)::before {
        display: none;
    }

    /* remove a linha horizontal na última linha (Contato) */
    .previa-bruno .service-tab:nth-last-child(-n+3)::after {
        display: none;
    }

    .previa-bruno .tabs-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.18), transparent);
    }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1024px) {
    .previa-bruno .fleet-card {
        flex-direction: column;
        padding: 40px 30px;
        gap: 16px;
    }

    .previa-bruno .car-img-box {
        flex: none;
        width: 100%;
        min-height: 0;
        order: -1;
    }
    .previa-bruno .car-img-box img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
    .previa-bruno .display-desc {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .previa-bruno .divider-line {
        display: none;
    }
    .previa-bruno-section {
        padding: var(--space-lg) 0;
    }
    .previa-bruno .fleet-card {
        padding: 30px 20px;
        border-radius: 0 0 16px 16px;
    }
    .previa-bruno .tabs-container {
        border-radius: 16px 16px 0 0;
    }
    .previa-bruno .service-tab {
        font-size: 0.65rem;
        padding: 16px 10px;
    }
    .previa-bruno .block-thumb {
        width: calc(33.33% - 10px);
    }
    .previa-bruno .feature-item {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-white);
    }
    .previa-bruno .feature-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 632px) {
    .previa-bruno .main-sub {
        max-width: 570px;
        font-size: 0.94rem;
        letter-spacing: 0.2px;
    }
}