/* ==========================================================================
   CNPP Portal Legislativo — Estilos Base y Layout (Gobierno.com.mx)
   ========================================================================== */

:root {
    --brand-dark: #173C36;
    --brand-primary: #27604E;
    --brand-secondary: #24664C;
    --accent-gold: #B99A61;
    --accent-gold-soft: #F7F2E8;
    --bg-page: #F4F7F5;
    --bg-surface: #FFFFFF;
    --bg-editorial: #F8FAF9;
    --bg-subtle: #EDF2EF;
    --text-main: #202825;
    --text-muted: #596761;
    --border-subtle: #DDE5E0;
    --border-strong: #BCCAC3;
    --danger-bg: #FDF2F2;
    --danger-text: #8B2626;
    --danger-border: #EAC4C4;
    --warn-bg: #FEF9EC;
    --warn-text: #7A5410;
    --warn-border: #E8D5A3;
    --success-bg: #ECF7F1;
    --success-text: #1B5439;
    --success-border: #B5DDC8;
    --font-sans: 'Source Sans 3', 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(23, 60, 54, 0.06);
    --shadow-md: 0 4px 16px rgba(23, 60, 54, 0.08);
    --legal-font-size: 1.09375rem; /* ~17.5px */
    --legal-line-height: 1.76;
}

html[data-font-size="sm"] {
    --legal-font-size: 0.96875rem;
    --legal-line-height: 1.65;
}

html[data-font-size="lg"],
html[data-font-size="xl"] {
    --legal-font-size: 1.21875rem;
    --legal-line-height: 1.85;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-primary);
    text-underline-offset: 2px;
}

a:hover {
    color: var(--brand-dark);
}

:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 10px 16px;
    background: var(--brand-dark);
    color: #FFFFFF;
    z-index: 9999;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Primary Navigation */
.site-header {
    background: var(--brand-dark);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.site-header-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    text-decoration: none;
}

.brand-home-link:hover {
    color: #F4EFE3;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.brand-text small {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
}

.brand-divider {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.brand-law-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(185, 154, 97, 0.22);
    border: 1px solid rgba(185, 154, 97, 0.55);
    color: #F8EDD6;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 8px;
}

.font-size-controls {
    display: inline-flex;
    gap: 4px;
}

.util-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
}

.util-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#cnpp-mobile-nav-toggle {
    display: none;
}

.site-header-nav-bar {
    background: var(--brand-primary);
    padding: 8px 0;
}

.nav-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.primary-nav-link {
    display: inline-block;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.primary-nav-link:hover,
.primary-nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
}

.primary-nav-link.is-active {
    box-shadow: inset 0 -2px 0 var(--accent-gold);
}

.header-quick-search {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1 1 260px;
    max-width: 340px;
}

.header-quick-search input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.9rem;
    background: #FFFFFF;
    color: #202825;
    min-height: 36px;
}

.header-quick-search button {
    padding: 7px 14px;
    border: 1px solid var(--accent-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--accent-gold);
    color: #17201D;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 36px;
}

/* Breadcrumbs */
.breadcrumbs-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 9px 0;
    font-size: 0.875rem;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    align-items: center;
}

.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.breadcrumbs-item a {
    text-decoration: none;
    color: var(--brand-primary);
    font-weight: 600;
}

.breadcrumbs-item a:hover {
    text-decoration: underline;
}

.breadcrumbs-sep {
    color: var(--border-strong);
}

/* Main 3-column / 2-column Shell */
.portal-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 42px;
    align-items: start;
}

.portal-shell.has-right-sidebar {
    grid-template-columns: 270px minmax(0, 1fr) 300px;
}

.portal-main {
    min-width: 0;
}

.portal-left-nav,
.portal-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.drawer-mobile-header {
    display: none;
}

/* Footer */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.88);
    padding-top: 38px;
    margin-top: 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
    padding-bottom: 30px;
}

.footer-heading {
    color: #F4E9D2;
    font-size: 0.98rem;
    margin: 0 0 12px;
    font-weight: 700;
}

.footer-desc,
.footer-meta {
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 7px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.89rem;
}

.footer-links a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.14);
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
}

.footer-disclaimer,
.footer-copy {
    margin: 0;
}
