/* country-page.css — directory of countries on the standalone country page */

.cty-page .study-main { display: flex; flex-direction: column; }

.cty {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 18px 64px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cty-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 20px;
    color: var(--text-secondary, #475569);
}
.cty-spinner {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 3px solid var(--border-glass, rgba(0,0,0,0.08));
    border-top-color: #10b981;
    animation: cty-spin 0.9s linear infinite;
}
@keyframes cty-spin { to { transform: rotate(360deg); } }

.cty-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(56, 189, 248, 0.10));
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}
.cty-hero__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #059669;
}
.cty-hero h1 {
    margin: 4px 0 0;
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary, #0f172a);
}
.cty-hero p { margin: 8px 0 0; max-width: 62ch; line-height: 1.5; color: var(--text-secondary, #475569); }
.cty-hero__map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.08));
    color: var(--text-primary, #0f172a);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
}
.cty-hero__map i { color: #059669; }
.cty-hero__map:hover { border-color: #10b981; }

.cty-tools { display: flex; flex-direction: column; gap: 12px; }
.cty-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.1));
    color: var(--text-muted, #64748b);
}
.cty-search:focus-within { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16); }
.cty-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--text-primary, #0f172a);
}
.cty-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cty-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.1));
    background: var(--bg-surface, #fff);
    color: var(--text-primary, #0f172a);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}
.cty-chip small { opacity: 0.65; margin-left: 2px; }
.cty-chip:hover { border-color: #10b981; }
.cty-chip.is-active { background: #059669; border-color: #059669; color: #fff; }

/* style.css gives every <section> generous vertical padding: not wanted here. */
.cty-group { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.cty-group + .cty-group { margin-top: 18px; }
.cty-group h2 {
    margin: 0;
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 1.15rem;
    color: var(--text-primary, #0f172a);
}
.cty-group h2 small { font-weight: 500; font-size: 0.85rem; color: var(--text-muted, #64748b); margin-left: 4px; }

.cty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cty-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    color: var(--text-primary, #0f172a);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.cty-tile:hover { transform: translateY(-1px); border-color: #10b981; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1); }
.cty-tile:focus-visible, .cty-chip:focus-visible, .cty-hero__map:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }
.cty-tile__flag { flex: 0 0 44px; height: 32px; display: flex; align-items: center; justify-content: center; }
.cty-tile__flag img { max-width: 44px; max-height: 32px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); }
.cty-tile__body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cty-tile__body strong { font-size: 0.93rem; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cty-tile__body span { font-size: 0.8rem; color: var(--text-muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cty-empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--text-muted, #64748b); }

@media (max-width: 640px) {
    .cty { padding: 14px 12px 56px; gap: 14px; }
    .cty-hero { padding: 18px; }
    .cty-hero h1 { font-size: 1.6rem; }
    .cty-hero__map { width: 100%; justify-content: center; }
    .cty-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .cty-chips::-webkit-scrollbar { display: none; }
    .cty-chip { flex: 0 0 auto; }
    .cty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .cty-tile { padding: 9px 10px; gap: 9px; }
    .cty-tile__flag { flex-basis: 34px; }
    .cty-tile__flag img { max-width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    .cty-spinner { animation: none; }
    .cty-tile { transition: none; }
}
