@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Sans:wght@300;400;500&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
    --bg: #f5f2ec;
    --bg2: #edeae2;
    --surface: #ffffff;
    --border: #d6d0c4;
    --border-strong: #b0a898;
    --ink: #1a1814;
    --ink2: #4a4540;
    --ink3: #7a7268;
    --accent: #1a3a5c;
    --accent2: #8b4513;
    --accent-light: rgba(26,58,92,0.08);
    --rule: #c8bfb0;
    --badge-bg: #1a3a5c;
    --badge-text: #ffffff;
    --link: #1a3a5c;
    --link-hover: #8b4513;
    --update: #2d5a1b;
    --update-bg: #f0f7ec;
    --warning: #7a4a00;
    --warning-bg: #fdf5e6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
    background: var(--accent);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-brand a {
    display: flex;
    align-items: center;
    line-height: 0;


}

.header-logo {
    height: 34px;
    width: auto;
    display: block;
    opacity: 1;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.85;
}

/* ── Language nav ── */
.lang-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.lang-nav a {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.lang-nav a:hover,
.lang-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.lang-nav a.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

/* ── Hero banner ── */
.hero {
    background: var(--accent);
    color: #fff;
    padding: 3.5rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    display: none;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: rgba(255,255,255,0.4);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
}

.hero-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.72);
    max-width: 620px;
    font-weight: 300;
}

/* ── Main layout ── */
.main-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

/* ── Section ── */
.law-section {
    margin-bottom: 2.5rem;
    animation: fadeUp 0.6s ease both;
}

.law-section:nth-child(2) { animation-delay: 0.1s; }
.law-section:nth-child(3) { animation-delay: 0.2s; }

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}

.section-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.section-icon svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
}

/* ── Law items ── */
.law-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.law-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    padding: 1.25rem 1.5rem;
    position: relative;
    transition: border-left-color 0.2s, box-shadow 0.2s;
}

.law-item:hover {
    border-left-color: var(--accent);
    box-shadow: 0 2px 12px rgba(26,58,92,0.08);
}

.law-item.updated {
    border-left-color: var(--update);
    background: var(--update-bg);
}

.law-item.new-law {
    border-left-color: var(--accent2);
}

.law-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.law-tag {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(26,58,92,0.15);
}

.law-tag.tag-eu {
    background: #e8f0ff;
    color: #1a3a8b;
    border-color: rgba(26,58,139,0.2);
}

.law-tag.tag-es {
    background: #fff0e8;
    color: #8b3a1a;
    border-color: rgba(139,58,26,0.2);
}

.law-tag.tag-updated {
    background: var(--update-bg);
    color: var(--update);
    border-color: rgba(45,90,27,0.2);
}

.law-tag.tag-new {
    background: #fff8e8;
    color: var(--warning);
    border-color: rgba(122,74,0,0.2);
}

.law-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    color: var(--ink3);
}

.law-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.law-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--link);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    padding-top: 0.25rem;
}

.law-link:hover { color: var(--link-hover); }

.law-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ── Update notice ── */
.update-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--update-bg);
    border: 1px solid rgba(45,90,27,0.2);
    border-left: 3px solid var(--update);
    padding: 0.7rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--update);
    line-height: 1.5;
}

/* ── Sidebar ── */
.sidebar {
    position: sticky;
    top: 70px;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-list li {
    font-size: 0.8rem;
    color: var(--ink2);
    display: flex;
    gap: 0.5rem;
    line-height: 1.4;
}

.sidebar-list li::before {
    content: '›';
    color: var(--accent);
    flex-shrink: 0;
    font-weight: 500;
}

.sidebar-badge {
    display: block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.sidebar-badge .badge-label {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.3rem;
}

.sidebar-badge .badge-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
}

.last-update {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

/* ── Footer ── */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.55);
}

.footer-disclaimer {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 1.1rem 2rem;
    text-align: center;
}

.footer-disclaimer p {
    max-width: 860px;
    margin: 0 auto;
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.38);
    font-style: italic;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.78rem;
}

.footer-copy a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-copy a:hover { color: #fff; }

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: rgba(255,255,255,0.85); }

/* ── Divider ── */
.section-divider {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2rem 0;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .main-wrap {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .header-inner { padding: 0.9rem 1rem; }
    .hero { padding: 2.5rem 1rem 2rem; }
    .main-wrap { padding: 2rem 1rem 3rem; }
    .header-title { font-size: 0.95rem; }
    .lang-nav a { padding: 0.25rem 0.5rem; font-size: 0.65rem; }
}
