/* ==========================================================================
   fp-carousel.css — Motor Universal fullProject
   Acoplado ao jsoncores.php via variáveis CSS semânticas
   Compatível com: epema, indsutrio, MyPage e qualquer template futuro
   ========================================================================== */

/* ─── 1. CAROUSEL ITEM — fullscreen sem zoom ─────────────────────────────── */
.fp-carousel .fp-carousel-item {
    position: relative;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    background-color: var(--COR5); /* fallback escuro enquanto imagem carrega */
}

/* ─── 2. IMAGEM — ocupa 100% sem distorção, SEM zoom no transition ───────── */
.fp-carousel .fp-carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;   /* prioriza rosto/topo da imagem */
    /* Zoom removido — era o culpado do efeito de aumentar/diminuir */
    transform: none;
    transition: opacity 0.6s ease-in-out;
}

/* Garante que o carousel-fade do Bootstrap não aplique scale */
.fp-carousel.carousel-fade .fp-carousel-item {
    transform: none !important;
}
.fp-carousel.carousel-fade .fp-carousel-item.active {
    transform: none !important;
}

/* ─── 3. OVERLAY GRADIENTE — legibilidade do texto ──────────────────────── */
.fp-carousel .fp-carousel-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    z-index: 1;
}

/* ─── 4. CAPTION — posicionamento do conteúdo ───────────────────────────── */
.fp-carousel .fp-carousel-caption {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding: 0 0 0px 0 !important;
}

/* ─── 5. TIPOGRAFIA ──────────────────────────────────────────────────────── */
.fp-carousel-titulo {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--COR-ANCORA-CLARA);    /* sempre branco */
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.4),
        2px 2px 0 rgba(0,0,0,0.35),
        3px 3px 0 rgba(0,0,0,0.3),
        4px 4px 12px rgba(0,0,0,0.5);
}

.fp-carousel-subtitulo {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--COR-DESTAQUE);        /* color2 — tom claro da marca */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* ─── 6. BOTÃO CTA ───────────────────────────────────────────────────────── */
.fp-carousel-btn {
    background: linear-gradient(
        135deg,
        var(--COR3) 0%,
        var(--COR2) 40%,
        var(--COR1) 100%
    ) !important;
    border: none !important;
    color: var(--COR7) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 2px 4px rgba(255,255,255,0.1) inset,
        3px 3px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.fp-carousel-btn:hover {
    background: linear-gradient(
        135deg,
        var(--COR2) 0%,
        var(--COR1) 100%
    ) !important;
    color: var(--COR7) !important;
    transform: translateY(-2px);
    box-shadow: 4px 4px 18px rgba(0,0,0,0.4);
}

/* ─── 7. INDICADORES ─────────────────────────────────────────────────────── */
.fp-carousel .fp-carousel-indicators {
    z-index: 5;
    margin-bottom: 2rem;
}

.fp-carousel .fp-carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.4);
    border: none;
    transition: all 0.3s ease;
    padding: 0;
}

.fp-carousel .fp-carousel-indicators button.active {
    width: 28px;
    border-radius: 5px;
    opacity: 1;
    background-color: var(--COR-DESTAQUE);  /* color2 */
}

/* ─── 8. CONTROLES PREV/NEXT ─────────────────────────────────────────────── */
.fp-carousel-control {
    z-index: 5;
    width: 5%;
    background: transparent !important;
    border: none !important;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.fp-carousel-control:hover {
    opacity: 1 !important;
}

.fp-carousel-control .carousel-control-prev-icon,
.fp-carousel-control .carousel-control-next-icon {
    width: 2.2rem;
    height: 2.2rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
    transition: filter 0.3s ease;
}

.fp-carousel-control:hover .carousel-control-prev-icon,
.fp-carousel-control:hover .carousel-control-next-icon {
    filter: drop-shadow(0 0 8px var(--COR-DESTAQUE));
}

/* ─── 9. FLOATING CARDS DINÂMICOS ───────────────────────────────────────── */
.fp-floating-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.fp-floating-card {
    position: absolute;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--COR-ANCORA-CLARA);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    min-width: 180px;
    z-index: 3;
    overflow: hidden;
}

/* Brilho prateado deslizante — igual ao das stats */
.fp-floating-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: fpShine 3.5s ease-in-out infinite;
}

.fp-card-1::before { animation-delay: 0.3s; }
.fp-card-2::before { animation-delay: 1.3s; }
.fp-card-3::before { animation-delay: 2.3s; }
.fp-card-4::before { animation-delay: 0.8s; }
.fp-card-5::before { animation-delay: 1.8s; }
.fp-card-6::before { animation-delay: 2.8s; }

.fp-floating-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow:
        0 14px 36px rgba(0,0,0,0.4),
        0 0 18px rgba(var(--COR2-RGB), 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(var(--COR2-RGB), 0.5);
    animation-play-state: paused;
}

.fp-floating-card i {
    font-size: 1.4rem;
    color: var(--COR-DESTAQUE);
    flex-shrink: 0;
}

.fp-card-titulo {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--COR-ANCORA-CLARA);
    line-height: 1.2;
}

.fp-card-desc {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

@keyframes fpShine {
    0%   { left: -75%; }
    35%  { left: 125%; }
    100% { left: 125%; }
}

/* ─── Posições dos floating cards — até 6 ao redor da foto ────────────────
   Layout orgânico e assimétrico — cada card em posição única no perímetro.
   Intencionalmente desalinhados para criar profundidade e dinamismo visual.
   ========================================================================== */

/* Card 6 — meio esquerda, bem para fora */
.fp-card-6 { top: 34%;   left: -10%; }
.fp-card-1 { top: 2%;    left: -8%;  }
.fp-card-2 { top: 55%;   right: -10%; }
.fp-card-3 { bottom: 8%; left: -15%;  }
.fp-card-4 { top: -2%;   right: -6%; }
.fp-card-5 { bottom: -12%; right: -8%; }
.fp-card-6 { top: 32%;   left: -15%; }
/* ─── 10. ISOLAMENTO DO BOTÃO WHATSAPP ────────────────────────────────────
   O whatsapp.php injeta seu próprio <style> com --accent-color: #FF4081
   (rosa) que pode vazar para outras variáveis se carregado depois do
   tema. Isolamos a variável apenas dentro do escopo do botão, sem
   tocar nas variáveis globais — essas são responsabilidade do
   jsoncores.php + main.css de cada template, não deste arquivo universal.
   ========================================================================== */
.whatsapp-container {
    --accent-color: #FF4081;
}

/* Garante que o .hero do MyPage não aplique padding quando temos carousel */
#hero.hero:has(.fp-carousel) {
    padding: 0 !important;
    min-height: unset;
    display: block;
}

/* ─── 11. CURVA DECORATIVA INFERIOR (opcional) ───────────────────────────── */
.fp-curve-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 4;
    pointer-events: none;
}

.fp-curve-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

/* ─── 12. RESPONSIVIDADE ─────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
    .fp-carousel-titulo { font-size: 2.4rem; }
}

@media (max-width: 991.98px) {
    .fp-carousel .fp-carousel-item { height: 70vh; }
    .fp-carousel-titulo  { font-size: 1.9rem; line-height: 1.1; }
    .fp-carousel-subtitulo { font-size: 0.8rem; }
    .fp-floating-wrapper { display: none; }
}

@media (max-width: 767.98px) {
    .fp-carousel .fp-carousel-item { height: 60vh; min-height: 380px; }
    .fp-carousel-titulo  { font-size: 1.4rem; line-height: 1.15; }
    .fp-carousel-subtitulo { font-size: 0.7rem; letter-spacing: 1px; }
    .fp-carousel-btn { font-size: 0.85rem; padding: 8px 20px; }
    .fp-carousel .fp-carousel-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.2) 0%,
            rgba(0,0,0,0.75) 100%
        );
    }
    /* Texto no rodapé do hero em mobile */
    .fp-carousel .fp-carousel-caption .row {
        align-items: flex-end !important;
        min-height: 60vh;
        padding-bottom: 20px;
    }
    .fp-carousel .fp-carousel-caption .col-lg-6 {
        padding-bottom: 0;
    }
}

/* ─── MODO ESTÁTICO MOBILE — limita altura da imagem ───────────────────── */
@media (max-width: 991.98px) {
    .hero {
        padding: 20px 0 !important;
        min-height: unset !important;
    }

    .hero .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .hero .image-wrapper .main-image {
        max-height: 380px;
        object-fit: cover;
        object-position: center top;
        border-radius: 12px;
        width: 100%;
    }

    /* Cards mantêm posição absoluta sobre a foto — só ajusta tamanho */
    .hero .image-wrapper .fp-floating-card {
        padding: 0.5rem 0.75rem;
        min-width: 120px;
    }

    .hero .image-wrapper .fp-card-titulo { font-size: 0.75rem; }
    .hero .image-wrapper .fp-card-desc   { font-size: 0.65rem; }
    .hero .image-wrapper .fp-floating-card i { font-size: 1rem; }
}

/* ─── 14. MODO ESTÁTICO — contraste das stats (sem brilho, reservado ao carousel) ── */

.hero-stats {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-stats .stat-item {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 3px solid var(--COR-DESTAQUE);
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stats .stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.hero-stats .stat-number {
    color: var(--COR-DESTAQUE) !important;
    font-weight: 800;
    font-size: 1.6rem;
    display: block;
}

.hero-stats .stat-label {
    color: var(--COR-ANCORA-CLARA) !important;
    opacity: 0.85;
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

/* Botão secundário (outline) — contraste reforçado */
.hero-actions .btn-secondary {
    border: 2px solid var(--COR-DESTAQUE) !important;
    color: var(--COR-ANCORA-CLARA) !important;
    background: rgba(var(--COR2-RGB), 0.08);
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-actions .btn-secondary:hover {
    background: var(--COR-DESTAQUE) !important;
    color: var(--COR5) !important;
    border-color: var(--COR-DESTAQUE) !important;
    transform: translateY(-2px);
}

/* Botão primário — garante contraste sólido */
.hero-actions .btn-primary {
    background: var(--COR-PRINCIPAL) !important;
    color: var(--COR7) !important;
    border: none !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.hero-actions .btn-primary:hover {
    background: var(--COR2) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Subtítulo do hero estático */
.hero-content .accent-text {
    color: var(--COR-DESTAQUE) !important;
}

/* Descrição — melhora legibilidade */
.hero-content .hero-description {
    color: var(--COR-ANCORA-CLARA);
    opacity: 0.9;
    line-height: 1.7;
}

/* Acessibilidade — respeita preferência de menos movimento */
@media (prefers-reduced-motion: reduce) {
    .hero-stats .stat-item,
    .hero-stats .stat-item::before {
        animation: none !important;
    }
}
@keyframes fpFadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fp-carousel-item.active .fp-carousel-titulo,
.fp-carousel-item.active .fp-carousel-subtitulo,
.fp-carousel-item.active .fp-carousel-btn {
    animation: fpFadeInUp 0.7s ease forwards;
}

.fp-carousel-item.active .fp-carousel-subtitulo { animation-delay: 0.1s; }
.fp-carousel-item.active .fp-carousel-titulo    { animation-delay: 0.25s; }
.fp-carousel-item.active .fp-carousel-btn       { animation-delay: 0.45s; }
