/* ============================================================
   BAT — Shared Stylesheet
   Covers: variables, reset, topbar, header/nav, ticker,
           footer, scroll-to-top, common responsive rules.
   Page-specific styles stay in each page's <style> block.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
    --navy:           #071428;
    --navy-dark:      #040B1A;
    --navy-light:     #0D2040;
    --navy-mid:       #005CE6;
    --electric:       #00AAFF;
    --electric-glow:  rgba(0,170,255,0.14);
    --gold:           #FFB400;
    --gold-light:     #FFCC44;
    --gold-dark:      #CC8800;
    --red:            #E02828;
    --red-light:      #FF3B3B;
    --white:          #FFFFFF;
    --off-white:      #F3F7FC;
    --gray-light:     #DFE8F4;
    --gray:           #6A82A4;
    --gray-dark:      #324460;
    --text-dark:      #0B1928;
    --shadow-sm:      0 2px 8px rgba(11,29,58,0.08);
    --shadow-md:      0 4px 20px rgba(11,29,58,0.14);
    --shadow-lg:      0 8px 40px rgba(11,29,58,0.22);
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --transition:     all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Prompt','Sarabun',sans-serif;
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Topbar ────────────────────────────────────────────── */
.topbar {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.8);
    font-size: 0.78rem;
    padding: 7px 0;
    border-bottom: 2px solid var(--gold);
}
.topbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 22px; }
.topbar-left a {
    color: rgba(255,255,255,0.75); transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.topbar-left a:hover { color: var(--gold-light); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.social-link {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.75rem;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.12);
}
.social-link:hover { background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }

.lang-switch { display: flex; gap: 4px; }
.lang-btn {
    padding: 3px 9px; border-radius: 4px; font-size: 0.72rem; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.65); background: transparent;
    font-family: 'Prompt', sans-serif;
}
.lang-btn.active, .lang-btn:hover {
    background: var(--gold); color: var(--navy-dark); border-color: var(--gold);
}

/* ── Site Header ───────────────────────────────────────── */
.site-header {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky; top: 0; z-index: 1000;
    transition: var(--transition);
    border-bottom: 3px solid var(--electric);
}
.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 78px; gap: 28px;
}

/* Logo */
.logo-area { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-img   { width: 62px; height: 62px; object-fit: cover; border-radius: 6px; }
.logo-text  { line-height: 1.35; }
.logo-text .name-th { font-size: 0.88rem; font-weight: 800; color: var(--navy); display: block; }
.logo-text .name-en { font-size: 0.63rem; font-weight: 500; color: var(--gray); display: block; }
.logo-text .royal   { font-size: 0.7rem;  font-weight: 700; color: var(--gold-dark); display: block; }

/* Nav */
.main-nav { margin-left: auto; }
.nav-list  { display: flex; align-items: center; gap: 2px; }
.nav-item  { position: relative; }
.nav-link  {
    display: flex; align-items: center; gap: 5px;
    padding: 10px 15px; font-size: 0.84rem; font-weight: 600;
    color: var(--gray-dark); border-radius: var(--radius-sm);
    transition: var(--transition); white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--navy); background: rgba(11,29,58,0.06); }
.nav-link i.fa-chevron-down { font-size: 0.6rem; transition: var(--transition); }
.nav-item:hover > .nav-link i.fa-chevron-down { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: white; border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); min-width: 210px; padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: var(--transition);
    border-top: 3px solid var(--navy); z-index: 100;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
    display: block; padding: 9px 14px; font-size: 0.82rem;
    color: var(--gray-dark); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.dropdown a:hover, .dropdown a.active {
    background: var(--off-white); color: var(--navy); padding-left: 20px;
}

/* Mobile toggle */
.menu-toggle {
    display: none; background: none; border: none;
    cursor: pointer; padding: 8px; color: var(--navy); font-size: 1.3rem;
}

/* ── Ticker Bar ────────────────────────────────────────── */
.ticker-bar {
    background: linear-gradient(90deg, #020509 0%, #050D1A 45%, #020509 100%);
    border-top: 1px solid rgba(0,170,255,0.1);
    border-bottom: 1px solid rgba(0,170,255,0.14);
    padding: 9px 0; overflow: hidden;
}
.ticker-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; gap: 18px;
}
.ticker-label {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,28,56,0.12);
    border: 1px solid rgba(255,28,56,0.45);
    color: #FF3A5C; font-size: 0.68rem; font-weight: 800;
    padding: 5px 13px; border-radius: 4px;
    white-space: nowrap; text-transform: uppercase; letter-spacing: 1.8px;
    font-family: 'Prompt', sans-serif;
}
.ticker-label::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #FF3A5C; box-shadow: 0 0 6px #FF3A5C;
    animation: live-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
.ticker-content { flex: 1; overflow: hidden; position: relative; }
.ticker-text {
    display: flex; gap: 50px;
    animation: ticker 28s linear infinite;
    white-space: nowrap;
}
.ticker-text span { font-size: 0.82rem; color: rgba(180,210,255,0.85); font-weight: 500; }
.ticker-text span::before { content: '▸'; margin-right: 9px; color: var(--electric); opacity: 0.9; }

@keyframes ticker    { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.25; transform: scale(0.75); }
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(180deg, var(--navy-dark) 0%, #03080f 100%);
    color: rgba(255,255,255,0.72);
    padding-top: 64px;
}
.footer-top {
    max-width: 1280px; margin: 0 auto; padding: 0 24px 44px;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand .logo-area  { margin-bottom: 16px; }
.footer-brand .footer-logo-img {
    filter: none; opacity: 0.9; border-radius: 8px;
    background: white; padding: 3px;
}
.footer-brand p { font-size: 0.82rem; line-height: 1.75; margin-bottom: 22px; }
.footer-social  { display: flex; gap: 10px; }
.footer-social .social-link { width: 38px; height: 38px; font-size: 0.9rem; }

.footer-col-title {
    font-size: 0.95rem; font-weight: 800; color: white;
    margin-bottom: 20px; padding-bottom: 11px;
    border-bottom: 2px solid var(--gold); display: inline-block;
}
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a {
    font-size: 0.82rem; color: rgba(255,255,255,0.6);
    transition: var(--transition); display: flex; align-items: center; gap: 8px;
}
.footer-links a::before { content: '›'; color: var(--gold); font-size: 1rem; line-height: 1; }
.footer-links a:hover   { color: white; padding-left: 4px; }

.footer-contact-item {
    display: flex; gap: 13px; align-items: flex-start;
    margin-bottom: 15px; font-size: 0.82rem;
}
.footer-contact-item i {
    color: var(--gold-light); margin-top: 2px; flex-shrink: 0; width: 16px;
}
.footer-bottom {
    text-align: center; padding: 20px 24px;
    font-size: 0.75rem; color: rgba(255,255,255,0.35);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-bottom a { color: var(--gold-light); }

/* ── Scroll-to-Top ─────────────────────────────────────── */
.scroll-top {
    position: fixed; bottom: 32px; right: 32px;
    width: 48px; height: 48px;
    background: var(--navy); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 2px solid var(--gold); z-index: 900;
    opacity: 0; transform: translateY(20px);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover   { background: var(--gold); transform: translateY(-3px); }

/* ── Page Hero (shared across inner pages) ─────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
    padding: 52px 24px 44px; position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: -40%; right: -5%;
    width: 400px; height: 400px; border-radius: 50%;
    background: rgba(0,170,255,0.06); border: 1px solid rgba(0,170,255,0.08);
}
.page-hero-inner  { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero-title  { font-size: 2.2rem; font-weight: 800; color: white; margin-bottom: 8px; }
.page-hero-sub    { font-size: 0.95rem; color: rgba(255,255,255,0.65); }
.page-hero-accent {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
    background: rgba(0,170,255,0.15); border: 1px solid rgba(0,170,255,0.3);
    color: var(--electric); font-size: 0.75rem; font-weight: 700;
    padding: 5px 14px; border-radius: 50px;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; color: rgba(255,255,255,0.6);
    margin-bottom: 16px; flex-wrap: wrap;
}
.breadcrumb a     { color: rgba(255,255,255,0.6); transition: var(--transition); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span  { color: var(--gold-light); font-weight: 600; }

/* ── Common Buttons ────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 14px 30px; background: var(--gold);
    color: var(--navy-dark); font-family: 'Prompt',sans-serif;
    font-size: 0.9rem; font-weight: 700; border-radius: 50px;
    border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(255,180,0,0.35);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(255,180,0,0.45); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 14px 30px; background: rgba(255,255,255,0.1);
    color: white; font-family: 'Prompt',sans-serif;
    font-size: 0.9rem; font-weight: 600; border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.5); cursor: pointer;
    transition: var(--transition); backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); border-color: white; }

/* ── Shared Section Header ─────────────────────────────── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px; padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-light);
}
.section-title {
    font-size: 1.15rem; font-weight: 800; color: var(--navy);
    display: flex; align-items: center; gap: 10px;
}
.section-title::before {
    content: ''; display: block; width: 4px; height: 22px;
    background: linear-gradient(180deg, var(--electric) 0%, var(--navy-mid) 100%);
    border-radius: 2px; box-shadow: 0 0 8px rgba(0,170,255,0.4);
}
.see-all {
    font-size: 0.78rem; color: var(--navy); font-weight: 700;
    display: flex; align-items: center; gap: 5px; transition: var(--transition);
    border: 1.5px solid var(--navy); padding: 6px 14px; border-radius: 50px;
}
.see-all:hover { background: var(--navy); color: white; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.65s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.34s; }

/* ── Responsive — Shared Elements ─────────────────────── */
@media (max-width: 1100px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .topbar { display: none; }
    .header-inner { height: 66px; padding: 0 16px; gap: 12px; }
    .logo-text .name-en { display: none; }
    .logo-img { width: 50px; height: 50px; }

    /* Mobile nav — hidden by default, shown via .open class */
    .main-nav {
        display: none; position: absolute; top: 66px; left: 0; right: 0;
        background: white; z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 10px 16px;
    }
    .main-nav.open           { display: block; }
    .main-nav.open .nav-list { flex-direction: column; gap: 2px; }
    .main-nav.open .nav-link { font-size: 0.9rem; padding: 12px 14px; }
    .main-nav.open .dropdown {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border-top: none;
        border-left: 3px solid var(--electric);
        margin: 4px 0 4px 14px; padding: 4px;
        background: var(--off-white); border-radius: var(--radius-sm);
    }
    .menu-toggle { display: flex; }

    .footer-top { grid-template-columns: 1fr; }
    .page-hero  { padding: 36px 16px 30px; }
    .page-hero-title { font-size: 1.6rem; }
    .section-header  { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 480px) {
    .logo-text .royal { display: none; }
    .logo-img { width: 44px; height: 44px; }
    .page-hero-title { font-size: 1.35rem; }
}
