/* ==========================================================================
   Evolui360 — estilos globais (site público, formulários, componentes)
   ========================================================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --secondary: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 30px rgba(15, 23, 42, .12);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 3000; }
.skip-link:focus { left: 8px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.section-padding { padding: 4rem 0; }
.mt-20 { margin-top: 20px; }

/* ----- Botões ----- */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 8px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .1s;
}
.btn-primary { background: var(--primary); color: #fff !important; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--secondary) !important; border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary) !important; }
.btn-danger { background: #fff; color: var(--danger) !important; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--primary); }
.btn-primary:active, .btn-secondary:active { transform: translateY(1px); }
.btn-primary[disabled], .btn-secondary[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn-link { color: var(--primary); font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.btn-link:hover { text-decoration: underline; }

/* ----- Navbar ----- */
.navbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; padding: 1rem 0; }
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--secondary); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo i, .logo span { color: var(--primary); }
.logo.light { color: #fff; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: #475569; font-weight: 600; font-size: .95rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--secondary); }
.nav-user { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .9rem; }
.nav-user strong { color: var(--secondary); }

/* ----- Cabeçalhos de seção ----- */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-header.text-center { flex-direction: column; align-items: center; text-align: center; }
.section-header h2 { font-size: 1.9rem; font-weight: 800; color: var(--secondary); }
.section-header p { color: var(--text-muted); margin-top: 4px; }

/* ----- Hero ----- */
.hero-home { padding-bottom: 1rem; }
.hero-banner-slider { position: relative; width: 100%; height: 420px; overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-lg); margin: 2rem 0 2.5rem; background: var(--secondary); }
.hero-banner-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease-in-out, visibility .8s ease-in-out; }
.hero-banner-slide.is-active { opacity: 1; visibility: visible; }
.hero-banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .15) 0%, rgba(15, 23, 42, .85) 100%); display: flex; align-items: flex-end; padding: 2.5rem; }
.hero-banner-caption span { display: inline-block; background: rgba(37, 99, 235, .92); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.hero-banner-caption h2 { color: #fff; font-size: 1.8rem; font-weight: 700; line-height: 1.3; max-width: 760px; }
.hero-slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .88); border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--secondary); transition: background .2s, transform .2s; z-index: 10; }
.hero-slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.hero-slider-prev { left: 20px; } .hero-slider-next { right: 20px; }
.hero-slider-dots { position: absolute; bottom: 20px; right: 25px; display: flex; gap: 8px; z-index: 10; }
.hero-slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); border: none; cursor: pointer; transition: all .3s; }
.hero-slider-dot.is-active { background: var(--primary); width: 28px; border-radius: 12px; }

.hero-content-bottom { background: #fff; padding: 2.5rem; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.tagline { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--primary); padding: 8px 16px; border-radius: 30px; font-weight: 600; font-size: .9rem; margin-bottom: 1.2rem; border: 1px solid #dbeafe; }
.hero-content-bottom h1 { font-size: 2.4rem; font-weight: 800; color: var(--secondary); margin-bottom: 1rem; line-height: 1.25; }
.text-blue { color: var(--primary); }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 800px; margin-bottom: 1.6rem; }
.hero-search { display: flex; gap: 10px; max-width: 640px; margin-bottom: 2rem; }
.hero-search input { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-light); }
.hero-search input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.hero-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.stat-item h3 { font-size: 2.2rem; font-weight: 800; color: var(--secondary); }
.stat-item p { color: var(--text-muted); font-size: .95rem; font-weight: 500; }

/* ----- Categorias ----- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; }
.category-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; text-align: center; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.category-card:hover, .category-card.is-selected { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.category-card h3 { font-size: 1rem; color: var(--secondary); margin: .9rem 0 .2rem; }
.category-card p { font-size: .85rem; color: var(--text-muted); }
.icon-wrapper { width: 56px; height: 56px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.bg-blue { background: #dbeafe; color: #1d4ed8; } .bg-purple { background: #ede9fe; color: #6d28d9; }
.bg-green { background: #d1fae5; color: #047857; } .bg-orange { background: #ffedd5; color: #c2410c; }
.categories-empty, .courses-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 2rem; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ----- Cursos ----- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.course-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-thumb { position: relative; aspect-ratio: 16 / 9; background: #e2e8f0; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.course-content { padding: 1.25rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.course-meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; gap: 8px; }
.course-meta .category { color: var(--primary); font-weight: 700; }
.rating { color: #f59e0b; font-weight: 700; white-space: nowrap; }
.rating small { color: var(--text-muted); font-weight: 500; }
.course-title { font-size: 1.05rem; line-height: 1.35; }
.course-title a { text-decoration: none; color: var(--secondary); }
.course-title a::after { content: ''; position: absolute; inset: 0; }
.course-card { position: relative; }
.instructor { font-size: .85rem; color: var(--text-muted); }
.course-footer { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text-muted); }
.price { font-weight: 800; font-size: 1.05rem; color: var(--secondary); }
.price.free { color: var(--success); }

.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.filters-bar select, .filters-bar input { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.filters-bar input[type="search"] { flex: 1; min-width: 200px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ----- Página de detalhes do curso ----- */
.course-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); color: #fff; padding: 3rem 0; }
.course-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 820px; }
.course-hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; }
.course-hero .lead { color: #cbd5e1; font-size: 1.1rem; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .15); color: #fff; }
.pill.green { background: #10b981; } .pill.orange { background: #f97316; }
.course-facts { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .92rem; color: #cbd5e1; }
.course-facts i { margin-right: 6px; color: #93c5fd; }
.course-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 2rem; padding: 2.5rem 0 4rem; align-items: start; }
.panel-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.panel-card + .panel-card { margin-top: 1.5rem; }
.panel-card h2 { font-size: 1.25rem; color: var(--secondary); margin-bottom: 1rem; }
.prose { color: #475569; line-height: 1.7; }
.check-list li { display: flex; gap: 10px; padding: 5px 0; color: #475569; }
.check-list li i { color: var(--success); margin-top: 5px; }
.curriculum-module { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.curriculum-module summary { cursor: pointer; padding: 14px 16px; background: var(--bg-light); font-weight: 700; display: flex; justify-content: space-between; gap: 10px; list-style: none; }
.curriculum-module summary::-webkit-details-marker { display: none; }
.curriculum-module summary small { color: var(--text-muted); font-weight: 500; }
.curriculum-module li { padding: 10px 16px; border-top: 1px solid var(--border); font-size: .92rem; display: flex; gap: 10px; align-items: center; color: #475569; }
.curriculum-module li i { color: var(--primary); }
.buy-card { position: sticky; top: 90px; }
.buy-card .preview { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin-bottom: 1.2rem; background: #0f172a; position: relative; }
.buy-card .preview img, .buy-card .preview iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.buy-price { font-size: 2rem; font-weight: 800; color: var(--secondary); margin-bottom: 1rem; }
.included { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1rem 0; margin: 1rem 0; font-size: .92rem; color: #475569; }
.included p { display: flex; gap: 8px; padding: 3px 0; }
.included i { color: var(--success); margin-top: 4px; }
.review { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stars { color: #cbd5e1; white-space: nowrap; }
.stars .is-filled { color: #f59e0b; }
.breadcrumb-simple { font-size: .85rem; color: #94a3b8; margin-bottom: .5rem; }
.breadcrumb-simple a { color: #cbd5e1; text-decoration: none; }

/* ----- Rodapé ----- */
.footer { background: var(--secondary); color: #cbd5e1; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 2.5rem; padding: 3.5rem 1.5rem 2.5rem; }
.footer-about p, .footer-newsletter p { font-size: .9rem; margin-top: .8rem; color: #94a3b8; }
.footer-links h4, .footer-newsletter h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-links a { display: block; color: #94a3b8; text-decoration: none; font-size: .9rem; padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.newsletter-form { display: flex; gap: 8px; margin-top: 1rem; }
.newsletter-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 8px; border: 1px solid #334155; background: #1e293b; color: #fff; }
.newsletter-feedback { font-size: .85rem; margin-top: 8px; min-height: 1.2em; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 1.2rem 0; font-size: .85rem; color: #64748b; }

/* ----- Formulários ----- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--secondary); }
.form-control, .form-input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-main);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea.form-control, textarea.form-input { resize: vertical; min-height: 90px; }
.form-hint { color: var(--text-muted); font-size: .8rem; margin-top: 4px; display: block; }
.password-group { position: relative; }
.password-group .form-control { padding-right: 44px; }
.toggle-password { position: absolute; right: 8px; top: 7px; background: none; border: 0; padding: 6px 8px; color: var(--text-muted); cursor: pointer; }

/* ----- Alertas ----- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 1.2rem; font-size: .93rem; border: 1px solid transparent; }
.alert-sucesso { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-erro { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-aviso { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert i { margin-top: 3px; }

/* ----- Modal de login ----- */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 2000; backdrop-filter: blur(3px); }
.modal-content { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 420px; padding: 2rem; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--text-muted); cursor: pointer; }
.modal-header { text-align: center; margin-bottom: 1.2rem; }
.logo-modal { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.modal-header h2 { font-size: 1.4rem; color: var(--secondary); }
.modal-header p { font-size: .9rem; color: var(--text-muted); margin-top: 4px; }
.login-area { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1.1rem; }
.login-area input { position: absolute; opacity: 0; pointer-events: none; }
.login-area label { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; color: var(--text-muted); transition: border-color .15s, background .15s; }
.login-area label i { font-size: 1.3rem; margin-bottom: 2px; }
.login-area label span { font-weight: 700; color: var(--secondary); font-size: .95rem; }
.login-area label small { font-size: .72rem; }
.login-area label:hover { border-color: #93c5fd; }
.login-area input:checked + label { border-color: var(--primary); background: var(--primary-soft); }
.login-area input:checked + label i { color: var(--primary); }
.login-area input:focus-visible + label { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.login-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: .9rem; margin-bottom: 1rem; }
.form-options { display: flex; justify-content: flex-end; margin: .2rem 0 1.2rem; font-size: .88rem; }
.link-forgot { color: var(--primary); text-decoration: none; font-weight: 600; }
.btn-submit-login { width: 100%; padding: 13px; background: var(--primary); color: #fff; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.btn-submit-login:hover { background: var(--primary-dark); }
.modal-footer { margin-top: 1.2rem; text-align: center; font-size: .82rem; color: var(--text-muted); }

/* ----- Páginas simples (login/recuperação/legais) ----- */
.auth-wrapper { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 2rem; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; color: var(--secondary); margin-bottom: .4rem; }
.auth-card > p { color: var(--text-muted); margin-bottom: 1.2rem; font-size: .93rem; }
.legal-page { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal-page h1 { font-size: 2rem; color: var(--secondary); margin-bottom: .5rem; }
.legal-page h2 { font-size: 1.2rem; color: var(--secondary); margin: 1.8rem 0 .5rem; }
.legal-page p, .legal-page li { color: #475569; margin-bottom: .6rem; }
.legal-page ul { list-style: disc; padding-left: 1.4rem; }
.empty-state-card { text-align: center; padding: 3rem 1.5rem; background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); }
.empty-state-card i { font-size: 2rem; color: #94a3b8; margin-bottom: .6rem; }

/* ----- Responsivo ----- */
@media (max-width: 992px) {
    .course-layout { grid-template-columns: 1fr; }
    .buy-card { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 1.5rem 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 10px 0; width: 100%; }
    .mobile-toggle { display: block; }
    .nav-user span { display: none; }
    .hero-banner-slider { height: 280px; }
    .hero-banner-overlay { padding: 1.4rem; }
    .hero-banner-caption h2 { font-size: 1.2rem; }
    .hero-content-bottom { padding: 1.5rem; }
    .hero-content-bottom h1 { font-size: 1.75rem; }
    .hero-stats-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .hero-search { flex-direction: column; }
    .course-hero h1 { font-size: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
