:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --surface: #11141c;
    --surface-hover: #171b25;
    --border: #252a37;
    --text: #edf0f7;
    --muted: #8d96a9;
    --accent: #bbffbb;
    --accent-strong: #55bb55;
    --green: #83ddb2;
    --radius: 14px;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

.site-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(var(--max-width), calc(100% - 48px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgb(11 13 18 / 90%);
    border-bottom: 1px solid rgb(255 255 255 / 6%);
    backdrop-filter: blur(16px);
}

.navbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #0b0d12;
    background: var(--accent);
    font-weight: 900;
}

.hero {
    min-height: 390px;
    padding-block: 78px 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 630px;
}

h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 6vw, 66px);
    line-height: 1.06;
    letter-spacing: -3.5px;
    font-weight: 800;
}

.text-accent {
    color: var(--accent);
}

.hero-description {
    max-width: 470px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 12px 17px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 750;
    transition: transform 150ms ease, background 150ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.hero-stats {
    position: relative;
    width: 240px;
    min-width: 210px;
}

.stat-card {
    position: relative;
    z-index: 1;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, #151925, #10131a);
}

.stat-label,
.stat-caption {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
}

.stat-number {
    display: block;
    margin-block: 13px 5px;
    font-size: 45px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.2;
}

.stat-caption {
    font-size: 12px;
    letter-spacing: 0;
}

.stat-decoration span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.directory-section {
    padding-block: 70px 90px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading h2,
.about-inner h2 {
    margin: 9px 0 5px;
    font-size: clamp(25px, 4vw, 34px);
    letter-spacing: -1.2px;
    line-height: 1.2;
}

.section-description {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.directory-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-block: 28px 15px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.2px;
}

.gov-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.gov-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    color: inherit;
    text-decoration: none;
    background: #151922;
    border: 1px solid #303747;
    border-radius: 12px;
    transition: border-color 0.2s, transform 0.2s;
}

.gov-card:hover {
    border-color: #7186b5;
    transform: translateY(-2px);
}

.gov-card-flag {
    display: block;
    width: auto;
    max-width: 80%;
    height: 90px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.gov-card h2 {
    margin: 0;
}

.gov-longname {
    margin: 0.35rem 0 0.75rem;
    color: #aab4c8;
}

.gov-capital,
.gov-description {
    margin: 0.4rem 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .gov-card-flag {
        width: 70px;
        max-height: 50px;
    }
}

.muted {
    color: #727b8e;
    font-style: italic;
}

.card-details {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-block: 15px;
    border-top: 1px solid var(--border);
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1px;
}

.detail-value {
    color: var(--text);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.card-footer:hover {
    color: #d0cbff;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 55px 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state h3 {
    margin: 10px 0 5px;
    font-size: 18px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.empty-icon {
    color: var(--accent);
    font-size: 30px;
}

@media (max-width: 850px) {
    .gov-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 32px, var(--max-width));
    }

    .navbar {
        min-height: 64px;
        gap: 12px;
    }

    .hero {
        min-height: unset;
        padding-block: 55px;
        flex-direction: column;
        align-items: stretch;
    }

    h1 {
        letter-spacing: -2px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 38px;
    }

    .directory-section {
        padding-block: 50px 60px;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .gov-grid {
        grid-template-columns: 1fr;
    }

    .gov-description {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

.profile-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.country-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.country-heading h1 {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.profile-section {
    margin-top: 2rem;
}

.profile-section h2 {
    margin-bottom: 1rem;
}

.profile-flag {
    display: flex;
    justify-content: center;
    margin: 0 auto 2.5rem;
}

.profile-flag img {
    display: block;
    max-width: min(100%, 500px);
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.gov-map {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
    border-radius: 12px;
    background: #151922;
}

.profile-coat-of-arms {
    text-align: center;
}

.profile-coat-of-arms img {
    display: block;
    width: auto;
    max-width: min(100%, 300px);
    max-height: 300px;
    object-fit: contain;
    margin: 0 auto;
}

.capital-section {
    padding: 1.5rem;
    border: 1px solid #303747;
    border-radius: 12px;
    background: #151922;
}

.capital-section p {
    line-height: 1.6;
}

.other-details {
    margin-top: 3rem;
}

.detail-row {
    padding: 1rem 0;
    border-bottom: 1px solid #303747;
}

.detail-row p {
    margin-bottom: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .profile-page {
        padding-top: 1.25rem;
    }

    .profile-flag img {
        max-height: 190px;
    }

    .gov-map {
        max-height: 400px;
    }
}


.classification-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.classification-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}



.external-links {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #303747;
}

.external-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.external-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #151922;
    border: 1px solid #303747;
    border-radius: 12px;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.external-link-button:hover {
    transform: translateY(-3px);
    background: #222938;
    border-color: #7186b5;
}

.external-link-button img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.external-link-button:focus-visible {
    outline: 2px solid #aab4c8;
    outline-offset: 3px;
}

.contact-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #303747;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: inherit;
    text-decoration: none;
    background: #151922;
    border: 1px solid #303747;
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-link:hover {
    background: #222938;
    border-color: #7186b5;
}

.contact-link img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}