:root {
    --primary: #005b96;
    --secondary: #00a6a6;
    --accent: #ff7a00;
    --dark: #102a43;
    --light: #f5fbff;
    --text: #1d2d35;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #dff3ff 0%, #f5fbff 42%, #ffffff 100%);
    line-height: 1.65;
}

main.container {
    padding-top: 0.45rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: linear-gradient(120deg, var(--dark), #0c3d66 48%, var(--primary));
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(16, 42, 67, 0.25);
}

.top-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.75rem 0;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-home-link {
    text-decoration: none;
    color: inherit;
}

.eu-logo-link {
    display: inline-flex;
}

.brand-left img {
    width: clamp(155px, 18vw, 235px);
    max-height: 58px;
    height: auto;
    object-fit: contain;
    display: block;
}

.brand-title {
    margin: 0;
    font-size: 1.18rem;
    letter-spacing: 0.4px;
}

.brand-sub {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.9;
}

.eu-logo {
    height: 58px;
    width: auto;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
    flex: 0 0 auto;
}

.lang-switch {
    margin-left: 0.35rem;
    flex: 0 0 auto;
}

.lang-switch select {
    width: auto;
    min-width: 120px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.36rem 0.45rem;
}

.lang-switch select option {
    color: #102a43;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-bottom: 0.8rem;
    overflow-x: visible;
    scrollbar-width: thin;
    align-items: center;
}

.main-nav a {
    color: #e8f4ff;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-size: 0.89rem;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.main-nav .nav-utility {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.main-nav .nav-utility + .nav-utility {
    margin-left: 0.35rem;
}

.mobile-nav-row {
    display: none;
}

.menu-toggle {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 10px;
    width: 46px;
    height: 42px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-icon {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon .bar {
    display: block;
    height: 2px;
    border-radius: 3px;
    background: #ffffff;
    transition: transform 0.22s ease, opacity 0.18s ease;
    transform-origin: center;
}

.site-header.nav-open .menu-icon .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .menu-icon .bar:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .menu-icon .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    padding: 3.5rem 0 2.6rem;
}

.hero-card {
    background: linear-gradient(135deg, #0d4d7a 0%, #0079a7 40%, #00a6a6 100%);
    color: var(--white);
    border-radius: 18px;
    padding: clamp(1.2rem, 3vw, 2.2rem);
    box-shadow: 0 18px 35px rgba(0, 60, 90, 0.25);
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 290px;
    height: 290px;
    border-radius: 50%;
    right: -90px;
    top: -90px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 1rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-side {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 14px;
    padding: 0.95rem;
    backdrop-filter: blur(2px);
}

.hero-side h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-pill {
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 0.84rem;
    white-space: nowrap;
}

.hero h1 {
    margin-top: 0;
    font-size: clamp(1.4rem, 3.8vw, 2.25rem);
    line-height: 1.25;
}

.hero-buttons {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 0.68rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-outline {
    background: #ffffff;
    color: #0d5d89;
    border: 1px solid #b8d8ea;
}

.btn-sm {
    padding: 0.38rem 0.64rem;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 700;
}

.btn-edit {
    background: #0f7ca0;
    color: #ffffff;
}

.btn-delete {
    background: #c63d3d;
    color: #ffffff;
}

.section {
    padding: 2.1rem 0;
    border-bottom: 1px solid #e6f0f6;
}

.section h2 {
    margin-top: 0;
    color: var(--dark);
    letter-spacing: 0.2px;
}

.section h3 {
    color: #0f4d74;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.05rem;
    box-shadow: 0 8px 20px rgba(11, 52, 75, 0.08);
    border: 1px solid #e2edf5;
}

.focus-card {
    border: 1px solid #d9ecf7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.focus-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(6, 74, 112, 0.14);
}

.focus-title {
    margin: 0;
    font-weight: 700;
    color: #0f456d;
}

.stats-strip {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.stat-box {
    background: linear-gradient(145deg, #0d4c77, #126d9c);
    color: #e9f6ff;
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #ffffff;
}

.notice-eu {
    border-left: 6px solid var(--accent);
    background: #fff8ef;
    padding: 1rem 1.1rem;
    border-radius: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
    justify-content: center;
    gap: 1.5rem;
}

.news-grid-latest {
    grid-template-columns: repeat(auto-fill, minmax(250px, 320px));
    justify-content: center;
}

.news-item-compact {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: auto;
    overflow: hidden;
    padding: 0;
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(160deg, #eff8ff, #f9fdff);
    border: none;
    border-radius: 10px 10px 0 0;
    display: block;
}

.news-item-compact img,
.news-thumb-placeholder {
    height: 200px;
}

.news-thumb-placeholder {
    border-radius: 10px 10px 0 0;
    background: linear-gradient(140deg, #d7eefb, #f0fbff);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f5f84;
    font-weight: 700;
    font-size: 0.9rem;
    height: 200px;
}

.news-title {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #0b344b;
    font-size: 1.1rem;
}

.news-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
    color: #4d5f6b;
    line-height: 1.55;
    font-size: 1.02rem;
}

.news-read-more {
    margin-top: auto;
    font-weight: 700;
    color: #0f6f97;
    text-decoration: none;
    padding-top: 0.5rem;
}

.news-read-more:hover {
    text-decoration: underline;
}

.pagination {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    border: 1px solid #c8e2f2;
    background: #f5fbff;
    color: #0f5e85;
    font-weight: 700;
    text-decoration: none;
}

.pagination-link:hover {
    background: #e6f4ff;
}

.pagination-link.is-active {
    background: #0f6f97;
    border-color: #0f6f97;
    color: #ffffff;
}

.news-item-compact > * {
    margin-left: 1rem;
    margin-right: 1rem;
}

.news-item-compact > img,
.news-item-compact > .news-thumb-placeholder {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.news-item-compact > :last-child {
    margin-bottom: 1rem;
}

.news-item h3 {
    margin-bottom: 0.45rem;
}

.news-date {
    font-size: 0.88rem;
    color: #4e6b75;
    display: inline-block;
    background: #edf8ff;
    border: 1px solid #d4ebf8;
    border-radius: 24px;
    padding: 0.3rem 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
}

.news-detail {
    padding: 0;
    max-width: 900px;
    margin: 1.5rem auto;
}

.news-detail img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    display: block;
    margin-bottom: 0;
}

.news-detail-content {
    padding: 2rem;
    background: white;
    border-radius: 0 0 14px 14px;
    border: 1px solid #e2edf5;
    border-top: none;
}

.news-detail-date {
    font-size: 0.88rem;
    color: #4e6b75;
    display: inline-block;
    background: #edf8ff;
    border: 1px solid #d4ebf8;
    border-radius: 24px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
}

.news-detail-title {
    font-size: 1.8rem;
    color: #0b344b;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.news-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #1f3a42;
    margin-bottom: 1.5rem;
}

.news-body p {
    margin-bottom: 1rem;
}

.news-share {
    margin-top: 1.2rem;
    margin-bottom: 1rem;
}

.news-share-label {
    margin-bottom: 0.6rem;
    color: #0f4468;
    font-weight: 700;
}

.news-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.news-share-btn {
    appearance: none;
    border: 1px solid #d3e9f8;
    background: #f7fcff;
    color: #0f5e85;
    border-radius: 999px;
    padding: 0.46rem 0.82rem;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    line-height: 1;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.news-share-btn:hover {
    background: #eaf6ff;
    border-color: #b7dbf1;
    transform: translateY(-1px);
}

.news-share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.news-share-btn--facebook {
    color: #1a4fb9;
}

.news-share-btn--whatsapp {
    color: #0f8f43;
}

.news-share-btn--linkedin {
    color: #0a66c2;
}

.news-share-btn--copy {
    color: #0d4f71;
}

.news-share-btn--copy.is-copied {
    background: #e9fbef;
    border-color: #b9ebc8;
    color: #15753a;
}

.page-banner {
    background: linear-gradient(130deg, #ddf2ff, #effbff 55%, #e7fff8);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    margin-top: 1rem;
    border: 1px solid #c8e8fa;
    box-shadow: 0 8px 20px rgba(9, 74, 114, 0.08);
}

.page-banner h1 {
    margin: 0;
    color: #0f4468;
}

.page-banner p {
    margin-top: 0.35rem;
    margin-bottom: 0;
    color: #28556d;
}

.error-shell {
    border-bottom: 0;
    padding-top: 1.3rem;
}

.error-hero {
    background: linear-gradient(145deg, #0d4c77, #126d9c);
    color: #ffffff;
    border-radius: 16px;
    padding: 1.3rem 1.35rem;
    box-shadow: 0 12px 30px rgba(10, 70, 104, 0.2);
    text-align: center;
}

.error-code {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 2px;
}

.error-hero h1 {
    margin: 0.55rem 0 0.35rem;
    color: #ffffff;
}

.error-hero p {
    margin: 0;
    color: #e8f6ff;
}

.error-card {
    max-width: 760px;
    margin: 1rem auto 0;
    text-align: center;
    border-radius: 16px;
    border: 1px solid #d8e9f6;
    box-shadow: 0 12px 28px rgba(12, 66, 97, 0.12);
}

.error-card p {
    margin-top: 0;
    margin-bottom: 0.85rem;
    color: #35556a;
}

.error-actions {
    justify-content: center;
}

.lead-text {
    font-size: 1.03rem;
    color: #21485e;
}

.styled-list,
.number-list {
    margin: 0.75rem 0 0;
    padding-left: 0;
    list-style: none;
}

.styled-list li,
.number-list li {
    background: #ffffff;
    border: 1px solid #dcedf7;
    border-radius: 10px;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.52rem;
    box-shadow: 0 4px 12px rgba(14, 62, 87, 0.05);
}

.number-list {
    counter-reset: step;
}

.number-list li {
    position: relative;
    padding-left: 2.6rem;
}

.number-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0.72rem;
    top: 0.58rem;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: linear-gradient(140deg, #0f5d91, #0a82a2);
    color: #ffffff;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.4rem;
    font-weight: 700;
}

.wp-card {
    border-top: 4px solid #0f77a5;
}

.partner-card {
    border-top: 4px solid #0e8a87;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.partner-card h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
    line-height: 1.35;
}

.partner-card p {
    margin-top: 0;
    margin-bottom: 0;
    color: #365160;
}

.impact-card {
    border-top: 4px solid #ff7a00;
}

.contact-card {
    border-top: 4px solid #0b679a;
}

.resource-card {
    border-top: 4px solid #0b8292;
}

.media-list li p {
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.3rem;
}

.media-actions a {
    font-weight: 700;
    color: #0f6f97;
}

.media-download-card h3 {
    margin-top: 0;
    margin-bottom: 0.45rem;
}

.partner-logos {
    background: linear-gradient(120deg, #f1f9ff, #ffffff);
    border: 1px solid #ddeefa;
    border-radius: 14px;
    padding: 1rem;
}

.news-item {
    border-top: 4px solid #0f7ca0;
}

.news-item p {
    margin-top: 0.45rem;
    margin-bottom: 0.55rem;
}

.admin-kpi-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.admin-kpi {
    border-top: 4px solid #0f789f;
}

.admin-kpi-label {
    margin: 0;
    color: #31586d;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-kpi-value {
    margin: 0.35rem 0 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f3f60;
}

.admin-toolbar {
    margin-top: 1rem;
    margin-bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.admin-toolbar form {
    margin: 0;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #d9e9f3;
    background: #ffffff;
}

.admin-table th {
    background: #edf7ff;
    color: #154e71;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    gap: 0.4rem;
}

.admin-form-card {
    margin-top: 0.95rem;
    border-top: 4px solid #0f789f;
}

.admin-form-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.admin-image-label {
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: #0f4e73;
}

.admin-current-image {
    max-width: 230px;
    border-radius: 10px;
    border: 1px solid #d5e8f3;
}

.flash {
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
}

.flash.success {
    background: #e7f9ed;
    border: 1px solid #80d1a0;
}

.flash.error {
    background: #ffeded;
    border: 1px solid #ff9d9d;
}

.form-card {
    max-width: 680px;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 0.8rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid #b8cbd8;
    margin-top: 0.3rem;
    font: inherit;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #e6eef2;
}

.site-footer {
    margin-top: 2rem;
    background: var(--dark);
    color: #d3e7f7;
    padding: 1.2rem 0;
    font-size: 0.92rem;
}

.partner-logos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.partner-logos img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #d8eaf5;
    border-radius: 12px;
    padding: 0.7rem;
    box-shadow: 0 4px 12px rgba(8, 60, 96, 0.08);
}

.partner-logos img.partner-logo-otrila {
    background: #fff;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 980px) {
    .partner-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .partner-logos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 740px) {
    .top-brand {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand toggle"
            "eu lang";
        align-items: center;
        row-gap: 0.6rem;
        column-gap: 0.55rem;
    }

    .brand-left {
        grid-area: brand;
        min-width: 0;
    }

    .brand-left img {
        width: min(145px, 44vw);
        max-height: 46px;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    .brand-sub {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .eu-logo {
        height: 46px;
        justify-self: start;
    }

    .eu-logo-link {
        grid-area: eu;
        justify-self: start;
    }

    .lang-switch {
        grid-area: lang;
        justify-self: end;
        margin-left: 0;
    }

    .lang-switch select {
        min-width: 108px;
        font-size: 0.82rem;
    }

    .container {
        width: min(1120px, 94%);
    }

    .hero {
        padding: 1.5rem 0 1.3rem;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-grid-latest {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 1.5rem 0;
    }

    .page-banner {
        margin-top: 0.35rem;
    }

    .mobile-nav-row {
        display: flex;
        grid-area: toggle;
        justify-content: flex-end;
        margin: 0;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        gap: 0.45rem;
        margin-bottom: 0.9rem;
        padding: 0.65rem;
        background: rgba(255, 255, 255, 0.09);
        border: 1px solid rgba(255, 255, 255, 0.23);
        border-radius: 12px;
        overflow-x: visible;
    }

    .site-header.nav-open .main-nav {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 0.58rem 0.65rem;
    }

    .main-nav .nav-utility {
        margin-left: 0;
    }

    .main-nav .nav-utility + .nav-utility {
        margin-left: 0;
    }

    .admin-actions {
        flex-direction: column;
    }
}
