/* base.css — shared styles: nav, footer, utilities, dark mode base */
:root{--primary:#1a1a2e;--secondary:#16213e;--accent:#e94560;--accent-light:#ff6b6b;--korean-blue:#003478;--korean-red:#CD2E3A;--cream:#faf8f5;--warm-white:#fffcf7;--light:#F8F9FA;--text-dark:#1a1a2e;--text-light:#6b7280;--gradient-korean:linear-gradient(135deg,#003478 0%,#CD2E3A 100%)}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:'Noto Sans Thai','Outfit','Segoe UI',sans-serif;line-height:1.7;color:var(--text-dark);background-color:var(--warm-white);overflow-x:hidden}
.container{max-width:1200px;margin:0 auto;padding:0 2rem}
nav{position:fixed;top:0;left:0;right:0;padding:1rem 5%;display:flex;justify-content:space-between;align-items:center;background:rgba(255,252,247,0.9);backdrop-filter:blur(20px);z-index:1000;transition:box-shadow 0.3s ease,padding 0.3s ease}
nav.scrolled{box-shadow:0 2px 30px rgba(0,0,0,0.08);padding:0.8rem 5%}
.logo{font-family:'Outfit',sans-serif;font-size:1.6rem;font-weight:800;background:var(--gradient-korean);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:-0.5px}
.nav-links{display:flex;gap:2.5rem;list-style:none;align-items:center}
.nav-links a{text-decoration:none;color:var(--text-dark);font-weight:500;font-size:0.95rem;transition:color 0.3s ease;position:relative}
.nav-links a::after{content:'';position:absolute;bottom:-4px;left:0;width:0;height:2px;background:var(--accent);transition:width 0.3s ease}
.nav-links a:hover::after{width:100%}
.nav-links a.active{color:var(--korean-red)}
.nav-links a.active::after{width:100%}
.mobile-menu-btn{display:none;background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--text-dark)}
@keyframes wave{0%,60%,100%{transform:rotate(0deg)}10%,30%{transform:rotate(14deg)}20%{transform:rotate(-8deg)}40%{transform:rotate(-4deg)}}
section{padding:5rem 2rem}
.section-header{text-align:center;margin-bottom:4rem}
.section-title{font-family:'Outfit',sans-serif;font-size:clamp(2rem,4vw,2.8rem);font-weight:700;color:var(--primary);margin-bottom:1rem;position:relative;display:inline-block}
.section-title .accent{color:var(--accent)}
.section-title::after{content:'';position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:60px;height:4px;background:var(--gradient-korean);border-radius:2px}
.section-subtitle{font-size:1.1rem;color:var(--text-light);max-width:600px;margin:1.5rem auto 0}
.value-icon{font-size:3rem;margin-bottom:1rem}
.articles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:2rem}
.read-more:hover{color:var(--korean-blue)}
footer{background:var(--primary);color:white;padding:4rem 2rem 2rem}
.footer-container{max-width:1200px;margin:0 auto}
.footer-top{display:flex;justify-content:space-between;align-items:center;padding-bottom:2rem;margin-bottom:0;border-bottom:1px solid rgba(255,255,255,0.1)}
.footer-brand .logo{font-family:'Outfit',sans-serif;font-size:1.5rem;font-weight:800;color:white;margin-bottom:0.35rem}
.footer-brand p{color:rgba(255,255,255,0.55);font-size:0.9rem;margin:0}
@media (max-width:600px){.footer-top{flex-direction:column;gap:1.25rem;text-align:center}}
.footer-content{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:3rem;padding-bottom:3rem;border-bottom:1px solid rgba(255,255,255,0.1)}
.footer-section h3{font-family:'Outfit','Noto Sans Thai',sans-serif;font-size:1.5rem;margin-bottom:1rem;font-weight:700}
.footer-section h4{font-family:'Outfit','Noto Sans Thai',sans-serif;font-size:1.1rem;margin-bottom:1rem;color:var(--accent-light)}
.footer-section p{color:rgba(255,255,255,0.7);font-size:0.95rem;line-height:1.6;margin-bottom:0.5rem}
.footer-section ul{list-style:none}
.footer-section ul li{margin-bottom:0.8rem}
.footer-section ul li a{color:rgba(255,255,255,0.7);text-decoration:none;transition:color 0.3s ease,transform 0.3s ease;display:inline-flex;align-items:center}
.footer-section ul li a:hover{color:var(--accent-light);transform:translateX(5px)}
.footer-section ul li i{margin-right:0.5rem;color:var(--accent-light);width:20px}
.footer-social{display:flex;gap:1rem;flex-wrap:wrap}
.footer-social a{width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,0.1);display:flex;align-items:center;justify-content:center;color:white;font-size:1.2rem;text-decoration:none;transition:background-color 0.3s ease,transform 0.3s ease}
.footer-social a:hover{background:var(--accent);transform:translateY(-3px)}
.footer-bottom{max-width:1200px;margin:0 auto;padding-top:2rem;text-align:center}
.footer-bottom p{color:rgba(255,255,255,0.5);font-size:0.9rem}
.back-to-top{position:fixed;bottom:25px;right:25px;width:46px;height:46px;background:var(--korean-red);color:white;border:none;border-radius:50%;font-size:1.1rem;cursor:pointer;display:none;align-items:center;justify-content:center;transition:background-color 0.3s ease,transform 0.3s ease;box-shadow:0 4px 15px rgba(0,0,0,0.2);z-index:997}
.back-to-top:hover{background:var(--korean-blue);transform:translateY(-3px)}
.back-to-top.show{display:flex}
@media (max-width:768px){footer{padding:3rem 1.5rem 2rem}.footer-content{grid-template-columns:1fr;gap:2rem}.social-floating{display:none !important}.back-to-top{bottom:90px;right:15px;width:42px;height:42px}#bmc-wbtn{bottom:15px !important;right:15px !important;width:50px !important;height:50px !important}.bmc-widget-component{max-width:90vw !important;max-height:70vh !important;right:5px !important;bottom:70px !important;transform:scale(0.9) !important;transform-origin:bottom right !important}.nav-links{position:fixed;top:0;right:0;width:100%;height:100vh;background:var(--warm-white);flex-direction:column;justify-content:center;align-items:center;gap:2rem;padding:2rem;opacity:0;visibility:hidden;transition:opacity 0.3s ease,visibility 0.3s ease;z-index:1000}.nav-links.active{opacity:1;visibility:visible}.nav-links li{opacity:0;transform:translateY(20px);transition:opacity 0.3s ease,transform 0.3s ease}.nav-links.active li{opacity:1;transform:translateY(0)}.nav-links.active li:nth-child(1){transition-delay:0.1s}.nav-links.active li:nth-child(2){transition-delay:0.2s}.nav-links.active li:nth-child(3){transition-delay:0.3s}.nav-links.active li:nth-child(4){transition-delay:0.4s}.nav-links.active li:nth-child(5){transition-delay:0.5s}.nav-links.active li:nth-child(6){transition-delay:0.6s}.nav-links a{font-size:1.5rem;padding:1rem 0}.mobile-menu-btn{display:block;z-index:1001}body.menu-open{overflow:hidden}}
@media (max-width:480px){.back-to-top{bottom:85px;right:12px;width:40px;height:40px;font-size:0.9rem}#bmc-wbtn{bottom:12px !important;right:12px !important;width:45px !important;height:45px !important}.bmc-widget-component{max-width:95vw !important;max-height:65vh !important;right:2px !important;bottom:60px !important;transform:scale(0.85) !important}}
.lang-switcher{display:flex;gap:4px;background:rgba(255,255,255,0.1);padding:4px;border-radius:10px;backdrop-filter:blur(10px);margin-left:1rem}
nav.scrolled .lang-switcher{background:#f1f5f9}
.lang-btn{padding:6px 14px;border:none;background:transparent;color:rgba(255,255,255,0.7);border-radius:7px;font-size:0.8rem;font-weight:700;cursor:pointer;transition:background-color 0.3s ease,color 0.3s ease,box-shadow 0.3s ease;font-family:"Outfit",sans-serif;letter-spacing:0.5px}
.lang-btn:hover{color:white;background:rgba(255,255,255,0.15)}
.lang-btn.active{background:white;color:#003478;box-shadow:0 2px 8px rgba(0,0,0,0.15)}
nav.scrolled .lang-btn{color:#64748b}
nav.scrolled .lang-btn:hover{color:#1a1a2e;background:rgba(0,0,0,0.05)}
nav.scrolled .lang-btn.active{background:#003478;color:white;box-shadow:0 2px 8px rgba(0,52,120,0.3)}
@media (max-width:768px){.lang-switcher{position:static;margin-left:auto;margin-right:0}.lang-btn{padding:4px 10px;font-size:0.75rem}}
[data-i18n]{transition:opacity 0.15s ease}
@font-face{font-family:'Outfit';src:url('/fonts/outfit-700.woff2') format('woff2');font-display:swap}

/* About Page */
.about-hero{background:linear-gradient(135deg,var(--korean-blue) 0%,var(--korean-red) 100%);color:white;padding:150px 2rem 80px;text-align:center}
.about-hero-content h1{font-family:'Outfit',sans-serif;font-size:clamp(2.5rem,5vw,4rem);font-weight:800;margin-bottom:1rem;text-shadow:0 4px 20px rgba(0,0,0,0.2)}
.about-hero-content .lead{font-size:clamp(1.1rem,2vw,1.4rem);opacity:0.95;max-width:700px;margin:0 auto;line-height:1.6}
.about-full{background:var(--warm-white);padding:5rem 2rem}
.container-narrow{max-width:800px;margin:0 auto}
.about-profile-image{text-align:center;margin-bottom:4rem}
.about-profile-image img{width:100%;max-width:400px;border-radius:0;box-shadow:none}
.story-content h2{font-family:'Outfit',sans-serif;font-size:2rem;color:var(--primary);margin-top:3rem;margin-bottom:1.5rem;line-height:1.3}
.story-content h2:first-of-type{margin-top:0}
.story-content p{font-size:1.15rem;line-height:1.9;color:var(--text-dark);margin-bottom:1.5rem}
.values-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:2rem;margin:3rem 0}
.value-card{background:white;padding:2rem;border-radius:16px;box-shadow:0 5px 20px rgba(0,0,0,0.08);transition:transform 0.3s ease,box-shadow 0.3s ease}
.value-card:hover{transform:translateY(-5px);box-shadow:0 15px 40px rgba(0,0,0,0.12)}
.value-card h3{font-family:'Outfit',sans-serif;font-size:1.3rem;color:var(--primary);margin-bottom:1rem}
.value-card p{font-size:1rem;line-height:1.7;margin-bottom:0}
.about-cta{background:var(--light);padding:3rem;border-radius:20px;text-align:center;margin-top:4rem}
.about-cta h3{font-family:'Outfit',sans-serif;font-size:2rem;color:var(--primary);margin-bottom:1rem}
.about-cta p{font-size:1.1rem;color:var(--text-light);margin-bottom:2rem}
.social-links-about{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.social-link{display:inline-flex;align-items:center;gap:0.5rem;padding:0.8rem 1.5rem;border-radius:50px;text-decoration:none;color:white;font-weight:600;transition:transform 0.3s ease,box-shadow 0.3s ease;box-shadow:0 4px 15px rgba(0,0,0,0.2)}
.social-link:hover{transform:translateY(-3px);box-shadow:0 8px 25px rgba(0,0,0,0.3)}
.social-link.youtube{background:#FF0000}
.social-link.instagram{background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888)}
.social-link.facebook{background:#1877f2}

/* ========================================
   Dark Mode — base (all pages)
   ======================================== */
/* ---- Theme toggle button ---- */
.theme-toggle {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-left: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1);
}
.theme-toggle::before { content: '🌙'; }
[data-theme="dark"] .theme-toggle::before { content: '☀️'; }

nav.scrolled .theme-toggle {
    background: rgba(0,0,0,0.06);
}
nav.scrolled .theme-toggle:hover {
    background: rgba(0,0,0,0.12);
}

/* ---- Dark mode CSS variables ---- */
[data-theme="dark"] {
    color-scheme: dark;
    --primary: #dcdce8;
    --text-dark: #dcdce8;
    --text-light: #8888a8;
    --warm-white: #0e0e14;
    --light: #131320;
    --cream: #111118;
    --accent: #ff6b8a;
    --accent-light: #ff8fa3;
}

/* ---- Global smooth transition ---- */
body,
nav,
.article-card,
.video-card,
.brand-item,
.value-card,
.related-card,
.badge,
.tag-btn,
#article-search,
.about-preview,
.about-full,
.youtube-section,
.articles-section,
.brands-section,
.article-body,
.social-share,
footer {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

/* ---- Navigation ---- */
[data-theme="dark"] nav {
    background: rgba(14,14,20,0.88);
}
[data-theme="dark"] nav.scrolled {
    background: rgba(14,14,20,0.97);
    box-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
[data-theme="dark"] .nav-links a {
    color: var(--text-dark);
}
[data-theme="dark"] nav.scrolled .lang-btn {
    color: #8888a8;
}
[data-theme="dark"] nav.scrolled .lang-btn:hover {
    color: var(--text-dark);
    background: rgba(255,255,255,0.08);
}
[data-theme="dark"] nav.scrolled .lang-btn.active {
    background: var(--korean-blue);
    color: white;
}
[data-theme="dark"] nav.scrolled .theme-toggle {
    background: rgba(255,255,255,0.08);
    color: #aaaacc;
}
[data-theme="dark"] nav.scrolled .theme-toggle:hover {
    background: rgba(255,255,255,0.14);
}
/* Mobile full-screen menu */
[data-theme="dark"] .nav-links {
    background: var(--warm-white);
}

/* ---- About page ---- */
[data-theme="dark"] .about-full {
    background: var(--warm-white);
}
[data-theme="dark"] .about-cta {
    background: var(--light);
}

/* ---- Section titles ---- */
[data-theme="dark"] .section-title {
    color: var(--primary);
}

/* ---- Footer (already dark, minor tweaks) ---- */
[data-theme="dark"] footer {
    background: #09090d;
}
[data-theme="dark"] .footer-bottom p {
    color: rgba(255,255,255,0.35);
}

/* ---- Back-to-top button — already has bg color, fine ---- */
/* ---- Responsive mobile toggle position ---- */
@media (max-width: 768px) {
    .theme-toggle {
        position: static;
        transform: none;
        margin-left: 0.35rem;
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    .theme-toggle:hover { transform: scale(1.08); }
}
