* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme palette */
    --tvb-primary: #3b82f6;        /* blue-500 */
    --tvb-primary-dark: #2563eb;   /* blue-600 */
    --tvb-accent: #22d3ee;         /* cyan-400 */
    --tvb-text: #e6edf3;           /* light text */
    --tvb-muted: #9fb0c3;          /* muted text */
    --tvb-bg: #0b1220;             /* app background */
    --tvb-surface: #121a2a;        /* cards, surfaces */
    --tvb-surface-2: #0f1726;      /* panels */
    --tvb-border: #1f2a3a;         /* borders */
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    min-height: 100dvh; /* mobile-friendly */
    background: var(--tvb-bg);
    color: var(--tvb-text);
    position: relative;
    line-height: 1.5; /* moderate readability spacing */
}

/* Application cards and buttons */
.application-card {
    position: relative;
    padding-bottom: 60px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.apply-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--tvb-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.application-card:hover .apply-button {
    background: var(--tvb-primary-dark);
}

/* Center the landing card only on the landing page */
body.landing {
    background: #000; /* fallback while image loads */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 100vh;
}

.site-description {
    color: var(--tvb-accent);
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

.navigation-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.nav-btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-btn.primary {
    background: var(--tvb-primary);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 200px;
}

.nav-btn.primary:hover {
    background: var(--tvb-primary-dark);
    transform: scale(1.05);
}

.secondary-nav {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.nav-btn.secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--tvb-primary);
    padding: 12px 25px;
    font-weight: 500;
}

.nav-btn.secondary:hover {
    background: rgba(59, 130, 246, 0.2);
}

.landing-description {
    color: rgba(255, 255, 255, 0.5);
    max-width: 400px;
    text-align: center;
    margin: 20px auto;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.landing-footer {
    margin-top: 40px;
    text-align: center;
}

/* Blurred background image behind all content */
body.landing::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('Images and Videos/background.png') center / cover no-repeat;
    filter: blur(8px);
    transform: scale(1.05); /* avoid edge clipping from blur */
    z-index: 0;
}

/* Subtle dark overlay for contrast */
body.landing::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

/* ===== Inner page styles (used by English/en.html and others) ===== */
.site-header {
    border-bottom: 1px solid var(--tvb-border);
    background: var(--tvb-surface);
}

.site-header__top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--tvb-text);
}

.brand-mark {
    width: 40px;
    height: auto;
    border-radius: 2px;
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tvb-text);
    position: relative;
}

.brand-text::before {
    content: 'CA';
    position: absolute;
    top: -0.5em;
    right: -2em;
    font-size: 0.6em;
    font-weight: normal;
    color: var(--tvb-text);
}

.site-utils {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch a {
    color: var(--tvb-primary);
    text-decoration: none;
    font-size: 0.95rem;
}
.lang-switch a:hover { text-decoration: underline; }
.lang-switch .sep { color: #5b6b7a; margin: 0 6px; }

.site-search { display: flex; align-items: center; gap: 8px; }
.site-search input[type="search"] {
    padding: 8px 10px;
    border: 1px solid var(--tvb-border);
    border-radius: 4px;
    background: var(--tvb-surface);
    color: var(--tvb-text);
    min-width: 220px;
}
.site-search button {
    padding: 8px 12px;
    background: var(--tvb-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.site-search button:hover { background: var(--tvb-primary-dark); }

.primary-nav { background: var(--tvb-surface-2); border-top: 1px solid var(--tvb-border); border-bottom: 1px solid var(--tvb-border); }
.primary-nav ul {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 16px;
    list-style: none;
    display: flex;
    gap: 18px;
}
.primary-nav a { color: var(--tvb-text); text-decoration: none; font-weight: 600; padding: 6px 8px; border-radius: 6px; }
.primary-nav a:hover { color: #fff; background: var(--tvb-primary); }

.hero {
    background: radial-gradient(1000px 400px at 20% 0%, rgba(59,130,246,0.12) 0%, rgba(34,51,85,0) 60%), linear-gradient(135deg, #0d1424, #0f1a33);
    border-bottom: 1px solid var(--tvb-border);
}
.hero__content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 16px;
}
.hero__content h1 { font-size: 2.2rem; margin-bottom: 6px; color: #dbe7ff; }
.hero__content p { color: var(--tvb-muted); margin-bottom: 18px; }
.btn-primary {
    display: inline-block;
    background: var(--tvb-primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none;
}
.btn-primary:hover { background: var(--tvb-primary-dark); }

.page-content { 
    max-width: 1100px; 
    margin: 16px auto; 
    padding: 24px; 
    background: transparent; 
}

/* Utility: accent underline for hero headings */
.hero__content .h1-accent {
    position: relative;
    padding-bottom: 8px;
}
.hero__content .h1-accent::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    background: #ef4444; /* red accent */
    border-radius: 2px;
}

.card-grid h2, .most-requested h2, .news h2 { font-size: 1.4rem; margin: 20px 0 12px; color: var(--tvb-text); }
.card-grid, .news { 
    background: transparent; 
    border: 0; 
    border-radius: 0; 
    padding: 0; 
    margin-bottom: 22px; 
}

/* Draw a thin separator after each segment on inner pages */
.page-content > section {
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--tvb-border);
}
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px; /* moderate separation */
}
.card {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--tvb-primary);
    text-decoration: none;
}
.card:hover { text-decoration: underline; }
.card h3 { margin-bottom: 4px; font-size: 1.05rem; }
.card p { color: var(--tvb-muted); }

.most-requested .link-list { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
.most-requested .link-list a { color: var(--tvb-primary); text-decoration: none; }
.most-requested .link-list a:hover { text-decoration: underline; }

.most-requested { background: transparent; border: 0; padding: 0; margin-bottom: 20px; }
.most-requested h2 { margin-top: 0; }
.most-requested .link-list {
    margin-top: 8px;
    font-weight: 600;
}

.news .news-item { border-top: 1px solid var(--tvb-border); padding: 12px 0; }
.news .news-item:first-of-type { border-top: none; }
.news .meta { color: var(--tvb-muted); font-size: 0.9rem; margin: 4px 0 8px; }

/* Sitemap styles */
.sitemap-section {
    margin: 20px 0;
}

.sitemap-section h3 {
    color: var(--tvb-primary);
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tvb-border);
}

.sitemap-section ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap-section ul li {
    margin: 8px 0;
}

.sitemap-section ul li a {
    color: var(--tvb-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sitemap-section ul li a:hover {
    color: var(--tvb-primary);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .sitemap-section ul {
        grid-template-columns: 1fr;
    }
}

/* Info cards for deportation types */
.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.info-card {
    background: var(--tvb-surface);
    border: 1px solid var(--tvb-border);
    border-radius: 8px;
    padding: 20px;
}

.info-card h4 {
    color: var(--tvb-primary);
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.info-card p {
    margin: 12px 0;
    font-size: 0.95rem;
}

.info-card ul {
    margin: 12px 0;
    padding-left: 20px;
}

.info-card li {
    margin: 8px 0;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .info-cards {
        grid-template-columns: 1fr;
    }
}

/* Global typography spacing */
p { margin: 0 0 12px; }
h1, h2, h3, h4 { margin: 18px 0 10px; line-height: 1.25; }
ul, ol { margin: 0 0 12px 1.25rem; }
li { margin: 6px 0; }

.site-footer { border-top: 1px solid var(--tvb-border); margin-top: 24px; background: #0d1526; position: relative; overflow: hidden; }
.site-footer::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160px;
    height: 160px;
    transform: translate(-50%, -50%);
    background: url('Images and Videos/ToadVille Sun.png') center/contain no-repeat;
    opacity: 0.10; /* subtle, semi-transparent */
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.25));
    z-index: 0;
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; position: relative; z-index: 1; }
.footer-brand { display: flex; align-items: center; }
.footer-brand-img { width: 48px; height: auto; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.footer-links-columns { display: grid; gap: 14px 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer-links-columns h4 { margin: 0 0 6px; font-size: 1rem; color: var(--tvb-text); }
.footer-links-columns ul { list-style: none; padding-left: 0; }
.footer-links-columns ul li { margin: 6px 0; }
.footer-links-columns a { color: var(--tvb-primary); text-decoration: none; }
.footer-links-columns a:hover { text-decoration: underline; }

/* Slightly increase spacing/legibility for footer copyright */
.site-footer .site-footer-text { letter-spacing: 0.3px; display: inline-block; padding-top: 2px; color: #ffffff !important; opacity: 0.95; }

/* Utility */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .most-requested .link-list { grid-template-columns: 1fr; }
    .footer-links-columns { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .site-header__top { flex-direction: column; align-items: stretch; gap: 10px; }
    .site-utils { justify-content: space-between; flex-wrap: wrap; }
    .primary-nav ul { flex-wrap: wrap; gap: 10px; }
    .grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links-columns { grid-template-columns: 1fr; }
}

.language-selection-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 30px;
    width: 400px;
    text-align: center;
    color: #333; /* dark text on white card */
}

/* Landing card-specific tweaks */
body.landing .language-selection-card .header {
    justify-content: center;
    gap: 10px;
}
body.landing .language-selection-card .site-title {
    font-size: 1.25rem;
    color: #333;
}
body.landing .language-selection-card .language-card-footer {
    margin-top: 16px;
    font-size: 12px;
    color: #333;
    opacity: 0.9;
    display: flex;
    justify-content: center;
}

/* Landing page without box */
body.landing .landing-content { text-align: center; }
body.landing .landing-content .header {
    justify-content: center;
    gap: 10px;
}
body.landing .landing-content .site-title {
    font-size: 1.5rem;
    color: #ffffff;
}
body.landing .landing-content .language-buttons { margin-top: 12px; }
body.landing .landing-content .lang-btn { min-width: 120px; }
body.landing .landing-content .site-flag { box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
body.landing .landing-content .landing-copyright {
    margin-top: 14px;
    font-size: 12px;
    color: #ffffff;
    opacity: 0.9;
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* default */
    margin-bottom: 25px;
    gap: 15px;
}

/* Small flag next to site title */
.site-flag {
    width: 32px;
    height: auto;
    display: block;
    border-radius: 2px;
}

.site-title {
    margin: 0;
}

.flag-container {
    flex-shrink: 0;
}


.government-text {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.gov-text-en {
    display: block;
    margin-bottom: 2px;
}

.gov-text-fr {
    display: block;
    font-size: 11px;
}

.language-buttons {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.lang-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

/* Navigation Buttons */
.navigation-buttons {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

/* Primary Button */
.nav-btn.primary {
    background-color: #2E5A87;
    color: white;
}

.nav-btn.primary:hover {
    background-color: #1E4A77;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Secondary Button */
.nav-btn.secondary {
    background-color: #4A6B8A;
    color: white;
}

.nav-btn.secondary:hover {
    background-color: #3A5B7A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.footer-links {
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    color: #0066CC;
    text-decoration: none;
    font-size: 12px;
}

.footer-link:hover {
    text-decoration: underline;
}

.separator {
    color: #666;
    font-size: 12px;
}

.site-footer-brand {
    display: flex;
    align-items: center;
}

.site-footer-text {
    font-weight: normal;
    font-size: 14px;
    color: #333;
    position: relative;
}

.site-footer-text::after {
    content: none;
}

/* Responsive design */
@media (max-width: 480px) {
    .language-selection-card {
        width: 90%;
        padding: 25px 20px;
        margin: 20px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .government-text {
        text-align: center;
    }
    
    .language-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .lang-btn {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}
