/* ===================================================================
   S_Line — Mobile-First Global Styles
   Applied across all pages for a consistent mobile-first experience.
   =================================================================== */

/* ---- Base Mobile Resets ---- */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ---- Header Mobile Optimizations ---- */
/* Compact header on mobile */
header .h-20 {
    height: 3.5rem;
}

@media (min-width: 640px) {
    header .h-20 {
        height: 5rem;
    }
}

header .h-12 {
    height: 2.25rem;
}

@media (min-width: 640px) {
    header .h-12 {
        height: 3rem;
    }
}

/* ---- Mobile Menu Backdrop ---- */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Touch Target Enforcement ---- */
@media (max-width: 768px) {
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Inline links shouldn't get the min-height */
    p a,
    li a,
    span a {
        min-height: auto;
        min-width: auto;
    }
}

/* ---- Floating WhatsApp Button (Mobile Only) ---- */
.whatsapp-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* Hide on large screens */
@media (min-width: 768px) {
    .whatsapp-float {
        display: none;
    }
}

/* ---- Sticky Bottom CTA Bar (Mobile — Product Pages) ---- */
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    padding: 0.75rem 1rem;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.dark .sticky-cta-bar {
    background: rgba(15, 21, 35, 0.95);
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.sticky-cta-bar .sticky-cta-btn {
    flex: 1;
    max-width: 280px;
    text-align: center;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

/* Hide on larger screens */
@media (min-width: 768px) {
    .sticky-cta-bar {
        display: none;
    }
}

/* Add bottom padding to body so fixed bar doesn't cover content on mobile */
@media (max-width: 767px) {
    body.has-sticky-cta {
        padding-bottom: 72px;
    }
}

/* ---- Section Spacing Mobile-First ---- */
@media (max-width: 767px) {
    /* Reduce large section paddings on mobile */
    .py-24 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    /* Reduce header/section margins */
    .mb-16 {
        margin-bottom: 2.5rem;
    }

    /* Reduce large inner paddings on CTA banners */
    .p-12 {
        padding: 2rem;
    }

    /* Larger text adjustments for readability */
    .text-5xl {
        font-size: 2rem;
        line-height: 1.2;
    }

    .text-6xl {
        font-size: 2.25rem;
        line-height: 1.15;
    }
}

/* ---- Improved Mobile Typography ---- */
@media (max-width: 639px) {
    /* Hero headings base */
    h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    section h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    /* Ensure readable body text */
    p {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
}

/* ---- Card and Grid Improvements ---- */
@media (max-width: 639px) {
    /* More compact cards on mobile */
    .shadow-card {
        box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    }
}

/* ---- Smooth Scroll for anchor links ---- */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ---- Accessibility: Focus Visible ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- P1: Scroll Anchor Margin — Mobile Override ---- */
/* Desktop: 110px (index.html). Mobile header is ~56px so 72px is correct. */
@media (max-width: 767px) {
    [id] {
        scroll-margin-top: 72px;
    }
}

/* ---- P4: Sticky CTA Bar — Smart Hide When Hero CTA Is Visible ---- */
/* JS adds .hero-cta-visible to body when the hero primary CTA is in viewport */
body.hero-cta-visible .sticky-cta-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.sticky-cta-bar {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---- P8: Social Proof Bar — Grid Fix on Mobile ---- */
@media (max-width: 639px) {
    .social-proof-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        text-align: center;
    }
}

/* ---- P5: Timeline Swipe Hint ---- */
.tl-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tl-swipe-hint .hint-arrow {
    animation: hintSlide 1.8s ease-in-out 0.5s 3 forwards;
}

@keyframes hintSlide {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50%       { transform: translateX(5px); opacity: 1; }
}

@media (min-width: 768px) {
    .tl-swipe-hint { display: none; }
}

/* ---- P9: Shared inline styles now globally available ---- */
/* glass-header, blob, text-gradient, mobile-menu, animate-float, animate-fade-in-up */
/* were previously duplicated inline in every HTML page's <style> tag.              */
/* They are now defined here once for all pages.                                    */

.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.08);
}

.dark .glass-header {
    background: rgba(15, 21, 35, 0.85);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}

.text-gradient {
    background: linear-gradient(135deg, #14B8A6 0%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

.animate-float {
    animation: floatCard 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-fade-in-up,
    .stat-reveal,
    .tl-swipe-hint .hint-arrow {
        animation: none !important;
    }
}

/* ---- Typography Base ---- */
/* Previously duplicated in every HTML page's inline <style> tag. */
body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ---- Scroll Anchor Margin — Desktop ---- */
[id] {
    scroll-margin-top: 110px;
}

/* ---- Tab Active (index.html solutions) ---- */
.tab-active {
    background: #14B8A6;
    color: white;
}

/* ---- Tutorial Filter Active State (duvidas.html) ---- */
.filter-btn.active:hover {
    color: #fff;
}

/* ---- Stat Reveal Animation (index.html metrics) ---- */
@keyframes statReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stat-reveal {
    animation: statReveal 0.7s ease-out forwards;
}

/* ---- Testimonial Carousel (index.html) ---- */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-carousel::before,
.testimonial-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.testimonial-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--carousel-fade, rgb(248 250 252)), transparent);
}

.testimonial-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--carousel-fade, rgb(248 250 252)), transparent);
}

.dark .testimonial-carousel::before {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8), transparent);
}

.dark .testimonial-carousel::after {
    background: linear-gradient(to left, rgba(15, 23, 42, 0.8), transparent);
}

@media (max-width: 640px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 20px;
    }
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem 0;
}

.testimonial-card {
    min-width: 380px;
    max-width: 380px;
    flex-shrink: 0;
    transition: all 0.4s ease-in-out;
    cursor: pointer;
}

@media (max-width: 640px) {
    .testimonial-card {
        min-width: calc(100vw - 4rem);
        max-width: calc(100vw - 4rem);
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .testimonial-card {
        min-width: 340px;
        max-width: 340px;
    }
}

.testimonial-card.selected {
    transform: scale(1.05);
    z-index: 10;
}

.testimonial-card.selected>div {
    border-color: #14B8A6;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    min-width: 10px;
    min-height: 10px;
    flex-shrink: 0;
}

.carousel-dot.active {
    width: 32px;
    height: 10px;
    border-radius: 5px;
}

