/* =====================================================================
   Estilos da área pública – Sistema de Cursos
   ===================================================================== */

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --primary-soft: #eff6ff;
    --accent: #f59e0b;
    --dark: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
}

body.public-body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--dark);
}

/* ----- Topbar ----- */
.public-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.public-navbar .navbar-brand {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}
.public-navbar .nav-link {
    color: var(--dark);
    font-weight: 500;
}
.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: var(--primary);
}
.public-navbar .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

/* ----- Hero ----- */
.public-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.public-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .12), transparent 40%),
                      radial-gradient(circle at 80% 80%, rgba(255, 255, 255, .08), transparent 50%);
    pointer-events: none;
}
.public-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}
.public-hero p.lead {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 640px;
}
.public-hero .btn-light {
    color: var(--primary);
    font-weight: 600;
}

/* ----- Seções ----- */
.section {
    padding: 4rem 0;
}
.section-light {
    background: #ffffff;
}
.section-title {
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
}

/* ----- Cards ----- */
.card-public {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-public:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.card-public .card-img-top {
    height: 180px;
    object-fit: cover;
    background: var(--primary-soft);
}
.card-public .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-public .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}
.card-public .card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ----- Detalhe ----- */
.detail-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 2.5rem 0;
}
.detail-header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}
.detail-meta {
    color: var(--muted);
    font-size: 0.9rem;
}
.content-prose {
    line-height: 1.75;
    font-size: 1.05rem;
}
.content-prose p { margin-bottom: 1rem; }
.content-prose img { max-width: 100%; border-radius: 8px; }
.content-prose h2, .content-prose h3 { font-weight: 700; margin-top: 1.5rem; }

/* ----- Inscrição (form) ----- */
.form-public {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2rem;
}
.form-public .form-label {
    font-weight: 600;
    color: var(--dark);
}
.required-mark::after {
    content: " *";
    color: #dc2626;
}

/* ----- Footer ----- */
.public-footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}
.public-footer a {
    color: #cbd5e1;
    text-decoration: none;
}
.public-footer a:hover { color: #ffffff; }
.public-footer h6 {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.public-footer .copy {
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ----- Utilidades ----- */
.badge-soft-primary {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}
.btn-primary-public {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}
.btn-primary-public:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

@media (max-width: 768px) {
    .public-hero { padding: 3rem 0 2.5rem; }
    .public-hero h1 { font-size: 2rem; }
    .section { padding: 2.5rem 0; }
}
