:root {
    --primary-web3: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --surface-dark: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-dark: #334155;
    --success-glow: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

header {
    background-color: var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-web3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.3rem;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary-web3);
}

.btn-connect {
    background: linear-gradient(135deg, var(--primary-web3) 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.hero {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent), var(--surface-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.filter-section {
    max-width: 1200px;
    margin: -2rem auto 3rem auto;
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.7rem 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-light);
    outline: none;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-dark);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-web3);
    color: white;
    border-color: var(--primary-web3);
}

.catalog-container {
    max-width: 1200px;
    margin: 0 auto 5rem auto;
    padding: 0 1rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.course-thumb {
    width: 100%;
    height: 160px;
    background-color: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-weight: bold;
    position: relative;
    border-bottom: 1px solid var(--border-dark);
}

.course-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-web3);
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
}

.course-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.course-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.course-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-dark);
    padding-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.course-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--success-glow);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-more {
    flex: 1; /* Alinhamento uniforme de tamanho com o btn-enroll */
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-dark);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-more:hover {
    background-color: var(--border-dark);
}

.btn-enroll {
    flex: 1;
    background-color: var(--primary-web3);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-enroll:hover {
    background-color: var(--primary-hover);
}

/* Seção Depoimentos */
.testimonials-section {
    max-width: 1200px;
    margin: 0 auto 6rem auto;
    padding: 0 1rem;
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 800;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.testimonial-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.student-wallet {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary-web3);
    margin-bottom: 0.5rem;
    display: block;
}

.testimonial-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

/* Footer */
footer {
    background-color: var(--surface-dark);
    border-top: 1px solid var(--border-dark);
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-light);
}

/* Ajuste de contraste para o estado desabilitado */
.btn-enroll:disabled {
    background-color: var(--border-dark);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}


/* Barra de Aviso Sepolia */
.network-banner {
    background-color: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center; /* CORRIGIDO AQUI */
    gap: 0.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.network-banner strong {
    color: #fbbf24;
    font-weight: 700;
}

.network-banner .banner-icon {
    flex-shrink: 0;
}

/* Estilização do Link do Faucet (Azul Claro) */
.network-banner .faucet-link {
    color: #38bdf8;
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.network-banner .faucet-link:hover {
    color: #7dd3fc;
    text-decoration: none;
}


/* Botão de alternância de tema */
.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid #64748b;
    border-radius: 20px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-theme-toggle:hover {
    background: rgba(99, 102, 241, 0.10);
    border-color: #635bff;
}
@media (max-width: 600px) {
    .btn-theme-toggle { padding: 0.45rem 0.7rem; }
}

/* Alternância de tema — igual ao controle da sala de aula */
#themeToggleBtn.course-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 5px 10px;
    border: 1px solid var(--border-dark, var(--border-color, #334155));
    border-radius: 10px;
    background: var(--surface-dark, var(--surface-color, #111827));
    color: var(--text-light, var(--text-main, #f9fafb));
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
#themeToggleBtn.course-theme-toggle:hover { border-color: #635bff; }
#themeToggleBtn .theme-toggle-icon {
    display: inline-flex;
    width: 16px;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
}
#themeToggleBtn .theme-toggle-track {
    display: inline-flex;
    align-items: center;
    width: 30px;
    height: 17px;
    padding: 2px;
    border-radius: 999px;
    background: #64748b;
    transition: background .2s ease;
}
#themeToggleBtn .theme-toggle-thumb {
    display: block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.22);
    transition: transform .2s ease;
}
html[data-theme="light"] #themeToggleBtn .theme-toggle-track { background: #635bff; }
html[data-theme="light"] #themeToggleBtn .theme-toggle-thumb { transform: translateX(13px); }
#themeToggleBtn.course-theme-toggle:focus-visible {
    outline: 3px solid rgba(99, 91, 255, .35);
    outline-offset: 2px;
}
@media (max-width: 600px) {
    #themeToggleBtn.course-theme-toggle { min-height: 36px; padding: 5px 8px; }
    #themeToggleBtn .theme-toggle-label { display: none; }
}


/* =========================================================
   PILOTO HERO COM ESTUDANTES — Web3 Academy Brasil
   ========================================================= */
.hero {
    position: relative;
    isolation: isolate;
    min-height: 345px;
    padding: 5rem 2rem 4.25rem;
    color: #f8fafc;
    background:
        linear-gradient(90deg, rgba(10, 20, 42, .88) 0%, rgba(15, 23, 42, .70) 48%, rgba(15, 23, 42, .36) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, .76), rgba(15, 23, 42, .08) 70%),
        url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=2200&q=85");
    background-size: cover;
    background-position: center 43%;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}
.hero h1 {
    position: relative;
    max-width: 1120px;
    margin: 0 auto 1rem;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}
.hero p {
    position: relative;
    color: #e2e8f0;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
@media (max-width: 600px) {
    .hero {
        min-height: 330px;
        padding: 3.5rem 1rem 2.75rem;
        background-position: center;
    }
    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.25rem); }
}


/* Ajuste: mesma altura do hero nos temas claro e escuro */
.hero {
    min-height: 470px;
}
@media (max-width: 600px) {
    .hero {
        min-height: 390px;
    }
}



/* Correção de empilhamento: filtros sempre à frente da imagem do hero */
.hero {
    z-index: 0;
}
.filter-section {
    position: relative;
    z-index: 2;
}
.catalog-container {
    position: relative;
    z-index: 0;
}
