/* ============================================================
   LIBERE LEGALE ROMÂNIA — Main Stylesheet
   ============================================================ */

/* --- Reset & Variables --- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root {
    --bg: #FAFAF7;
    --bg2: #F2F1EC;
    --bg3: #ECEAE3;
    --tx: #1A1A18;
    --tx2: #5A5A55;
    --tx3: #8A8A85;
    --accent: #1D6B4F;
    --accent2: #E8F5EE;
    --accent3: #145039;
    --coral: #D85A30;
    --coral-bg: #FFF3EE;
    --blue: #2E6AB3;
    --blue-bg: #EEF4FB;
    --border: #E0DED8;
    --border2: #D0CEC8;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'DM Sans', -apple-system, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.06);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--tx);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent3); }

img { max-width: 100%; height: auto; }

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250,250,247,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--tx);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.nav-logo span { color: var(--accent); }
.nav-logo:hover { color: var(--tx); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    font-size: .875rem;
    font-weight: 500;
    color: var(--tx2);
    transition: color .2s;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-hamburger svg {
    width: 24px;
    height: 24px;
    stroke: var(--tx);
    stroke-width: 2;
}

/* --- Hero --- */
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--accent2);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 500;
    padding: .35rem .9rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}
.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--tx);
    letter-spacing: -.02em;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p {
    font-size: 1.1rem;
    color: var(--tx2);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.hero-stat .label { font-size: .8rem; color: var(--tx3); margin-top: .15rem; }

/* --- Countdown --- */
.countdown-section { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 3rem; }

.countdown-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.countdown-label { font-size: .85rem; color: var(--tx3); margin-bottom: .25rem; }
.countdown-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tx);
    margin-bottom: .25rem;
}
.countdown-date { font-size: .9rem; color: var(--tx2); margin-bottom: 1.5rem; }
.countdown-timer { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.countdown-unit {
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: .75rem 1.25rem;
    min-width: 80px;
}
.countdown-unit .val {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}
.countdown-unit .lbl {
    font-size: .7rem;
    color: var(--tx3);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* --- Section --- */
.section { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem; }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-header h1,
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--tx);
    margin-bottom: .5rem;
}
.section-header p { color: var(--tx2); font-size: .95rem; max-width: 500px; margin: 0 auto; }

/* --- Year Selector --- */
.year-selector { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.year-selector .year-btn,
.year-selector button {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .4rem .75rem;
    cursor: pointer;
    font-size: .9rem;
    color: var(--tx2);
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}
.year-selector .year-btn:hover,
.year-selector button:hover { border-color: var(--accent); color: var(--accent); }
.year-selector .current-year {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* --- Holiday Items --- */
.holidays-grid { display: grid; gap: .75rem; }

.holiday-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all .25s;
    cursor: default;
}
.holiday-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.holiday-item.past { opacity: .5; }
.holiday-item.today { border-color: var(--coral); background: var(--coral-bg); }
.holiday-item.next { border-color: var(--accent); background: var(--accent2); }

.holiday-date-box {
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    text-align: center;
    min-width: 70px;
    flex-shrink: 0;
}
.holiday-date-box .day {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tx);
    display: block;
    line-height: 1;
}
.holiday-date-box .month {
    font-size: .7rem;
    color: var(--tx3);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.holiday-info h3 { font-size: .95rem; font-weight: 500; color: var(--tx); margin-bottom: .15rem; }
.holiday-info .meta { font-size: .8rem; color: var(--tx3); }

.holiday-tag {
    margin-left: auto;
    font-size: .7rem;
    font-weight: 500;
    padding: .25rem .6rem;
    border-radius: 100px;
    flex-shrink: 0;
    white-space: nowrap;
}
.holiday-tag.weekend { background: var(--bg3); color: var(--tx3); }
.holiday-tag.workday { background: var(--accent2); color: var(--accent); }
.holiday-tag.bridge { background: var(--blue-bg); color: var(--blue); }

/* --- Bridge Days --- */
.bridge-days-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.bridge-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; text-align: center; margin-bottom: .25rem; }
.bridge-subtitle { font-size: .85rem; color: var(--tx2); text-align: center; margin-bottom: 1rem; }
.bridge-grid { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.bridge-card {
    background: var(--blue-bg);
    border: 1px solid #C8DDF0;
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
}
.bridge-date { font-weight: 600; color: var(--blue); }
.bridge-info { color: var(--tx2); }

/* --- Calculator --- */
.calc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.calc-row { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.calc-field { flex: 1; min-width: 200px; }
.calc-field label { display: block; font-size: .8rem; color: var(--tx3); margin-bottom: .35rem; font-weight: 500; }
.calc-field input {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
    background: #fff;
    color: var(--tx);
    transition: border-color .2s;
}
.calc-field input:focus { outline: none; border-color: var(--accent); }
.calc-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: .65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.calc-btn:hover { background: var(--accent3); }

.calc-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.calc-result-card { background: var(--bg2); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.calc-result-card .val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--accent); display: block; }
.calc-result-card .lbl { font-size: .75rem; color: var(--tx3); margin-top: .2rem; }

/* --- Blog --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

.blog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .25s;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.blog-card-img {
    height: 160px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    overflow: hidden;
}
.blog-card-body { padding: 1.25rem; }
.blog-card-body .tag,
.tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent2);
    padding: .2rem .5rem;
    border-radius: 100px;
    margin-bottom: .5rem;
}
.blog-card-body h3 { font-size: 1rem; font-weight: 500; color: var(--tx); margin-bottom: .35rem; line-height: 1.4; }
.blog-card-body h3 a { color: var(--tx); }
.blog-card-body h3 a:hover { color: var(--accent); }
.blog-card-body p { font-size: .85rem; color: var(--tx2); line-height: 1.5; }
.read-more {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: var(--accent);
    font-weight: 500;
}

.btn-outline {
    display: inline-block;
    padding: .5rem 1.25rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Filter Tags */
.filter-tag {
    display: inline-block;
    padding: .35rem .8rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: .8rem;
    color: var(--tx2);
    transition: all .2s;
}
.filter-tag:hover, .filter-tag.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* --- FAQ --- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }

.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 500;
    color: var(--tx);
    text-align: left;
    gap: 1rem;
}
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--tx3); transition: transform .3s; }
.faq-q.open svg { transform: rotate(45deg); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; font-size: .9rem; color: var(--tx2); line-height: 1.7; }
.faq-a-inner { padding: 0 0 1.25rem; }

/* --- Newsletter --- */
.newsletter {
    background: var(--accent);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    margin: 3rem 0;
}
.newsletter h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: .5rem; }
.newsletter p { opacity: .85; font-size: .9rem; margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: .5rem; max-width: 400px; margin: 0 auto; }
.newsletter-form input {
    flex: 1;
    padding: .6rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
}
.newsletter-form button {
    background: #fff;
    color: var(--accent);
    border: none;
    padding: .6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .2s;
}
.newsletter-form button:hover { opacity: .9; }
.alert-success { background: rgba(255,255,255,.2); padding: .5rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .85rem; }

/* --- Article Content --- */
.article-content { font-size: 1.05rem; line-height: 1.8; color: var(--tx); }
.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 .75rem;
    color: var(--tx);
}
.article-content h3 { font-size: 1.15rem; font-weight: 500; margin: 1.5rem 0 .5rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0 0 1rem 1.5rem; }
.article-content li { margin-bottom: .35rem; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: .75rem 1rem;
    margin: 1rem 0;
    background: var(--bg2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--tx2);
}

/* Share Buttons */
.share-btn {
    display: inline-block;
    padding: .4rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    color: var(--tx2);
    transition: all .2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* --- Footer --- */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; margin-top: 2rem; }
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-copy { font-size: .8rem; color: var(--tx3); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-size: .8rem; color: var(--tx3); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(250,250,247,.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .75rem 0; border-bottom: 1px solid var(--border); }
    .nav-links li:last-child a { border: none; }
    .nav-hamburger { display: block; }
    .hero { padding: 2.5rem 1.5rem 2rem; }
    .hero-stats { gap: 1.5rem; }
    .countdown-timer { gap: .5rem; }
    .countdown-unit { min-width: 65px; padding: .5rem .75rem; }
    .countdown-unit .val { font-size: 1.4rem; }
    .calc-row { flex-direction: column; }
    .newsletter-form { flex-direction: column; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .holiday-item { flex-wrap: wrap; }
    .holiday-tag { margin-left: 0; }
}

/* --- Currency Widget --- */
.currency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem;
}
@media (max-width: 768px) { .currency-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .currency-grid { grid-template-columns: 1fr; } }
.currency-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .2s;
}
.currency-item:hover { border-color: var(--accent); }
.currency-flag { font-size: 1.5rem; line-height: 1; }
.currency-info { flex: 1; display: flex; flex-direction: column; }
.currency-code { font-weight: 600; font-size: .9rem; color: var(--tx); }
.currency-name { font-size: .7rem; color: var(--tx3); }
.currency-rate {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--accent);
    white-space: nowrap;
}

/* --- Hamburger fix for mobile --- */
.nav { position: sticky; top: 0; z-index: 1000; }
.nav-links { z-index: 999; }

