/* ============================================
   PREMIUM ENHANCEMENTS — Prata Oftalmologia
   Camada visual premium (azul petróleo / navy)
   ============================================ */

/* --- GRAIN TEXTURE (papel de luxo) --- */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 99999;
    opacity: 0.016;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%28%23noise%29)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    mix-blend-mode: multiply;
}

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0c4a6e, #0284c7, #38bdf8);
    z-index: 100001;
    transition: width 0.05s linear;
    border-radius: 0 2px 2px 0;
}

/* --- NAVBAR SCROLL ENHANCEMENT --- */
header, nav, #navbar, [class*="navbar"] {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-scrolled {
    padding: 10px 0 !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08) !important;
}

/* Linha gradiente decorativa na base do navbar */
header::after, nav::after {
    content: "";
    position: absolute;
    bottom: 0; left: 5%;
    width: 90%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(12, 74, 110, 0.2), rgba(2, 132, 199, 0.2), transparent);
    pointer-events: none;
}

/* --- TYPOGRAPHY REFINEMENTS --- */
h1, h2, h3, h4 {
    font-feature-settings: 'liga', 'kern';
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- CARD HOVER ENHANCEMENTS --- */
.swiper-slide,
[class*="card"],
[class*="feature"],
[class*="testimonial"],
[class*="highlight"] {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease !important;
}

.swiper-slide:hover,
[class*="card"]:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(12, 74, 110, 0.12) !important;
}

/* --- ACCORDION / FAQ HOVER --- */
details {
    transition: all 0.35s ease, box-shadow 0.35s ease !important;
}
details:hover {
    box-shadow: 0 8px 25px rgba(12, 74, 110, 0.08) !important;
}

/* --- SUBTLE SECTION GLOW --- */
.premium-glow {
    position: relative;
}
.premium-glow::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important; left: 50% !important;
    transform: translateX(-50%) !important;
    width: 70% !important; height: 100% !important;
    pointer-events: none !important;
    background: radial-gradient(ellipse at 50% 0%, rgba(224, 242, 254, 0.25) 0%, transparent 65%) !important;
    z-index: 0 !important;
}

/* --- IMAGE HOVER POLISH --- */
.portrait-img,
.mosaic-img,
[class*="rounded"] img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease !important;
}

.portrait-img:hover,
.mosaic-img:hover {
    transform: scale(1.02);
}

/* --- BUTTON SHINE EFFECT --- */
.btn-cta, [class*="btn-cta"], a[class*="bg-sky"], a[class*="bg-gradient"] {
    position: relative;
    overflow: hidden;
}

.btn-cta::before, [class*="btn-cta"]::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.6s ease;
}

.btn-cta:hover::before, [class*="btn-cta"]:hover::before {
    left: 100%;
}

/* --- WHATSAPP FAB (Botão Flutuante) --- */
.whatsapp-fab {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 62px; height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff !important;
    display: grid; place-items: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.35);
    z-index: 99998;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fabPulse 2.5s ease-in-out infinite;
    text-decoration: none;
}

.whatsapp-fab:hover {
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
    animation: none;
}

.fab-tooltip {
    position: absolute;
    right: 72px; top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) translateX(8px);
}

.fab-tooltip::after {
    content: "";
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(15, 23, 42, 0.92);
}

.whatsapp-fab:hover .fab-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5), 0 0 0 14px rgba(37, 211, 102, 0.06); }
}

/* --- CTA SECTION PREMIUM GRADIENT (Soluciona-inspired) --- */
.cta-premium-gradient {
    background:
        radial-gradient(circle at 15% 25%, rgba(2, 132, 199, 0.45) 0%, transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(12, 74, 110, 0.5) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, #0a3d5c 0%, transparent 80%),
        linear-gradient(175deg, #0c4a6e 0%, #082f49 50%, #0a3149 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Pontos de luz animados no CTA */
.cta-premium-gradient::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(14, 165, 233, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 40% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 30%);
    animation: ctaGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ctaGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(20px, -15px) rotate(3deg); }
}

/* --- FOOTER PREMIUM --- */
footer {
    position: relative !important;
    overflow: hidden !important;
}

/* Footer decorative blob */
.footer-blob-decoration {
    position: absolute;
    top: -120px; left: -100px;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: rgba(12, 74, 110, 0.06);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.footer-blob-decoration::after {
    content: "";
    position: absolute;
    bottom: -200px; right: -150px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.04);
    filter: blur(40px);
}

footer > div {
    position: relative;
    z-index: 1;
}

/* Footer link animated underline */
.footer-link {
    position: relative !important;
    display: inline-block;
}

.footer-link::after {
    content: "";
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    transition: width 0.35s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* --- SECTION ORNAMENT (h2 underline) --- */
section h2::after {
    content: "";
    display: block;
    width: 60px; height: 3px;
    background: linear-gradient(90deg, #0c4a6e, #0284c7);
    margin: 16px auto 0;
    border-radius: 999px;
}

/* Fix: don't apply to h2 inside cards or small containers */
[class*="card"] h2::after,
details h2::after,
footer h2::after,
[class*="faq"] h2::after {
    display: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 968px) {
    .whatsapp-fab {
        bottom: 20px; right: 20px;
        width: 56px; height: 56px;
        font-size: 1.6rem;
    }
    .fab-tooltip { display: none; }
    .scroll-progress-bar { height: 2px; }
    section h2::after { width: 50px; margin: 12px auto 0; }
}

@media (max-width: 640px) {
    .whatsapp-fab {
        bottom: 16px; right: 16px;
        width: 52px; height: 52px;
        font-size: 1.5rem;
    }
}

/* --- PRINT: Hide overlays --- */
@media print {
    body::after,
    .scroll-progress-bar,
    .whatsapp-fab,
    .footer-blob-decoration {
        display: none !important;
    }
}
