/* ═══════════════════════════════════════════════════════════════
   EducaItapoá — stylesheet principal + admin
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary:      #1565C0;
    --primary-dark: #0D47A1;
    --primary-lt:   #E3F0FF;
    --accent:       #FFC107;
    --text:         #1E293B;
    --muted:        #64748B;
    --border:       #E2E8F0;
    --bg-light:     #F5F8FF;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: #fff;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
    background: var(--primary-dark);
    font-size: .8rem;
}
.topbar-link {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: color .15s;
}
.topbar-link:hover { color: #fff; }

/* ── Site header ────────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.site-logo {
    height: 58px;
    width: auto;
}
.header-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.2;
}
.header-sub {
    color: var(--muted);
    font-size: .82rem;
}
.header-contact-label {
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
}
.header-contact-value {
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
}
.header-search { width: 340px; max-width: 38vw; }
.header-search .form-control {
    border-color: var(--border);
}
.header-search .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(21,101,192,.12);
}
@media (max-width: 575px) {
    .header-title { font-size: 1rem; }
    .header-sub   { font-size: .75rem; }
    .site-logo    { height: 44px; }
}

/* ── Sidebar da home ────────────────────────────────────────────── */
.sidebar-link {
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    padding: .4rem .6rem;
    border-radius: 8px;
    transition: background .12s, color .12s, padding-left .12s;
}
.sidebar-link:hover {
    background: var(--primary-lt);
    color: var(--primary);
    padding-left: .9rem;
}

/* ── Artigos completos na home ──────────────────────────────────── */
.home-article .article-content { font-size: .96rem; }
.home-article .article-content img { max-width: 100%; height: auto; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.site-navbar {
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(21,101,192,.25);
}
.site-navbar .nav-link {
    font-weight: 500;
    font-size: .9rem;
    padding: .55rem .9rem;
    border-radius: 6px;
    transition: background .15s;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    background: rgba(255,255,255,.18);
}
.site-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    border-radius: 10px;
    padding: .5rem;
    margin-top: .3rem;
}
.site-navbar .dropdown-item {
    border-radius: 6px;
    padding: .45rem 1rem;
    font-size: .88rem;
    transition: background .12s;
}
.site-navbar .dropdown-item:hover {
    background: var(--primary-lt);
    color: var(--primary);
}
.site-navbar .form-control {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.25);
    color: #fff;
    font-size: .88rem;
}
.site-navbar .form-control::placeholder { color: rgba(255,255,255,.6); }
.site-navbar .form-control:focus {
    background: rgba(255,255,255,.25);
    color: #fff;
    box-shadow: none;
    border-color: rgba(255,255,255,.5);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero-section {
    padding: 72px 0 80px;
}
.hero-sub {
    color: rgba(255,255,255,.82);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ── Section titles ─────────────────────────────────────────────── */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    padding-bottom: .55rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 38px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* ── Banners de acesso rápido ───────────────────────────────────── */
.banner-img {
    transition: transform .18s, box-shadow .18s;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.banner-link:hover .banner-img {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
}
.banner-placeholder {
    background: var(--primary);
    min-height: 68px;
    transition: transform .18s;
}
.banner-link:hover .banner-placeholder {
    transform: translateY(-4px);
}

/* ── Article cards ──────────────────────────────────────────────── */
.article-card {
    border-radius: 12px !important;
    transition: transform .18s, box-shadow .18s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.1) !important;
}
.badge-cat {
    background: var(--primary-lt);
    color: var(--primary);
    font-weight: 600;
    font-size: .73rem;
    padding: .3em .65em;
    border-radius: 20px;
}

/* ── Lista de publicações (home) ────────────────────────────────── */
.pub-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-lt);
    color: var(--primary);
    font-size: 1.2rem;
}
.list-group-item-action:hover .pub-icon {
    background: var(--primary);
    color: #fff;
}
.list-group-item-action { transition: background .12s; }

/* ── Cards de escolas (home) ────────────────────────────────────── */
.escola-card {
    border-radius: 12px !important;
    transition: transform .18s, box-shadow .18s;
}
.escola-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.1) !important;
}
.escola-ico {
    width: 38px;
    height: 38px;
    background: var(--primary-lt);
    color: var(--primary);
}

/* ── Botão do menu (mobile, na linha da logo) ───────────────────── */
.menu-toggle {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 46px;
    height: 42px;
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle:active { background: var(--primary-dark); }

/* Navbar no mobile: sem faixa azul vazia quando o menu está fechado */
@media (max-width: 991.98px) {
    .site-navbar { padding-top: 0; padding-bottom: 0; box-shadow: none; }
    .site-navbar .navbar-collapse { padding: .5rem 0 .75rem; }
    .site-navbar.sticky-top { position: static; }
}

/* ── Article content ────────────────────────────────────────────── */
.article-content {
    line-height: 1.85;
    font-size: 1rem;
}
.article-content img { max-width: 100%; height: auto; border-radius: 6px; }
/* Vídeos do YouTube / iframes responsivos */
.article-content iframe {
    max-width: 100%;
    border-radius: 6px;
}
@media (max-width: 767.98px) {
    .article-content iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
.article-content a { color: var(--primary); }
.article-content h2,
.article-content h3 { margin-top: 1.8rem; font-weight: 700; }
.article-content ul,
.article-content ol { padding-left: 1.5rem; }

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb { font-size: .85rem; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
    background: #0F172A;
}
.site-footer h6 { color: #F8FAFC; }
.footer-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: .88rem;
    transition: color .15s;
}
.footer-link:hover { color: #E2E8F0; }
.site-footer .text-muted { color: #94A3B8 !important; }
.site-footer hr { border-color: #1E293B; }

/* ── Pagination ─────────────────────────────────────────────────── */
.page-link { color: var(--primary); }
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════
   PAINEL ADMINISTRATIVO
   ═══════════════════════════════════════════════════════════════ */

.admin-body {
    background: #F1F5F9;
}

/* Sidebar */
.admin-sidebar {
    background: #0F172A;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.65);
    border-radius: 8px;
    font-size: .88rem;
    padding: .45rem .75rem;
    transition: background .12s, color .12s;
}
.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.admin-sidebar .nav-link.active {
    background: var(--primary) !important;
    color: #fff !important;
}

/* Topbar admin */
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    min-height: 52px;
    padding-top: .6rem;
    padding-bottom: .6rem;
}

/* Responsive admin sidebar (hidden on small screens) */
@media (max-width: 768px) {
    .admin-sidebar { display: none !important; }
}
