/**
 * Homepage - index.html only.
 * Font stack: inherited from assets/css/base.css (load base.css before this file).
 */

[x-cloak] {
    display: none !important;
}

:root {
    --brand-hover:rgba(25, 70, 219, 0.97);

    --text-main: #141928;
    --text-soft: #667085;

    --bg-soft: #f8fafc;
    --border-light: #e5e7eb;

    --shadow-soft:
        0 10px 30px rgba(15, 23, 42, 0.05);

    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;

    --container-width: 1180px;

    /*
     * Country card icon backgrounds — keys match `SUPPORTED_LANGS` in
     * assets/js/modules/calendar.js: de, en, id, ja, ko, ms, th, tl, vi, zh
     * (edit gradients here only; selectors below reference these).
     */
    --country-icon-grad-de: linear-gradient(135deg, #1e3a8a, #ca8a04);
    --country-icon-grad-en: linear-gradient(135deg, #2563eb, #1d4ed8);
    --country-icon-grad-id: linear-gradient(135deg, #dc2626, #991b1b);
    --country-icon-grad-ja: linear-gradient(135deg, #ef4444, #dc2626);
    --country-icon-grad-ko: linear-gradient(135deg, #1e40af, #b91c1c);
    --country-icon-grad-ms: linear-gradient(135deg, #0ea5e9, #dc2626);
    --country-icon-grad-th: linear-gradient(135deg, #1d4ed8, #b91c1c);
    --country-icon-grad-tl: linear-gradient(135deg, #0038a8, #ce1126);
    --country-icon-grad-vi: linear-gradient(135deg, #dc2626, #ca8a04);
    --country-icon-grad-zh: linear-gradient(135deg, #f59e0b, #ea580c);

    /* Region-only homepage tiles (not language codes) */
    --country-icon-grad-us: linear-gradient(135deg, #b129bd, #b54dc0);
}

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

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-main);
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 38px;
    font-weight: 750;
    letter-spacing: -1px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--brand-color);

    font-size: 15px;
    font-weight: 650;

    transition: 0.2s;
}

.section-link:hover {
    opacity: 0.8;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(229,231,235,0.8);
}

.header-inner {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 48px;
    height: 48px;

    background: linear-gradient(
        135deg,
        var(--brand-color),
        var(--brand-color-deep)
    );

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);

    color: white;

    font-size: 32px;
    font-weight: 700;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1;

    transform: translateY(-1px);
}

.brand-name {
    opacity: 0.9;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.desktop-nav a {
    color: #374151;
    font-weight: 600;
    font-size: 15px;

    transition: 0.2s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--brand-color);
}

.search-btn {
    width: 42px;
    height: 42px;

    border-radius: 12px;
    border: 1px solid var(--border-light);

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;

    cursor: pointer;
}

.mobile-toggle {
    display: none;
}

.site-header .container {
    position: relative;
}

.mobile-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    padding: 8px 0 12px;
    z-index: 11;
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: rgba(15, 23, 42, 0.25);
}

.mobile-nav a {
    display: block;
    padding: 14px 24px;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.15s, color 0.15s;
}

.mobile-nav a:hover {
    color: var(--brand-color);
    background: var(--bg-soft);
}

@media (min-width: 993px) {
    .mobile-nav {
        display: none !important;
    }

    .mobile-nav-backdrop {
        display: none !important;
    }
}

/* HERO */

.hero {
    padding: 36px 0;
}

.hero-box {
    position: relative;
    min-height: 560px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #f0f7ff;
    background-image: url("../images/hero-bg-1600.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center right;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e2e8f0;
}

.hero-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(240, 247, 255, 0.95) 20%,
        rgba(240, 247, 255, 0) 90%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-left: 80px;
}

.hero-title {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 24px;
    color: #202630;
}

.hero-desc {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-soft);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    background: var(--brand-color);
    color: white;
    padding: 18px 40px;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(29, 127, 216, 0.2);
}

/* POPULAR COUNTRIES */

.country-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    align-items: stretch;
}

.country-card {
    background: white;

    border: 1px solid var(--border-light);

    border-radius: 24px;

    padding: 28px;

    transition: 0.25s ease;

    position: relative;

    overflow: hidden;

    display: flex;
    flex-direction: column;
    height: 100%;
}

.country-card:hover {
    transform: translateY(-5px);

    border-color: #d5e3ff;

    box-shadow:
        0 16px 40px rgba(37,99,235,0.08);
}

.country-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;

    flex: 0 0 auto;
    min-height: 80px;
    margin-bottom: 24px;
}

.country-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 12px 22px rgba(37, 99, 235, 0.18);
}

.country-icon.de {
    background: var(--country-icon-grad-de);
}

.country-icon.en {
    background: var(--country-icon-grad-en);
}

.country-icon.id {
    background: var(--country-icon-grad-id);
}

.country-icon.ja,
.country-icon.jp {
    background: var(--country-icon-grad-ja);
}

.country-icon.ko {
    background: var(--country-icon-grad-ko);
}

.country-icon.ms {
    background: var(--country-icon-grad-ms);
}

.country-icon.th {
    background: var(--country-icon-grad-th);
}

.country-icon.tl {
    background: var(--country-icon-grad-tl);
}

.country-icon.vi {
    background: var(--country-icon-grad-vi);
}

.country-icon.zh,
.country-icon.cn {
    background: var(--country-icon-grad-zh);
}

/* UK tile uses same blues as English UI gradient */
.country-icon.uk {
    background: var(--country-icon-grad-en);
}

.country-icon.us {
    background: var(--country-icon-grad-us);
}

.country-name-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 64px;
}

.country-name {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -0.6px;
    line-height: 1.25;
}

.country-desc {
    color: var(--text-soft);

    font-size: 15px;
    line-height: 1.75;

    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
}

.country-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;

    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 24px;
}

.country-stat {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.country-link {
    color: var(--brand-color);

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
}

/* MINI ABOUT */

.mini-about-card {
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8fbff
        );

    border: 1px solid var(--border-light);

    border-radius: 30px;

    padding: 54px;

    box-shadow: var(--shadow-soft);
}

.mini-about-label {
    display: inline-block;

    color: var(--brand-color);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    margin-bottom: 18px;
}

.mini-about-title {
    font-size: 42px;
    line-height: 1.2;
    letter-spacing: -1.4px;
    font-weight: 800;

    max-width: 880px;

    margin-bottom: 22px;
}

.mini-about-desc {
    max-width: 780px;

    font-size: 17px;
    line-height: 1.9;

    color: var(--text-soft);

    margin-bottom: 28px;
}

.mini-about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mini-feature {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 12px 18px;

    background: white;

    border: 1px solid #dbe7f5;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 650;
}

.mini-feature-icon {
    width: 22px;
    height: 22px;

    border-radius: 999px;

    background: #e8f1ff;

    color: var(--brand-color);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 800;
}

/* UPCOMING */

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.upcoming-item {
    align-self: stretch;
    min-height: 200px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    background-color: #e2e8f0;
    background-repeat: no-repeat;
    background-position: right;
    background-size: cover;
    transition: 0.2s;
}

.upcoming-item:hover {
    transform: translateY(-3px);
    border-color: #cbdcf0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.upcoming-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    height: 100%;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.12) 0%,
        rgba(255, 255, 255, 0.88) 75%,
        #ffffff 100%
    );
    transition: inherit;
}

.upcoming-date {
    font-size: 13px;
    color: var(--brand-color);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.upcoming-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.upcoming-desc {
    font-size: 15px;
    color: var(--text-soft);
}

/* FOOTER */

.site-footer {
    margin-top: 72px;

    background: #f8fafc;

    border-top: 1px solid #e5e7eb;
}

.footer-main {
    padding: 54px 0 34px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.footer-brand {
    max-width: 420px;
}

.footer-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 18px;
}

.footer-logo {
    width: 48px;
    height: 48px;

    background: linear-gradient(
        135deg,
        var(--brand-color),
        var(--brand-color-deep)
    );

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);

    color: white;

    font-size: 32px;
    font-weight: 700;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1;

    transform: translateY(-1px);
}

.footer-brand-name {
    opacity: 0.9;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.footer-desc {
    color: var(--text-soft);

    line-height: 1.9;
    font-size: 15px;
}

.footer-links {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 18px 56px;
}

.footer-grid a {
    color: #475569;

    font-size: 15px;
    font-weight: 550;

    transition: 0.2s;
}

.footer-grid a:hover {
    color: var(--brand-color);
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;

    padding: 24px 0 40px;

    display: flex;
    justify-content: space-between;
    gap: 30px;

    color: #64748b;

    font-size: 14px;
    line-height: 1.8;
}

.footer-note {
    text-align: right;
}

/* RESPONSIVE */

@media (max-width: 1200px) {

    .hero-box {
        min-height: 500px;
        background-position: 70% center;
    }

    .hero-content {
        padding-left: 40px;
    }

    .hero-title {
        font-size: 58px;
    }

    .country-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .upcoming-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;

        width: 42px;
        height: 42px;

        border-radius: 12px;
        border: 1px solid var(--border-light);

        background: white;

        align-items: center;
        justify-content: center;
    }

    .hero-box {
        align-items: flex-start;
        padding-top: 60px;
        background-position: 80% center;
    }

    .hero-box::before {
        background: linear-gradient(
            180deg,
            rgba(240, 247, 255, 0.9) 40%,
            rgba(240, 247, 255, 0.4) 100%
        );
    }

    .hero-content {
        padding: 0 32px;
        text-align: center;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .mini-about-card {
        padding: 42px;
    }

    .mini-about-title {
        font-size: 34px;
    }

    .footer-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }

    .footer-links {
        width: 100%;
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .footer-note {
        text-align: left;
    }
}

@media (max-width: 768px) {

    .section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .hero {
        padding-top: 36px;
    }

    .hero-title {
        font-size: 42px;
        line-height: 1.08;
    }

    .hero-desc {
        font-size: 17px;
    }

    .country-grid,
    .upcoming-grid {
        grid-template-columns: 1fr;
    }

    .country-card {
        padding: 24px;
    }

    .mini-about-card {
        padding: 34px 26px;
        border-radius: 24px;
    }

    .mini-about-title {
        font-size: 30px;
    }

    .mini-about-desc {
        font-size: 16px;
    }

    .mini-about-features {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 480px) {

    .container {
        padding: 0 18px;
    }

    .header-inner {
        height: 72px;
    }

    .brand-name {
        font-size: 20px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .section-header,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .country-name,
    .upcoming-title {
        font-size: 22px;
    }

    .mini-about-title {
        font-size: 26px;
    }
}
