/* ==========================================================
   CENTRAL DE GUIDELINES — estilos compartilhados
   Reaproveita 1:1 os tokens de cor/tipografia/raio/sombra do
   MedBankQ (mesmas variáveis usadas em index.html / simulado.html)
   para que a Central pareça parte nativa da plataforma.
   ========================================================== */

:root {
    --primary: #4338ca;
    --primary-dark: #312e81;
    --primary-light: #e0e7ff;
    --primary-hover: #4f46e5;

    --success: #10b981;
    --success-dark: #047857;
    --success-bg: #ecfdf5;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;

    --error: #ef4444;
    --error-dark: #b91c1c;
    --error-bg: #fef2f2;

    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;

    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    --header-h: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg); color: var(--text); overflow-x: hidden; }

h1, h2, h3, h4, .font-outfit { font-family: 'Outfit', sans-serif; }
a { text-decoration: none; color: inherit; }

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

/* --- HEADER (idêntico ao restante do MedBankQ) --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
.nav-content { height: var(--header-h); display: flex; justify-content: space-between; align-items: center; position: relative; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo img:first-child { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.logo img.logo-text { height: 26px; object-fit: contain; display: block; margin-top: 5px; }

.nav-links { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; color: var(--text-light); }
.nav-links a { padding: 0.5rem 0.9rem; border-radius: 999px; transition: all 0.2s ease; }
.nav-links a:hover { color: var(--text); background: var(--bg); }
.nav-links a.nav-link-active { color: var(--primary); background: var(--primary-light); font-weight: 700; }

.nav-actions { display: flex; gap: 1.5rem; align-items: center; }
.nav-actions .btn-login { font-weight: 700; font-size: 0.9rem; color: var(--text); transition: 0.2s; }
.nav-actions .btn-login:hover { color: var(--primary); }
.nav-actions .btn { padding: 0.75rem 1.5rem; font-weight: 800; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); padding: 0.5rem; }

.btn {
    padding: 0.85rem 1.75rem; border-radius: var(--radius-md); font-weight: 700;
    cursor: pointer; transition: all 0.3s ease; font-family: 'Outfit', sans-serif; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center; border: none; text-align: center;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px rgba(67, 56, 202, 0.28); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(67, 56, 202, 0.38); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

@media (max-width: 900px) {
    .container { padding: 0 1.25rem; }
    .mobile-toggle { display: block; }
    .nav-links, .nav-actions { display: none; }
    .nav-content.active .nav-links, .nav-content.active .nav-actions {
        display: flex; flex-direction: column; width: 100%; text-align: center; align-items: stretch;
    }
    .nav-content.active .nav-links a { text-align: left; }
    .nav-content.active {
        position: absolute; top: 0; left: 0; right: 0; width: 100%; background: white; height: auto; padding: 1rem 1.25rem 2rem;
        flex-direction: column; align-items: flex-start; border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
    .nav-content.active .logo { margin-bottom: 2rem; }
    .nav-content.active .mobile-toggle { position: absolute; top: 1rem; right: 1.25rem; }
    .nav-content.active .nav-actions { width: 100%; margin-top: 1.5rem; gap: 0.75rem; }
    .nav-content.active .btn-login, .nav-content.active .btn { width: 100%; }
}

/* --- FOOTER (idêntico ao restante do MedBankQ) --- */
footer { background: var(--bg); padding: 4rem 0 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-logo p { color: var(--text-light); margin-top: 1rem; max-width: 300px; line-height: 1.6; }
.footer-social { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--text-light); transition: 0.2s; }
.footer-social:hover { color: var(--primary); }
.footer-social-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.25rem; }
.footer-links h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a { color: var(--text-light); font-weight: 500; transition: 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; color: var(--text-light); font-size: 0.9rem; padding-top: 2rem; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-logo p { margin: 1rem auto; }
}

/* ==========================================================
   CENTRAL DE GUIDELINES — componentes próprios
   ========================================================== */

.gl-main { padding-top: var(--header-h); }

/* --- Breadcrumb --- */
.gl-breadcrumb { padding: 1.75rem 0 0; }
.gl-breadcrumb a {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-weight: 700; font-size: 0.88rem; color: var(--text-light);
    transition: 0.2s;
}
.gl-breadcrumb a:hover { color: var(--primary); }

/* --- Hero --- */
/* Sem overflow:hidden aqui: o dropdown de busca é filho desta seção e
   precisa poder "vazar" para baixo do hero. O glow decorativo (::before)
   não precisa de clipping — body já tem overflow-x:hidden global. */
.gl-hero { padding: 90px 0 50px; text-align: center; position: relative; }
.gl-hero::before {
    content: ''; position: absolute; top: -15%; left: 50%; width: 700px; height: 500px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--primary-light) 0%, rgba(255,255,255,0) 70%);
    z-index: -1; border-radius: 50%; opacity: 0.8; pointer-events: none;
}
.gl-hero-tag {
    display: inline-block; padding: 0.35rem 1rem; background: var(--primary-light); color: var(--primary-dark);
    font-weight: 700; font-size: 0.82rem; border-radius: 50px; margin-bottom: 1.25rem;
    text-transform: uppercase; letter-spacing: 1px;
}
.gl-hero h1 { font-size: 2.75rem; font-weight: 900; letter-spacing: -1px; margin-bottom: 0.85rem; }
.gl-hero p.gl-hero-sub { font-size: 1.15rem; color: var(--text-light); max-width: 560px; margin: 0 auto 2.25rem; line-height: 1.55; }

/* --- Busca --- */
.gl-search-wrap { max-width: 640px; margin: 0 auto; position: relative; }
.gl-search-box {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--card); border: 2px solid var(--border); border-radius: var(--radius-lg);
    padding: 0.4rem 0.5rem 0.4rem 1.25rem; box-shadow: var(--shadow-lg);
    transition: border-color 0.2s ease;
}
.gl-search-box:focus-within { border-color: var(--primary); }
.gl-search-box svg { color: var(--text-light); flex-shrink: 0; width: 22px; height: 22px; }
.gl-search-box input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 1.05rem; font-family: 'Inter', sans-serif; color: var(--text); padding: 0.85rem 0;
}
.gl-search-box input::placeholder { color: var(--text-light); }
.gl-search-clear {
    display: none; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg);
    color: var(--text-light); cursor: pointer; flex-shrink: 0;
}
.gl-search-clear:hover { background: var(--border); color: var(--text); }
.gl-search-clear.visible { display: flex; }

.gl-stats { margin-top: 1.25rem; font-size: 0.88rem; color: var(--text-light); font-weight: 600; }
.gl-stats b { color: var(--text); font-weight: 800; }

/* --- Dropdown de resultados instantâneos --- */
.gl-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); text-align: left; overflow: hidden; z-index: 200;
    max-height: 480px; overflow-y: auto;
}
.gl-dropdown.open { display: block; }
.gl-dropdown-section { padding: 0.85rem 1rem 0.4rem; }
.gl-dropdown-label {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-light); padding: 0 0.25rem 0.5rem;
}
.gl-dropdown-item {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.65rem 0.75rem; border-radius: var(--radius-md); transition: background 0.15s;
}
.gl-dropdown-item:hover, .gl-dropdown-item.active { background: var(--bg); }
.gl-dropdown-item-main { min-width: 0; }
.gl-dropdown-item-title { font-weight: 700; font-size: 0.92rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-dropdown-item-sub { font-size: 0.78rem; color: var(--text-light); margin-top: 1px; }
.gl-dropdown-item-arrow { color: var(--text-light); flex-shrink: 0; }
.gl-dropdown-spec-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem; border-radius: var(--radius-md); transition: background 0.15s; }
.gl-dropdown-spec-item:hover { background: var(--bg); }
.gl-dropdown-spec-icon { font-size: 1.35rem; }
.gl-dropdown-footer {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.9rem; border-top: 1px solid var(--border); font-weight: 700; font-size: 0.88rem;
    color: var(--primary); cursor: pointer;
}
.gl-dropdown-footer:hover { background: var(--bg); }
.gl-dropdown-empty { padding: 2rem 1.25rem; text-align: center; color: var(--text-light); font-size: 0.92rem; }

/* --- Seções gerais --- */
.gl-section { padding: 70px 0; }
.gl-section.gl-section-alt { background: white; }
.gl-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; flex-wrap: wrap; }
.gl-section-header h2 { font-size: 1.85rem; font-weight: 800; }
.gl-section-header p { color: var(--text-light); font-size: 0.98rem; margin-top: 0.4rem; }
.gl-section-count { font-size: 0.85rem; font-weight: 700; color: var(--text-light); background: var(--bg); border: 1px solid var(--border); padding: 0.35rem 0.85rem; border-radius: 50px; white-space: nowrap; }

/* --- Card de guideline --- */
.gl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gl-card {
    display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 1.75rem; box-shadow: var(--shadow-sm);
    transition: all 0.25s ease; position: relative;
}
.gl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.gl-card-eyebrow { display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.75rem; }
.gl-card-eyebrow .dot { color: var(--border); }
.gl-card-title { font-size: 1.1rem; font-weight: 800; color: var(--text); line-height: 1.35; margin-bottom: 0.6rem; }
.gl-card-org { font-size: 0.88rem; color: var(--text-light); font-weight: 600; margin-bottom: 1rem; }
.gl-card-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; margin-top: auto; }
.gl-card-year { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 0.92rem; color: var(--text); }
.gl-badge {
    font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.65rem; border-radius: 50px;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.gl-badge-essencial { background: var(--primary-light); color: var(--primary-dark); }
.gl-badge-muito-importante { background: var(--success-bg); color: var(--success-dark); }
.gl-badge-importante { background: var(--warning-bg); color: #92400e; }
.gl-badge-especializada { background: var(--bg); color: var(--text-light); border: 1px solid var(--border); }
.gl-status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.gl-status-atual { background: var(--success); }
.gl-status-parcial { background: var(--warning); }
.gl-status-substituida, .gl-status-desatualizada { background: var(--error); }
.gl-status-nao-verificada { background: var(--text-light); }
.gl-card-cta {
    display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.92rem;
    color: var(--primary); padding-top: 1rem; border-top: 1px solid var(--border);
}
.gl-card:hover .gl-card-cta { gap: 0.6rem; }
.gl-card-link-overlay { position: absolute; inset: 0; border-radius: inherit; }

@media (max-width: 1024px) { .gl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gl-grid { grid-template-columns: 1fr; } }

/* --- Destaques: uma linha com scroll horizontal + seta para expandir --- */
.gl-featured-row {
    display: flex; gap: 1.5rem; overflow-x: auto; padding: 0.25rem 0.25rem 1rem;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.gl-featured-row::-webkit-scrollbar { height: 6px; }
.gl-featured-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.gl-featured-row .gl-card { flex: 0 0 320px; scroll-snap-align: start; }
@media (max-width: 480px) { .gl-featured-row .gl-card { flex-basis: 82vw; } }

.gl-expand-toggle {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; margin-top: 0.5rem; padding: 0.85rem; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer;
    font-weight: 700; font-size: 0.9rem; color: var(--text-light); transition: all 0.2s ease;
}
.gl-expand-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.gl-expand-toggle svg { transition: transform 0.25s ease; }
.gl-expand-toggle.expanded svg { transform: rotate(180deg); }

/* --- Cards de especialidade --- */
.gl-spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gl-spec-card {
    display: flex; align-items: center; gap: 1.1rem; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 1.5rem 1.6rem; transition: all 0.25s ease;
}
.gl-spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.gl-spec-icon {
    width: 54px; height: 54px; border-radius: 16px; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0;
}
.gl-spec-name { font-weight: 800; font-size: 1.02rem; color: var(--text); margin-bottom: 0.2rem; }
.gl-spec-count { font-size: 0.85rem; color: var(--text-light); font-weight: 600; display: flex; align-items: center; gap: 0.3rem; }
.gl-spec-card:hover .gl-spec-count { color: var(--primary); }

@media (max-width: 1024px) { .gl-spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gl-spec-grid { grid-template-columns: 1fr; } }

/* --- Chips de tema / filtros --- */
.gl-chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.25rem; }
.gl-chip {
    padding: 0.55rem 1.1rem; border-radius: 50px; border: 1px solid var(--border); background: var(--card);
    font-weight: 700; font-size: 0.86rem; color: var(--text-light); cursor: pointer; transition: all 0.18s ease;
}
.gl-chip:hover { border-color: var(--primary); color: var(--primary); }
.gl-chip.active { background: var(--primary); border-color: var(--primary); color: white; }

.gl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.gl-select-group { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; color: var(--text-light); }
.gl-select {
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.55rem 0.9rem;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.86rem; color: var(--text);
    background: var(--card); cursor: pointer;
}

/* --- Estado vazio --- */
.gl-empty { text-align: center; padding: 3.5rem 1rem; color: var(--text-light); }
.gl-empty svg { color: var(--border); margin-bottom: 1rem; }
.gl-empty p { font-size: 1rem; font-weight: 600; }

/* --- Header de especialidade --- */
.gl-page-head { padding: 1.5rem 0 2.5rem; }
.gl-page-head-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1.25rem; }
.gl-page-head h1 { font-size: 2.25rem; font-weight: 900; margin-bottom: 0.6rem; letter-spacing: -0.5px; }
.gl-page-head p { color: var(--text-light); font-size: 1.05rem; max-width: 640px; line-height: 1.55; margin-bottom: 0.75rem; }
.gl-page-head .gl-section-count { display: inline-flex; }

.gl-spec-search { max-width: 480px; margin-top: 1.5rem; }

/* --- Loading skeleton simples --- */
.gl-skel { background: linear-gradient(90deg, var(--bg) 25%, var(--border) 37%, var(--bg) 63%); background-size: 400% 100%; animation: gl-skel 1.4s ease infinite; border-radius: var(--radius-xl); height: 210px; }
@keyframes gl-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Foco acessível */
.gl-search-box input:focus, .gl-chip:focus-visible, .gl-select:focus-visible, .gl-card:focus-within, a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}

@media (max-width: 640px) {
    .gl-hero { padding: 70px 0 40px; }
    .gl-hero h1 { font-size: 1.9rem; }
    .gl-hero p.gl-hero-sub { font-size: 1rem; }
    .gl-section { padding: 50px 0; }
    .gl-section-header { flex-direction: column; align-items: flex-start; }
    .gl-page-head h1 { font-size: 1.7rem; }
    .gl-toolbar { flex-direction: column; align-items: flex-start; }
}
