/* === EntryPolicies — Ocean Blue / Deep Navy Palette === */
/*
 *  Deep Navy Slate #0f172a  — dark mode background
 *  Ocean Blue #1d4ed8        — primary accent
 *  Clean White               — light mode background
 *  Slate #334155             — muted text
 *  Cool Gray #e2e8f0         — light borders
 */

/* ── Pico.css Variable Overrides ── */
:root {
    --pico-font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --pico-border-radius: 8px;
}

/* Light Theme (default) */
[data-theme="light"] {
    --pico-primary: #1d4ed8;
    --pico-primary-hover: #1e40af;
    --pico-primary-focus: rgba(29, 78, 216, 0.25);
    --bg: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #f8fafc;
    --text: #0f172a;
    --text-heading: #0f172a;
    --text-muted: #475569;
    --text-muted-light: #94a3b8;
    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --accent-subtle: rgba(29, 78, 216, 0.07);
    --accent-blue: #1e40af;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
}

/* Dark Theme — Deep Navy Slate */
[data-theme="dark"] {
    --pico-primary: #3b82f6;
    --pico-primary-hover: #60a5fa;
    --pico-primary-focus: rgba(59, 130, 246, 0.25);
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-subtle: #1a2332;
    --text: #e2e8f0;
    --text-heading: #f1f5f9;
    --text-muted: #94a3b8;
    --text-muted-light: #64748b;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-subtle: rgba(59, 130, 246, 0.12);
    --accent-blue: #60a5fa;
    --border: #334155;
    --border-strong: #475569;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(15, 23, 42, 0.94);
    --footer-bg: #0c1421;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ── Base ── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--pico-font-family);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-hover);
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.logo-accent {
    color: var(--accent);
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}
.header-nav a:hover {
    color: var(--accent);
    background: var(--accent-subtle);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Theme Toggle Button ── */
.theme-btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: 'Inter', system-ui, sans-serif;
}
.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

/* ── Main ── */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 5rem;
}

/* ── Search ── */
.search-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem 0;
}
.search-wrapper {
    position: relative;
    max-width: 100%;
}
.search-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.search-input::placeholder {
    color: var(--text-muted-light);
}
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    max-height: 360px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}
.search-results.active {
    display: block;
}
.search-results a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.search-results a:last-child {
    border-bottom: none;
}
.search-results a:hover {
    background: var(--accent-subtle);
}
.search-results .result-title {
    font-weight: 600;
    font-size: 0.92rem;
}
.search-results .result-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.search-no-results {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

/* ── Hero (Homepage) ── */
.hero {
    text-align: center;
    padding: 3.5rem 1rem 3rem;
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 1rem;
}
.hero h1 .hl {
    color: var(--accent);
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff !important;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-outline {
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── "Can I Go?" Widget (Glassmorphism Card) ── */
.widget-card {
    max-width: 640px;
    margin: 0 auto 0;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}
.widget-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 0.25rem;
    text-align: center;
}
.widget-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    text-align: center;
}
.widget-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.widget-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.widget-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-heading);
}
.widget-select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.widget-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.widget-btn {
    margin-top: 0.5rem;
    width: 100%;
}
.widget-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ── Section Titles ── */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.stat-card .stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ── Card Grid ── */
/* Responsive 3-Column Grid for Homepage Cards */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 576px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (min-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop (forms 2 rows for 6 items) */
    }
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.35rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    line-height: 1.4;
}
.card h3 a {
    color: var(--text-heading);
    text-decoration: none;
    font-weight: 600;
}
.card h3 a:hover {
    color: var(--accent);
}
.card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* ── Guide Cards (Featured Articles on Homepage) ── */
.guide-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.guide-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.guide-card-body {
    padding: 1.35rem 1.35rem 0.75rem;
    flex: 1;
}
.guide-card-body .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.5rem;
}
.guide-card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    line-height: 1.4;
}
.guide-card-body h3 a {
    color: var(--text-heading);
    text-decoration: none;
    font-weight: 600;
}
.guide-card-body h3 a:hover {
    color: var(--accent);
}
.guide-excerpt {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}
.guide-card-footer {
    padding: 0.75rem 1.35rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.73rem;
    letter-spacing: 0.01em;
}
.badge-green {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}
.badge-gold {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--accent);
}
.breadcrumb span {
    margin: 0 0.35rem;
}

/* ── Article ── */
article h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-heading);
    margin-bottom: 1rem;
}
article h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 2rem;
}
article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
}
article p, article li {
    line-height: 1.75;
    color: var(--text);
}

/* ── Summary Box ── */
.summary-box {
    background: var(--accent-subtle);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}
.summary-box h2 {
    font-size: 1.1rem;
    color: var(--accent);
    margin: 0 0 0.5rem;
}
.summary-box p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ── Affiliate CTA Card ── */
.affiliate-cta {
    background: linear-gradient(135deg, var(--accent-subtle), var(--bg-card));
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.affiliate-content strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}
.affiliate-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}
.affiliate-content .btn-primary {
    font-size: 0.9rem;
}

/* ── Data Table ── */
.hts-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}
.hts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.hts-table thead {
    background: var(--bg-subtle);
}
.hts-table th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-strong);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.hts-table th:hover {
    color: var(--accent);
}
.hts-table td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
    line-height: 1.5;
}
.hts-table tbody tr {
    transition: background 0.15s;
}
.hts-table tbody tr:hover {
    background: var(--accent-subtle);
}

/* ── Requirement Status Labels (text + CSS indicator, no emoji) ── */
.visa-status {
    font-weight: 600;
    padding-left: 1.15em;
    position: relative;
}
.visa-status::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.visa-free {
    color: #16a34a;
}
.visa-free::before {
    background: #16a34a;
}
.visa-eta {
    color: #2563eb;
}
.visa-eta::before {
    background: #2563eb;
}
.visa-evisa {
    color: #ea580c;
}
.visa-evisa::before {
    background: #ea580c;
}
.visa-voa {
    color: #ca8a04;
}
.visa-voa::before {
    background: #ca8a04;
}
.visa-required {
    color: #dc2626;
}
.visa-required::before {
    background: #dc2626;
}
.visa-citizen {
    color: var(--text-muted-light);
    font-weight: 500;
}
.visa-citizen::before {
    background: var(--text-muted-light);
}

/* ── Affiliate Action Button (small table variant) ── */
.btn-affiliate {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: #16a34a;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-affiliate:hover {
    background: #15803d;
    color: #fff;
}

/* ── E-E-A-T Section ── */
.eeat-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.eeat-section .eeat-inner {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.eeat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: var(--accent);
}
.eeat-info strong {
    color: var(--text-heading);
    font-size: 0.95rem;
}
.eeat-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.35rem 0 0;
    max-width: 700px;
}
.eeat-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted-light);
    margin-top: 1rem;
}

/* ── Cross-nav ── */
.cross-nav {
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.cross-nav strong {
    display: block;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
}
.cross-nav .links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.cross-nav .links a {
    font-size: 0.88rem;
}

/* ── Page Content (Legal Pages) ── */
.page-content {
    max-width: 800px;
}
.page-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
}
.page-body {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pagination a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
    padding: 2.5rem 1.25rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-col h4 {
    color: var(--text-heading);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.footer-col p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0;
    transition: color 0.15s;
}
.footer-col a:hover {
    color: var(--accent);
}
.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p {
    color: var(--text-muted-light);
    font-size: 0.78rem;
    margin: 0.25rem 0;
    line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .site-header {
        position: relative;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .site-main {
        padding: 1.25rem 0.75rem 3rem;
    }
    article h1 {
        font-size: 1.4rem;
    }
    .widget-card {
        padding: 1.25rem;
    }
}
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    .logo {
        font-size: 1.1rem;
    }
    .hts-table th, .hts-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
