/* ===========================
   Reset básico + variáveis
=========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #0f172a;          /* fundo escuro hero/header */
    --color-bg-soft: #0b1120;     /* ainda mais escuro */
    --color-surface: #111827;     /* cards escuros */
    --color-surface-alt: #f9fafb; /* fundo claro alternativo */
    --color-primary: #1d4ed8;     /* azul principal */
    --color-primary-soft: rgba(37, 99, 235, 0.12);
    --color-primary-strong: #1e40af;
    --color-accent: #22c55e;      /* verdinho para detalhes */
    --color-border: rgba(148, 163, 184, 0.4);
    --color-text: #e5e7eb;
    --color-text-soft: #9ca3af;
    --color-text-dark: #111827;
    --radius-lg: 18px;
    --shadow-soft: 0 18px 30px rgba(15, 23, 42, 0.45);
    --transition-fast: 0.18s ease-out;
    --max-width: 1200px;
}

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
    background: #020617;
    color: var(--color-text);
}

body {
    line-height: 1.6;
}

/* ===========================
   Estrutura global
=========================== */

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar {
    background: #020617;
    color: var(--color-text-soft);
    font-size: 0.875rem;
    padding: 0.4rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar span,
.top-bar a {
    margin-right: 0.6rem;
}

.top-bar a {
    text-decoration: none;
    color: var(--color-text-soft);
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.top-bar a:hover {
    opacity: 1;
}

/* Header / Menu */

.main-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: radial-gradient(circle at 20% 20%, #4ade80, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #f9fafb;
    font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.8);
}

.logo-text strong {
    display: block;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.logo-text small {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-soft);
}

/* Container da logo no header */
.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;               /* controla a margem interna */
    border-radius: 999px;            /* deixa oval/pastilha */
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.95);
    transition: all 0.25s ease;
}

/* Efeito no hover */
.logo-wrap:hover {
    box-shadow:
            0 0 6px rgba(59,130,246,0.5),
            0 0 14px rgba(59,130,246,0.8),
            0 0 22px rgba(59,130,246,0.6);
    transform: translateY(-2px);
    border-color: rgba(59,130,246,0.8);
}


/* Tamanho da logo dentro do header */
.logo-img {
    max-height: 32px;   /* aqui você manda no tamanho */
    width: auto;
    display: block;
    object-fit: contain;
}

/* garante alinhamento na barra */
.main-header .logo {
    display: flex;
    align-items: center;
}







/* Navegação */

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-soft);
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.main-nav a:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #f9fafb;
    transform: translateY(-1px);
}

/* Botão de login em destaque */
.btn-login {
    background: linear-gradient(135deg, var(--color-primary), #22c55e);
    color: #f9fafb !important;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.55);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--color-primary-strong), #16a34a);
    transform: translateY(-1px);
}

/* Container padrão de seção */
.section,
.hero,
.main-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.8rem 1.5rem;
}

/* ===========================
   Hero
=========================== */

.hero {
    min-height: 70vh;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: center;
    color: #f9fafb;
}

.hero {
    padding-top: 3.2rem;
}

.hero::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
            radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.28), transparent 55%),
            radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.2), transparent 50%);
    opacity: 0.8;
    z-index: -2;
}

.hero-content h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    color: var(--color-text-soft);
    max-width: 32rem;
    margin-bottom: 1.6rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Botões genéricos */

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    color: #f9fafb;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.6);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 35px rgba(37, 99, 235, 0.8);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 1);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-soft);
    border-color: rgba(148, 163, 184, 0.35);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
}

/* Hero visual placeholder */
.hero-visual {
    border-radius: 26px;
    background: radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.4), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.35), transparent 50%),
    rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 1.5rem;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* ===========================
   Seções genéricas
=========================== */

.section {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 55%),
    #020617;
}

.section-alt {
    background: #020617;
}

.section-header {
    text-align: left;
    margin-bottom: 1.8rem;
}

.section-header h2 {
    font-size: 1.4rem;
    color: #e5e7eb;
    margin-bottom: 0.6rem;
}

.section-header p {
    color: var(--color-text-soft);
    max-width: 40rem;
}

/* ===========================
   Cards genéricos
=========================== */

.card {
    background: radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.12), transparent 55%),
    rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.7);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast), background var(--transition-fast);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.9);
    border-color: rgba(59, 130, 246, 0.7);
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.card p {
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

.card ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.6rem;
}

.card ul li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.35rem;
}

.card ul li a {
    text-decoration: none;
    color: #93c5fd; /* azul clarinho */
    word-break: break-word;
    transition: color 0.15s ease;
}

.card ul li a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.links-card h3 {
    margin-bottom: 0;
}

.card-header-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.card-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.9), rgba(15, 23, 42, 0.95));
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.8);
}

/* Grid genérico (módulos, conformidade, links, etc.) */

.grid-modulos,
.grid-conformidade,
.grid-videos,
.grid-links,
.juris-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

/* ===========================
   Jurisprudência
=========================== */

.juris-container {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
    gap: 1.5rem;
}

.juris-filtros {
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-soft);
}

.juris-filtros h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.7rem;
}

.form-row label {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    margin-bottom: 0.15rem;
}

.form-row select,
.form-row input {
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.95);
    color: var(--color-text);
}

.form-row input::placeholder {
    color: #64748b;
}

.juris-resultados {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.juris-resultados h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.juris-list {
    margin-top: 0.6rem;
}

.juris-item {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.6rem;
    background: radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.15), transparent 60%),
    rgba(15, 23, 42, 0.96);
}

.juris-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.juris-item-header strong {
    font-size: 0.9rem;
}

.juris-meta {
    font-size: 0.75rem;
    color: var(--color-text-soft);
}

.juris-tags {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.juris-tag {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin-right: 0.25rem;
}

/* ===========================
   Cards de vídeo
=========================== */

.video-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-thumb iframe,
.video-thumb img {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-duration {
    position: absolute;
    right: 0.5rem;
    bottom: 0.45rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

.video-body {
    padding: 0.7rem 0.9rem 0.9rem;
}

.video-title {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.video-meta {
    font-size: 0.75rem;
    color: var(--color-text-soft);
}

/* ===========================
   Contato
=========================== */

.contato-wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.8rem;
}

.contato-form {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
}

.contato-info {
    background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.98);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
}

.contato-info a {
    color: #93c5fd;
    text-decoration: none;
}

/* ===========================
   Rodapé
=========================== */

.main-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 0.8rem;
    text-align: center;
    color: var(--color-text-soft);
    padding-bottom: 2rem;
}

/* ===========================
   Responsividade
=========================== */

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        margin-top: 1.2rem;
    }

    .juris-container,
    .contato-wrap {
        grid-template-columns: 1fr;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .section,
    .hero,
    .main-footer {
        padding-inline: 1rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* Área da logo + hambúrguer */
.logo-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Botão do menu (desktop some, mobile aparece) */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(148,163,184,0.7);
    border-radius: 999px;
    color: #e5e7eb;
    font-size: 1.1rem;
    padding: 0.1rem 0.7rem 0.2rem;
    cursor: pointer;
}

/* --- MOBILE --- */
@media (max-width: 768px) {

    .main-header {
        padding-block: 0.5rem;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Menu fechado por padrão */
    .main-nav {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-top: 0.4rem;
        border-top: 1px solid rgba(148,163,184,0.4);
    }

    /* Quando abrir o menu (classe is-open via JS) */
    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        text-align: left;
        padding: 0.5rem 0.2rem;
        border-bottom: 1px solid rgba(30,64,175,0.35);
        border-radius: 0;
    }

    .main-nav .btn-login {
        margin-top: 0.2rem;
        justify-content: center;
        text-align: center;
    }
}

.alert {
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
}

.alert-sucesso {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.5);
    color: #bbf7d0;
}
