/* Twinned cities: index directory and city page */

/* ── Index: directory of all cities ── */
.tw-directory { padding: 72px 0 88px; background: #F8F8FA; }
.tw-directory__title {
    font-family: var(--elMessiri);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--theme__color2, #2C3E50);
    text-align: center;
    margin: 0 0 36px;
}
.tw-directory__country + .tw-directory__country { margin-top: 36px; }
.tw-directory__country-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--elMessiri);
    font-size: 20px;
    font-weight: 700;
    color: var(--theme__color2, #2C3E50);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(206, 159, 77, .35);
}
.tw-directory__count {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(206, 159, 77, .16);
    color: #7A5D24;
}

.tw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tw-card {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ECEEF2;
    color: var(--theme__color2, #2C3E50);
    box-shadow: 0 4px 14px rgba(29, 44, 60, .05);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tw-card:hover, .tw-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--theme__color1, #CE9F4D);
    box-shadow: 0 12px 28px rgba(29, 44, 60, .12);
    color: var(--theme__color2, #2C3E50);
    outline: none;
}
.tw-card__media {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FBF5EA;
    color: var(--theme__color1, #CE9F4D);
    font-size: 24px;
}
.tw-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tw-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tw-card__name { font-size: 15px; font-weight: 700; line-height: 1.4; }
.tw-card__since { font-size: 12px; color: #7C8796; }

/* ── City page ── */
.tw-banner__country {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(206, 159, 77, .9);
    color: #1D2C3C;
    font-size: 13px;
    font-weight: 700;
}

.tw-show { padding: 56px 0 80px; }
.tw-show__layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.tw-show__main { flex: 999 1 560px; min-width: 0; }
.tw-show__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.tw-show__heading {
    font-family: var(--elMessiri);
    font-size: 24px;
    font-weight: 700;
    color: var(--theme__color2, #2C3E50);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(206, 159, 77, .35);
}
.tw-show__empty { color: #7C8796; font-size: 15px; }

/* Legacy article HTML: keep it readable whatever markup it carries */
.tw-prose { font-size: 16px; line-height: 1.95; color: #333; overflow-wrap: anywhere; }
.tw-prose p { margin: 0 0 16px; }
.tw-prose h1, .tw-prose h2, .tw-prose h3, .tw-prose h4, .tw-prose strong:only-child {
    font-family: var(--elMessiri);
    color: var(--theme__color2, #2C3E50);
}
.tw-prose h2, .tw-prose h3 { font-size: 20px; margin: 28px 0 12px; }
.tw-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.tw-prose a { color: #94702C; text-decoration: underline !important; }
.tw-prose ul, .tw-prose ol { padding-inline-start: 22px; margin: 0 0 16px; list-style: revert; }
.tw-prose table { width: 100%; table-layout: auto; border-collapse: collapse; margin: 0 0 16px; display: block; overflow-x: auto; }
.tw-prose td, .tw-prose th { border: 1px solid #E5E8EC; padding: 8px 10px; }

.tw-facts {
    padding: 22px;
    border-radius: 14px;
    background: var(--theme__color3, #1D2C3C);
    color: #fff;
    box-shadow: 0 16px 36px rgba(29, 44, 60, .18);
}
.tw-facts__title { font-family: var(--elMessiri); font-size: 18px; font-weight: 700; margin: 0 0 14px; color: var(--theme__color1, #CE9F4D); }
.tw-facts__list { margin: 0 0 18px; }
.tw-facts__list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tw-facts__list > div:last-child { border-bottom: 0; }
.tw-facts__list dt { font-weight: 500; color: rgba(255, 255, 255, .75); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tw-facts__list dt i { color: var(--theme__color1, #CE9F4D); width: 16px; text-align: center; }
.tw-facts__list dd { margin: 0; font-weight: 700; font-size: 14px; text-align: end; }
.tw-facts__actions { display: flex; flex-direction: column; gap: 10px; }

.tw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--theme__color1, #CE9F4D);
    color: #1D2C3C;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s, color .2s;
}
.tw-button:hover, .tw-button:focus-visible { background: #F1D08A; color: #1D2C3C; outline: none; }
.tw-button--ghost { background: transparent; color: #fff; border: 1px solid rgba(206, 159, 77, .7); }
.tw-button--ghost:hover, .tw-button--ghost:focus-visible { background: rgba(206, 159, 77, .16); color: #fff; }

.tw-siblings { padding: 20px 22px; border-radius: 14px; background: #fff; border: 1px solid #ECEEF2; }
.tw-siblings__title { font-family: var(--elMessiri); font-size: 16px; font-weight: 700; color: var(--theme__color2, #2C3E50); margin: 0 0 12px; }
.tw-siblings ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tw-siblings a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: #F4F5F7;
    color: var(--theme__color2, #2C3E50);
    font-size: 13px;
    font-weight: 600;
    transition: background .2s, color .2s;
}
.tw-siblings a:hover, .tw-siblings a:focus-visible { background: var(--theme__color1, #CE9F4D); color: #1D2C3C; outline: none; }

.tw-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--theme__color2, #2C3E50); }
.tw-back:hover, .tw-back:focus-visible { color: #94702C; }

@media (max-width: 767px) {
    .tw-directory { padding: 52px 0 64px; }
    .tw-grid { grid-template-columns: 1fr; }
    .tw-show { padding: 36px 0 56px; }
    .tw-prose { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .tw-card { transition: none; }
    .tw-card:hover { transform: none; }
}
