/* =================================================================
   ASEAN-CONNECT V3 — Shared Layout Styles
   Header, Footer, Ticker, Back-to-top — loaded on ALL pages
   ================================================================= */

:root {
    --b900:#070e1a; --b800:#0d1b2a; --b700:#003d99; --b600:#0052cc;
    --b500:#0066e0; --b400:#4c9aff; --b300:#80bdff; --b200:#b3d9ff;
    --b100:#e6f0ff; --b50:#f0f7ff;
    --g600:#00875a; --g500:#00a870; --g100:#e3fcef;
    --gold:#d4af37; --gold100:#fff8e6;
    --p600:#5243aa; --p400:#8777d9; --p100:#ede6ff;
    --red:#de350b;
    --n900:#172b4d; --n800:#253858; --n700:#344563; --n600:#42526e;
    --n500:#505f79; --n400:#6b778c; --n300:#8993a4; --n200:#c1c7d0;
    --n100:#dfe1e6; --n50:#f4f5f7; --n25:#fafbfc;
    --r-sm:6px; --r-md:10px; --r-lg:16px; --r-xl:24px; --r-2xl:32px;
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
}

/* ── TOP TICKER ──────────────────────────────────────────────── */
.ticker {
    background: var(--b900);
    border-bottom: 1px solid rgba(76,154,255,0.1);
    height: 36px;
    overflow: hidden;
    position: relative;
    z-index: 1001;
}
.ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: tickerScroll 60s linear infinite;
    width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 32px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.06);
    height: 100%;
}
.ticker-item strong { color: #fff; font-weight: 700; }
.ticker-item .up { color: var(--g500); }
.ticker-item .down { color: var(--red); }
.ticker-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--b400);
}

/* ── HEADER ──────────────────────────────────────────────────── */
.hdr {
    position: fixed; top: 36px; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.hdr.scrolled {
    top: 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}
.hdr-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
    max-width: 1280px; margin: 0 auto; padding: 0 32px;
}
.hdr-left { display: flex; align-items: center; gap: 32px; }
.hdr-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 800; color: var(--b600);
    letter-spacing: -0.5px; text-decoration: none;
}
.hdr-brand-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--b600), var(--b400));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
}
.hdr-nav { display: flex; gap: 2px; }
.hdr-nav a {
    padding: 6px 14px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 500; color: var(--n600);
    transition: all 0.15s; text-decoration: none;
}
.hdr-nav a:hover, .hdr-nav a.active { background: var(--b50); color: var(--b600); }
.hdr-nav-badge { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; padding: 1px 6px; border-radius: 9px; margin-left: 4px; vertical-align: middle; line-height: 16px; }
.hdr-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Fix language/country toggles inside header (light bg) */
.hdr-right .lang-trigger,
.hdr-right .ctry-trigger {
    background: transparent;
    border: 1px solid var(--n200, #e0e0e0);
    color: var(--n600, #555);
}
.hdr-right .lang-trigger:hover,
.hdr-right .ctry-trigger:hover {
    background: var(--n50, #f5f5f5);
    border-color: var(--n300, #ccc);
}
.hdr-right .lang-globe { opacity: 0.6; }
.hdr-right .lang-caret,
.hdr-right .ctry-caret { opacity: 0.4; }
.hdr-btn {
    padding: 7px 18px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 600; border: none;
    transition: all 0.2s; cursor: pointer;
}
.hdr-btn--ghost { background: transparent; color: var(--n600); }
.hdr-btn--ghost:hover { background: var(--n50); }
.hdr-btn--outline { background: #fff; color: var(--b600); border: 1.5px solid var(--b600); }
.hdr-btn--outline:hover { background: var(--b50); }
.hdr-btn--fill { background: var(--b600); color: #fff; }
.hdr-btn--fill:hover { background: var(--b700); }
.hdr-sep { width: 1px; height: 24px; background: var(--n100); margin: 0 4px; }
.hdr-toggle { display: none; background: none; border: none; font-size: 20px; color: var(--n700); cursor: pointer; }
@media (max-width:900px) {
    .hdr-nav, .hdr-right { display: none; }
    .hdr-toggle { display: block; }
}

/* Mobile menu */
.hdr-mobile-menu {
    display: none;
    position: fixed;
    top: 100px; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 24px 32px;
    flex-direction: column;
    gap: 8px;
}
.hdr-mobile-menu.open { display: flex; }
.hdr-mobile-menu a {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--n700);
    text-decoration: none;
}
.hdr-mobile-menu a:hover, .hdr-mobile-menu a.active { background: var(--b50); color: var(--b600); }

/* Offset main content below fixed header + ticker */
.main-content {
    padding-top: 0;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.ft { background: var(--b900); color: #8b95a5; font-size: 13px; }
.ft-top-bar {
    background: linear-gradient(135deg, var(--b600), var(--b700));
    padding: 28px 0;
    margin-bottom: 24px;
}
.ft-top-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    max-width: 1280px; margin: 0 auto; padding: 0 32px;
}
.ft-top-text h4 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.ft-top-text p { font-size: 13px; color: rgba(255,255,255,0.65); margin: 0; }
.ft-top-form { display: flex; gap: 0; max-width: 380px; width: 100%; }
.ft-top-input {
    flex: 1; padding: 11px 16px;
    border: 1.5px solid rgba(255,255,255,0.2); border-right: none;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    background: rgba(255,255,255,0.08); color: #fff;
    font-size: 13px; font-family: inherit; outline: none;
}
.ft-top-input::placeholder { color: rgba(255,255,255,0.35); }
.ft-top-btn {
    padding: 11px 20px;
    background: #fff; color: var(--b600); border: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-weight: 600; font-size: 13px;
    cursor: pointer;
}
.ft-top-btn:hover { background: var(--b50); }

.ft-body {
    padding: 48px 0 32px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px;
    padding-top: 48px; padding-bottom: 32px;
}
.ft-brand-logo {
    height: 40px; width: auto;
    filter: brightness(0) invert(1);
}
.ft-brand-company {
    font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}
.ft-brand-name {
    display: flex; align-items: center; gap: 8px;
    font-size: 17px; font-weight: 800; color: #fff;
    margin-bottom: 8px;
}
.ft-brand-ic {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, var(--b400), var(--b600));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px;
}
.ft-brand-desc { font-size: 13px; color: #5a6578; line-height: 1.7; margin-bottom: 16px; }
.ft-contacts { list-style: none; padding: 0; margin: 0; }
.ft-contacts li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ft-contacts li i { color: var(--b400); margin-top: 3px; width: 14px; text-align: center; flex-shrink: 0; }
.ft-contacts a { color: #8b95a5; transition: color 0.2s; text-decoration: none; }
.ft-contacts a:hover { color: var(--b400); }
.ft-social { display: flex; gap: 8px; margin-top: 16px; }
.ft-social a {
    width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: #5a6578; font-size: 14px;
    transition: all 0.2s; text-decoration: none;
}
.ft-social a:hover { background: var(--b600); border-color: var(--b600); color: #fff; transform: translateY(-2px); }

.ft-heading {
    font-size: 12px; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 18px; padding-bottom: 10px;
    border-bottom: 2px solid rgba(76,154,255,0.3);
    display: inline-block;
}
.ft-links { list-style: none; padding: 0; margin: 0; }
.ft-links li { margin-bottom: 9px; }
.ft-links a { color: #5a6578; transition: all 0.15s; text-decoration: none; }
.ft-links a:hover { color: #fff; padding-left: 3px; }

.ft-bottom {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 20px 0;
}
.ft-bottom-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    max-width: 1280px; margin: 0 auto; padding: 0 32px;
}
.ft-copy { font-size: 11px; color: #3a4556; }
.ft-copy a { color: #5a6578; text-decoration: none; }
.ft-copy a:hover { color: var(--b400); }
.ft-flags { display: flex; gap: 5px; }
.ft-flags img { width: 22px; height: 14px; border-radius: 2px; object-fit: cover; opacity: 0.35; transition: opacity 0.2s; }
.ft-flags img:hover { opacity: 1; }

@media (max-width:992px) { .ft-body { grid-template-columns: 1fr 1fr; } }
@media (max-width:640px) {
    .ft-top-inner { flex-direction: column; text-align: center; }
    .ft-body { grid-template-columns: 1fr; }
    .ft-bottom-inner { flex-direction: column; text-align: center; }
}

/* ── BACK TO TOP ─────────────────────────────────────────────── */
.btt {
    position: fixed; bottom: 28px; right: 28px;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--b600); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; border: none;
    opacity: 0; transform: translateY(16px);
    transition: all 0.3s; z-index: 999;
    box-shadow: 0 4px 16px rgba(0,82,204,0.3);
    cursor: pointer;
}
.btt.show { opacity: 1; transform: translateY(0); }
.btt:hover { background: var(--b700); }
