/* =====================================================
   e-SUS Cloud Integrador — Site CSS
   ===================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;

    --bg-body: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --hero-gradient: radial-gradient(circle at top right, #1e40af, #0f172a);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.95);
    --text-main: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --hero-gradient: radial-gradient(circle at top right, #3b82f6, #020617);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 70px;
    transition: background-color .3s ease, color .3s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- LAYOUT CONTAINERS ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
}

/* ---------- BANNER TOPO ---------- */
.banner-topo {
    text-align: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

/* ---------- HEADER / NAV ---------- */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background-color .3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}
.logo i {
    color: var(--primary);
    font-size: 1.4rem;
}
.logo strong { color: var(--primary); }

.desktop-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.desktop-actions a { font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.desktop-actions a:hover { color: var(--primary); }

/* ---------- BOTÕES ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: 0 12px 20px rgba(59, 130, 246, 0.35); }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-main);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { box-shadow: 0 12px 20px rgba(37, 211, 102, 0.4); }

.btn-full { width: 100%; justify-content: center; }

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 42px; height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

.mobile-trigger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------- OFFCANVAS MOBILE ---------- */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.offcanvas-menu {
    position: fixed;
    top: 0; right: -340px;
    width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 2001;
    padding: 24px;
    transition: right .3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-lg);
}
.offcanvas-menu.open { right: 0; }
.offcanvas-overlay.open { opacity: 1; pointer-events: auto; }

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.btn-close {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.3rem;
    cursor: pointer;
}

.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
}
.mobile-nav-links a:hover { background: var(--bg-body); }

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* ---------- HERO ---------- */
.hero {
    background: var(--hero-gradient);
    color: white;
    text-align: center;
    padding: 100px 24px 110px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.2), transparent 50%);
    pointer-events: none;
}
.hero > div { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 18px;
    background: linear-gradient(90deg, #fff, #60a5fa, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- SCREENSHOTS ---------- */
.screenshots {
    background: var(--bg-surface);
    padding: 80px 0;
}

.screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.screen-card {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.screen-title {
    margin-left: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.screen-img {
    border-radius: var(--radius-md);
    width: 100%;
    object-fit: cover;
}

.screen-card .legend {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- DOWNLOADS ---------- */
.downloads {
    background: var(--bg-body);
}

.plug-play-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(245, 158, 11, 0.1));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin: 0 auto 40px;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.plug-play-banner i { font-size: 1.8rem; color: var(--primary); }
.plug-play-banner strong { color: var(--text-main); }
.plug-play-banner p { font-size: 0.88rem; margin: 0; color: var(--text-secondary); }

.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.dl-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.dl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.dl-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.15rem;
}
.dl-card h3 i { color: var(--primary); font-size: 1.5rem; }
.dl-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 4px;
}

.dl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    margin-top: 10px;
}
.dl-row .info { display: flex; align-items: center; gap: 14px; flex: 1; }
.dl-row .info i.os-icon { font-size: 1.7rem; }
.dl-row .info strong { display: block; font-size: 0.95rem; }
.dl-row .meta { font-size: 0.78rem; color: var(--text-muted); }
.dl-row .version-tag {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 4px;
}

.test-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.3px;
}

/* ---------- PLANOS ---------- */
.planos {
    background: var(--bg-surface);
}

.planos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.plano-card {
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all .2s ease;
}
.plano-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.plano-card.destaque {
    border-color: var(--primary);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}
.plano-card.destaque::before {
    content: '⭐ MAIS POPULAR';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 5px 16px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plano-card h3 { font-size: 1.2rem; font-weight: 800; }
.plano-card .preco {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.plano-card .preco small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}
.plano-card .features { list-style: none; flex: 1; }
.plano-card .features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.plano-card .features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq {
    background: var(--bg-body);
}

.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    user-select: none;
}
.faq-question .arrow { transition: transform .25s; color: var(--primary); }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 22px;
    color: var(--text-secondary);
    transition: max-height .35s ease, padding .35s ease;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 22px 20px;
}

/* ---------- FOOTER ---------- */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 50px 24px 30px;
    text-align: center;
}
footer .footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
footer .footer-links a { color: #cbd5e1; font-weight: 500; font-size: 0.9rem; }
footer .footer-links a:hover { color: var(--primary); }
footer .copyright { font-size: 0.85rem; color: #64748b; }
footer .copyright a { color: #60a5fa; }

/* ---------- FLOATING WHATSAPP ---------- */
.fab-whats {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    animation: pulse-whats 2s infinite;
    z-index: 100;
}
.fab-whats:hover { transform: scale(1.1); }
@keyframes pulse-whats {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .desktop-actions { display: none; }
    .mobile-trigger { display: block; }
    section { padding: 60px 0; }
    .hero { padding: 80px 20px 80px; }
}

@media (max-width: 600px) {
    body { padding-top: 64px; }
    .container { padding: 0 16px; }
    .dl-row {
        flex-direction: column;
        align-items: stretch;
    }
    .dl-row .info { justify-content: flex-start; }
}

/* ---------- ANIMAÇÕES (AOS-lite) ---------- */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-aos="fade-up"].in     { opacity: 1; transform: translateY(0); }
[data-aos="fade-right"]      { transform: translateX(-20px); }
[data-aos="fade-right"].in   { opacity: 1; transform: translateX(0); }
[data-aos="fade-left"]       { transform: translateX(20px); }
[data-aos="fade-left"].in    { opacity: 1; transform: translateX(0); }
