.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-brand);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 64, 175, 0.72);
    z-index: 1;
}

.hero-diagonal {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background-color: #fff;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    text-align: center;
}

.hero-pretitle {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.hero-content h1 {
    color: #fff;
    font-size: clamp(32px, 6vw, 58px);
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.hero-sub {
    color: rgba(255,255,255,0.85);
    font-size: 18px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 36px;
}

.categories-strip {
    padding: 56px 0 52px;
    background-color: #fff;
    position: relative;
    z-index: 4;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    background-color: #f4f7ff;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: border-color 0.2s, background-color 0.2s;
    gap: 10px;
}

.cat-item:hover,
.cat-item:focus {
    border-color: var(--color-brand);
    background-color: #eef2ff;
    text-decoration: none;
    outline: none;
}

.cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-brand);
}

.cat-label {
    font-weight: 700;
    font-size: 14px;
    color: #111;
    line-height: 1.6;
}

.cat-count {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.featured-section {
    padding: 64px 0;
    background-color: #fff;
}

.articles-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.card-featured {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.card-featured__img img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.card-featured__body {
    padding: 28px;
}

.card-featured__cat {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-brand);
    display: block;
    margin-bottom: 10px;
    line-height: 1.6;
}

.card-featured__body h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.card-featured__body h3 a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.card-featured__body h3 a:hover {
    color: var(--color-brand);
}

.card-featured__excerpt {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card-article {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: box-shadow 0.2s;
}

.card-article:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-article__img img {
    width: 140px;
    height: 100%;
    min-height: 110px;
    object-fit: cover;
    display: block;
}

.card-article__body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.card-article__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-brand);
    line-height: 1.6;
}

.card-article__body h3 {
    font-size: 15px;
    margin: 0 0 4px 0;
    line-height: 1.6;
}

.card-article__body h3 a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.card-article__body h3 a:hover {
    color: var(--color-brand);
}

.card-article__excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-article .card-meta {
    margin-top: 4px;
}

.fcard__time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.fcard__time svg {
    color: var(--color-brand);
    flex-shrink: 0;
}

.timeline-section {
    padding: 80px 0;
    background-color: var(--color-brand);
    position: relative;
    overflow: hidden;
    margin: 60px 0;
    clip-path: polygon(0 40px, 100% 0, 100% calc(100% - 40px), 0 100%);
    padding-top: 100px;
    padding-bottom: 100px;
}

.timeline-section .section-header h2 {
    color: #fff;
}

.timeline-section .section-sub {
    color: rgba(255,255,255,0.8);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255,255,255,0.25);
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 24px 1fr;
    align-items: start;
    gap: 20px;
    margin-bottom: 36px;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-dot {
    grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-year {
    display: none;
}

.timeline-item:nth-child(even) .timeline-year {
    display: none;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-dot {
    grid-column: 2;
    grid-row: 1;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
    border: 3px solid rgba(255,255,255,0.7);
    margin-top: 4px;
    justify-self: center;
}

.timeline-item--active .timeline-dot {
    background-color: var(--color-cta);
    border-color: #fff;
}

.timeline-content {
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 16px 20px;
}

.timeline-year {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.6;
}

.timeline-content .timeline-year {
    display: block;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    content: attr(data-year);
}

.timeline-content .timeline-text {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.timeline-content strong.timeline-year {
    display: block;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.6;
}

.calculator-section {
    padding: 72px 0;
    background-color: #f4f7ff;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.calculator-form {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-field label {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    line-height: 1.6;
}

.calc-select {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.6;
    color: #222;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    width: 100%;
}

.calc-select:focus {
    border-color: var(--color-brand);
    outline: none;
}

.btn-calc {
    align-self: flex-start;
    margin-top: 8px;
}

.calculator-result {
    padding: 36px;
    background-color: #f4f7ff;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-placeholder {
    text-align: center;
    color: #aaa;
}

.result-placeholder p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 12px 0 0 0;
    line-height: 1.6;
}

.result-content {
    width: 100%;
}

.result-level {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: 12px;
    line-height: 1.6;
}

.result-content p {
    font-size: 15px;
    color: #444;
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-reco {
    background-color: #fff;
    border-left: 3px solid var(--color-brand);
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.6;
}

.result-reco strong {
    display: block;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.result-reco span {
    color: #444;
}

.filters-section {
    padding: 72px 0;
    background-color: #fff;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background-color: #fff;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    line-height: 1.6;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.filter-btn:hover,
.filter-btn:focus {
    border-color: var(--color-brand);
    color: var(--color-brand);
    outline: none;
}

.filter-btn--active {
    border-color: var(--color-brand);
    background-color: var(--color-brand);
    color: #fff;
    font-weight: 700;
}

.filter-btn--active:hover {
    color: #fff;
}

.filtered-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.fcard {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: box-shadow 0.2s, transform 0.2s;
}

.fcard:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.fcard.hidden {
    display: none;
}

.fcard__img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.fcard__body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fcard__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-brand);
    line-height: 1.6;
}

.fcard__body h3 {
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.fcard__body h3 a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.fcard__body h3 a:hover {
    color: var(--color-brand);
}

.stats-section {
    padding: 72px 0;
    background-color: #f4f7ff;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--color-brand);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stats-table thead tr {
    background-color: var(--color-brand);
}

.stats-table thead th {
    color: #fff;
    font-weight: 700;
    padding: 14px 20px;
    text-align: left;
    font-size: 15px;
    line-height: 1.6;
}

.stats-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s;
}

.stats-table tbody tr:hover {
    background-color: #f4f7ff;
}

.stats-table tbody tr:last-child {
    border-bottom: none;
}

.stats-table tbody td {
    padding: 13px 20px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.stats-table tbody td:first-child {
    font-weight: 700;
    color: #111;
}

.stats-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

.newsletter-section {
    padding: 72px 0;
    background-color: #fff;
}

.newsletter-box {
    background-color: var(--color-brand);
    border-radius: 8px;
    padding: 52px 48px;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 32px;
    align-items: center;
}

.newsletter-icon {
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

.newsletter-text h2 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 26px;
}

.newsletter-text p {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.newsletter-form {
    min-width: 300px;
}

.newsletter-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    transition: border-color 0.2s;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.55);
}

.newsletter-input:focus {
    border-color: #fff;
    outline: none;
    background-color: rgba(255,255,255,0.2);
}

.newsletter-legal {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin: 10px 0 0 0;
    line-height: 1.6;
}

.newsletter-msg {
    font-size: 14px;
    color: #fff;
    margin: 8px 0 0 0;
    line-height: 1.6;
    min-height: 1em;
}

@media (max-width: 1024px) {
    .newsletter-box {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
        padding: 40px 32px;
    }

    .newsletter-icon {
        justify-self: center;
    }

    .newsletter-fields {
        justify-content: center;
    }

    .newsletter-form {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 480px;
    }

    .hero-content {
        padding: 60px 16px 100px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-sub {
        font-size: 16px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .articles-featured {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .card-article {
        grid-template-columns: 100px 1fr;
    }

    .card-article__img img {
        width: 100px;
    }

    .timeline-section {
        clip-path: none;
        padding: 60px 0;
        margin: 40px 0;
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item {
        grid-template-columns: 32px 1fr;
        gap: 12px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        grid-column: 1;
        grid-row: 1;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .calculator-form {
        padding: 24px;
    }

    .calculator-result {
        padding: 24px;
        min-height: auto;
    }

    .btn-calc {
        width: 100%;
        text-align: center;
    }

    .filtered-articles {
        grid-template-columns: 1fr;
    }

    .stats-table thead th,
    .stats-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .newsletter-box {
        padding: 28px 20px;
    }

    .newsletter-input {
        min-width: unset;
        width: 100%;
    }

    .newsletter-fields {
        flex-direction: column;
    }

    .newsletter-fields .btn-cta {
        width: 100%;
        text-align: center;
    }
}

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

    .hero-diagonal {
        height: 50px;
    }

    .card-article {
        grid-template-columns: 1fr;
    }

    .card-article__img img {
        width: 100%;
        height: 160px;
    }
}