/* Regional and head-term hub pages (src/services/hubPageService.js). */
.hub {
    color: #0f172a;
}

.hub-wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.hub-hero {
    padding: 3rem 0 2.5rem;
    background: linear-gradient(120deg, #1d4ed8, #6d28d9);
    color: #fff;
}

.hub-hero h1 {
    max-width: 48rem;
    margin: 0.75rem 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
}

.hub-hero p {
    max-width: 44rem;
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #e0e7ff;
}

.hub-crumbs {
    font-size: 0.875rem;
    color: #c7d2fe;
}

.hub-crumbs a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hub-section {
    padding: 2.25rem 0 0.25rem;
}

.hub-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.hub-lede {
    max-width: 48rem;
    margin: 0 0 1.25rem;
    color: #475569;
    line-height: 1.6;
}

.hub-table-wrap {
    position: relative;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}

.hub-table th,
.hub-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    white-space: nowrap;
}

.hub-table thead th {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
}

.hub-table tbody th {
    font-weight: 700;
    white-space: normal;
    min-width: 9rem;
}

.hub-table tbody tr:last-child th,
.hub-table tbody tr:last-child td {
    border-bottom: 0;
}

.hub-table a {
    font-weight: 600;
    color: #4338ca;
}

.hub-sr {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hub-dest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hub-dest {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "flag name" "flag price";
    column-gap: 0.625rem;
    align-items: center;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.hub-dest:hover,
.hub-dest:focus-visible {
    border-color: #6366f1;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.hub-dest img {
    grid-area: flag;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hub-dest-name {
    grid-area: name;
    font-weight: 700;
    line-height: 1.3;
}

.hub-dest-price {
    grid-area: price;
    font-size: 0.875rem;
    color: #475569;
}

.hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.hub-card {
    padding: 1rem 1.125rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.hub-card h3 {
    margin: 0 0 0.375rem;
    font-size: 1rem;
    font-weight: 700;
}

.hub-card p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.hub-checklist,
.hub-steps {
    display: grid;
    gap: 0.5rem;
    max-width: 48rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hub-step;
}

.hub-checklist li,
.hub-steps li {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    line-height: 1.5;
}

.hub-checklist li::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0.95rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

.hub-steps li::before {
    counter-increment: hub-step;
    content: counter(hub-step);
    position: absolute;
    left: 1rem;
    top: 0.8rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.5rem;
    text-align: center;
}

[dir="rtl"] .hub-checklist li,
[dir="rtl"] .hub-steps li {
    padding: 0.75rem 3rem 0.75rem 1rem;
}

[dir="rtl"] .hub-checklist li::before,
[dir="rtl"] .hub-steps li::before {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .hub-table th,
[dir="rtl"] .hub-table td {
    text-align: right;
}

.hub-faq {
    max-width: 48rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.hub-faq summary {
    padding: 0.875rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.hub-faq p {
    margin: 0;
    padding: 0 1rem 1rem;
    color: #475569;
    line-height: 1.6;
}

.hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.hub-links a {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    color: #4338ca;
    font-weight: 600;
    text-decoration: none;
}

.hub-note {
    margin: 0 0 3rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.hub-value {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label price" "plan cta";
    gap: 0.25rem 1rem;
    align-items: center;
    padding: 1.125rem 1.25rem;
    border: 2px solid #22c55e;
    border-radius: 1rem;
    background: linear-gradient(120deg, #f0fdf4, #fff);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 30px -20px rgba(22, 163, 74, 0.6);
}

.hub-value:hover,
.hub-value:focus-visible {
    border-color: #16a34a;
}

.hub-value-label {
    grid-area: label;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #15803d;
}

.hub-value-plan {
    grid-area: plan;
    color: #334155;
}

.hub-value-price {
    grid-area: price;
    font-size: 1.5rem;
    font-weight: 800;
    color: #14532d;
    text-align: right;
}

.hub-value-cta {
    grid-area: cta;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

/* Hero numbers */
.hub-hero {
    position: relative;
    overflow: hidden;
}

.hub-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/assets/world-map.jpg") center / cover no-repeat;
    opacity: 0.12;
    mix-blend-mode: screen;
    pointer-events: none;
}

.hub-hero .hub-wrap {
    position: relative;
    z-index: 1;
}

.hub-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 40rem;
    margin-top: 1.5rem;
}

.hub-stats div {
    display: grid;
    gap: 0.125rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.hub-stats strong {
    font-size: 1.375rem;
    font-weight: 800;
    color: #fff;
}

.hub-stats span {
    font-size: 0.8125rem;
    color: #e0e7ff;
}

@media (max-width: 520px) {
    .hub-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hub-stats div:last-child {
        grid-column: 1 / -1;
    }
}

/* Coverage list inside plan tables */
.hub-cov {
    margin-top: 0.25rem;
    font-weight: 400;
}

.hub-cov summary {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4338ca;
    cursor: pointer;
}

.hub-cov p {
    max-width: 28rem;
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #475569;
    white-space: normal;
}

/* Route checker */
.hub-route-card {
    padding: 1.5rem;
    border: 1px solid #c7d2fe;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, #eef2ff 0%, #fff 55%);
    box-shadow: 0 18px 40px -28px rgba(67, 56, 202, 0.55);
}

.hub-route-form {
    display: flex;
    gap: 0.5rem;
    max-width: 32rem;
}

.hub-route-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid #a5b4fc;
    border-radius: 0.75rem;
    background: #fff;
    font-size: 1rem;
}

.hub-route-input:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 1px;
}

.hub-route-add {
    padding: 0.75rem 1.125rem;
    border-radius: 0.75rem;
    background: #4f46e5;
    color: #fff;
    font-weight: 700;
}

.hub-route-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.875rem 0 0;
    padding: 0;
    list-style: none;
}

.hub-route-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem 0.3rem 0.375rem;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}

.hub-route-chip img {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.hub-route-chip b {
    color: #64748b;
}

.hub-route-results-title {
    margin: 1.25rem 0 0.625rem;
    font-size: 1rem;
    font-weight: 700;
}

.hub-route-results {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hub-route-empty {
    padding: 0.875rem 1rem;
    border: 1px dashed #c7d2fe;
    border-radius: 0.75rem;
    color: #475569;
}

.hub-route-empty.is-none {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.hub-route-plan {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "name price cta" "meta price cta";
    gap: 0.125rem 1rem;
    align-items: center;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.hub-route-plan:hover,
.hub-route-plan:focus-visible {
    border-color: #6366f1;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.14);
}

.hub-route-name { grid-area: name; font-weight: 700; }
.hub-route-meta { grid-area: meta; font-size: 0.875rem; color: #64748b; }
.hub-route-price { grid-area: price; font-size: 1.125rem; }

.hub-route-cta {
    grid-area: cta;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}

@media (max-width: 520px) {
    .hub-route-plan {
        grid-template-columns: 1fr auto;
        grid-template-areas: "name price" "meta meta" "cta cta";
    }

    .hub-route-cta {
        margin-top: 0.5rem;
        text-align: center;
    }
}

.hub-stats strong span,
.hub-stats strong [data-currency-price] {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Flag wall on the global hub */
.hub-flags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hub-flags li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.625rem;
    background: #fff;
    border: 1px solid #eef2f7;
    font-size: 0.8125rem;
    color: #334155;
    min-width: 0;
}

.hub-flags img {
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hub-flags span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
