/*
Theme Name: ASCAR Blog
Theme URI: https://ascar.vn/
Author: ASCAR Vietnam
Author URI: https://ascar.vn/
Description: Blog theme for ASCAR Vietnam (ascar.vn). Same header, footer, colours, fonts and sizes as the live site. Listing page with one featured post + 3-column grid, single post page with hero image and full article. Bilingual VI / EN via the built-in ?lang= switch (works without any plugin; Polylang is supported too when installed).
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ascar-blog
Tags: blog, bilingual, red, responsive
*/

:root{
  --red:#ed1c24; --red-dark:#c8101a; --red-soft:#fdecec;
  --ink:#222222; --body:#3d3d3d; --muted:#777777;
  --page:#efefef; --card:#ffffff; --line:#e3e3e3;
  --footer:#333333; --footer-ink:#e8e8e8; --footer-muted:#bdbdbd;
  --radius:6px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--body);
  font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.6;}
img{max-width:100%;display:block}
a{color:inherit}
button,[role="button"],select,summary,input:not([type="checkbox"],[type="radio"]){min-height:2.25rem}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}

/* ---------- ASCAR header (same as ascar.vn) ---------- */
.topbar{background:var(--red);color:#fff}
.topbar-in{display:flex;align-items:center;gap:28px;padding:14px 0;flex-wrap:wrap}
.logo{display:flex;flex-direction:column;line-height:1;text-decoration:none;color:#fff;flex:0 0 auto}
.logo svg{width:150px;height:auto}
.logo small{font-size:10px;letter-spacing:2.5px;margin-top:3px;font-weight:bold}
.searchbox{flex:1 1 260px;max-width:430px;display:flex;background:#fff;border-radius:4px;overflow:hidden}
.searchbox input{flex:1;border:0;padding:0 14px;font-size:14px;font-family:inherit;color:#333;min-width:0}
.searchbox input:focus{outline:2px solid #fff;outline-offset:-2px}
.searchbox button{border:0;background:#fff;color:#555;width:46px;cursor:pointer;display:grid;place-items:center}
.topitem{color:#fff;text-decoration:none;line-height:1.3}
.topitem b{display:block;font-size:16px}
.topitem span{font-size:12px;opacity:.92}
.langswitch{display:flex;background:rgba(0,0,0,.18);border-radius:999px;padding:3px;gap:2px}
.langswitch a{border:0;background:transparent;color:#fff;font-weight:bold;font-size:13px;
  padding:0 14px;border-radius:999px;cursor:pointer;font-family:inherit;min-height:2rem;
  display:inline-flex;align-items:center;text-decoration:none;line-height:2rem}
.langswitch a.current{background:#fff;color:var(--red-dark)}
.navbar{background:#f7f7f7;border-bottom:1px solid #ddd;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.navbar-in{display:flex;align-items:stretch;flex-wrap:wrap}
.catbtn{display:flex;align-items:center;gap:8px;color:var(--red);font-weight:bold;font-size:14px;
  padding:11px 18px 11px 4px;text-transform:none;background:none;border:0;cursor:pointer;font-family:inherit}
.navlinks{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}
.navlinks li{display:flex}
.navlinks a{display:flex;align-items:center;padding:11px 14px;font-size:13px;font-weight:bold;color:#333;
  text-decoration:none;text-transform:uppercase;border-left:1px solid #e2e2e2}
.navlinks a:hover{color:var(--red)}
.navlinks a.active,.navlinks .current-menu-item a{color:var(--red)}
.burger{display:none;margin-left:auto;background:none;border:0;cursor:pointer;padding:8px;color:#333}

/* ---------- Blog listing ---------- */
.crumbs{font-size:13px;color:var(--muted);padding:16px 0 0}
.crumbs a{color:#1a7ab5;text-decoration:none}
.pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:6px 0 18px}
h1.pagetitle{font-size:28px;line-height:1.25;color:var(--ink);margin:0;font-weight:bold}
.pagehead p{margin:4px 0 0;color:var(--muted);font-size:14px;max-width:640px}
.featured{position:relative;border-radius:10px;overflow:hidden;background:#000;margin-bottom:34px;display:block;text-decoration:none}
.featured img{width:100%;height:440px;object-fit:cover;opacity:.94}
.featured .shade{position:absolute;inset:0;background:linear-gradient(0deg,rgba(0,0,0,.78) 0%,rgba(0,0,0,.35) 45%,rgba(0,0,0,0) 75%)}
.featured .ftext{position:absolute;left:0;right:0;bottom:0;padding:28px 32px;color:#fff;max-width:820px}
.flabel{font-size:14px;font-weight:bold;letter-spacing:.4px;text-transform:uppercase;color:#ffb3b6}
.featured h2{font-size:34px;line-height:1.2;margin:8px 0 10px;font-weight:bold;color:#fff}
.featured p{margin:0;font-size:15px;color:#f1f1f1;max-width:640px}
.farrow{position:absolute;right:26px;top:50%;transform:translateY(-50%);width:56px;height:56px;border-radius:50%;
  border:2px solid rgba(255,255,255,.85);display:grid;place-items:center;color:#fff}
.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 8px}
h2.sectitle{font-size:20px;color:var(--ink);margin:0;text-transform:uppercase}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 20px}
.chip{border:1px solid #cfcfcf;background:#fff;color:#444;border-radius:999px;padding:0 16px;font-size:13.5px;
  font-weight:bold;cursor:pointer;font-family:inherit;text-decoration:none;display:inline-flex;align-items:center;min-height:2.25rem}
.chip.current{background:var(--red);border-color:var(--red);color:#fff}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:26px 24px}
.post{background:transparent;text-decoration:none;display:block}
.post .thumb{border-radius:8px;overflow:hidden;aspect-ratio:16/10;background:#ddd}
.post .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.post:hover .thumb img{transform:scale(1.04)}
.post .cat{display:inline-block;margin-top:14px;font-size:12px;font-weight:bold;letter-spacing:.5px;
  text-transform:uppercase;color:var(--red)}
.post h3{font-size:18px;line-height:1.35;color:var(--ink);margin:5px 0 7px;font-weight:bold}
.post:hover h3{color:var(--red-dark)}
.post p{margin:0;font-size:14px;color:#5c5c5c;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.byline{display:flex;align-items:center;gap:9px;margin-top:13px;font-size:13px;color:#555}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;
  font-size:12px;font-weight:bold;flex:0 0 auto}
.byline .dot{color:#aaa}
.loadmore{display:flex;justify-content:center;margin:36px 0 8px}
.btn{display:inline-flex;align-items:center;gap:8px;background:#1f2937;color:#fff;border:0;border-radius:6px;
  padding:0 26px;font-size:14.5px;font-weight:bold;cursor:pointer;font-family:inherit;min-height:2.75rem;text-decoration:none}
.btn:hover{background:#111827}
.btn.red{background:var(--red)} .btn.red:hover{background:var(--red-dark)}
.btn.ghost{background:#fff;color:#333;border:1px solid #bbb}
.empty{background:#fff;border:1px solid var(--line);border-radius:8px;padding:28px;text-align:center;color:var(--muted)}
.ctaband{background:var(--red);border-radius:10px;color:#fff;padding:30px 32px;margin:44px 0 8px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.ctaband h2{margin:0 0 4px;font-size:22px}
.ctaband p{margin:0;color:#ffe1e2;font-size:14.5px}
.ctaband .btn{background:#fff;color:var(--red-dark)} .ctaband .btn:hover{background:#ffe9ea}
.pagenav{display:flex;justify-content:center;gap:8px;margin:36px 0 8px;flex-wrap:wrap}
.pagenav a,.pagenav span{border:1px solid #cfcfcf;background:#fff;color:#444;border-radius:6px;padding:6px 14px;
  font-size:14px;font-weight:bold;text-decoration:none}
.pagenav .current{background:var(--red);border-color:var(--red);color:#fff}

/* ---------- Blog detail ---------- */
.backlink{display:inline-flex;align-items:center;gap:7px;color:var(--red);font-weight:bold;font-size:14px;
  background:none;border:0;cursor:pointer;font-family:inherit;padding:14px 0 4px;text-decoration:none}
.dmeta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13.5px;color:var(--muted);margin-top:14px}
.dmeta .cat{color:var(--red);font-weight:bold;text-transform:uppercase;font-size:12.5px;letter-spacing:.5px}
h1.dtitle{font-size:32px;line-height:1.25;color:var(--ink);margin:10px 0 6px;max-width:860px}
.dstand{font-size:16.5px;color:#555;max-width:760px;margin:0 0 20px}
.heroimg{border-radius:10px;overflow:hidden;margin-bottom:8px}
.heroimg img{width:100%;height:460px;object-fit:cover}
.article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:34px 40px;margin:18px 0 30px}
.article .col{max-width:760px;margin:0 auto}
.article p{font-size:16px;line-height:1.75;color:#333;margin:0 0 16px}
.article h2{font-size:21px;color:var(--ink);margin:28px 0 10px;line-height:1.35}
.article ul{margin:0 0 16px;padding-left:22px}
.article li{font-size:16px;line-height:1.7;color:#333;margin-bottom:7px}
.article blockquote{margin:22px 0;padding:16px 20px;background:var(--red-soft);border-radius:8px;
  font-size:16px;color:#7a0d12}
.article blockquote b{color:var(--red-dark)}
.shareline{display:flex;gap:10px;flex-wrap:wrap;align-items:center;border-top:1px solid var(--line);
  padding-top:20px;margin-top:26px;font-size:14px;color:var(--muted)}
.related{margin:6px 0 10px}

/* ---------- ASCAR footer (same as ascar.vn) ---------- */
footer{background:var(--footer);color:var(--footer-ink);margin-top:56px}
.footgrid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:30px;padding:38px 0 30px}
footer h4{margin:0 0 14px;font-size:14.5px;color:#fff;text-transform:uppercase;line-height:1.45}
footer p,footer li{font-size:13.5px;line-height:1.65;color:var(--footer-ink)}
footer p{margin:0 0 10px}
footer ul{list-style:none;margin:0;padding:0}
footer li{margin-bottom:8px}
footer li::before{content:"\25CF";font-size:8px;color:#fff;margin-right:8px;vertical-align:2px}
footer .plain li::before{content:""}
footer a{color:var(--footer-ink);text-decoration:none}
footer a:hover{color:#fff;text-decoration:underline}
.socials{display:flex;gap:9px;margin-top:14px;flex-wrap:wrap}
.socials a{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:bold;
  font-size:14px;text-decoration:none}
.s-fb{background:#3b5998}.s-gp{background:#dd4b39}.s-yt{background:#cd201f}.s-tw{background:#1da1f2}
.copybar{background:#ececec;color:#777;font-size:12.5px;text-align:center;padding:13px 16px;line-height:1.7}
.toTop{position:fixed;right:16px;bottom:16px;width:44px;height:44px;border:0;border-radius:4px;background:#9a9a9a;
  color:#fff;cursor:pointer;display:grid;place-items:center;z-index:30}
.hotline-fab{position:fixed;right:16px;bottom:72px;z-index:30;background:var(--red);color:#fff;text-decoration:none;
  font-weight:bold;font-size:14.5px;border-radius:999px;padding:0 20px;display:inline-flex;align-items:center;gap:8px;
  min-height:2.75rem;box-shadow:0 4px 14px rgba(0,0,0,.25)}

@media (max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .footgrid{grid-template-columns:1fr 1fr}
  .featured img{height:360px}
  .featured h2{font-size:26px}
  .farrow{display:none}
  .heroimg img{height:320px}
}
@media (max-width:640px){
  .topbar-in{gap:14px}
  .searchbox{order:3;flex-basis:100%;max-width:none}
  .topitem.hideS{display:none}
  .navlinks{display:none;width:100%;flex-direction:column}
  .navlinks.open{display:flex}
  .navlinks a{border-left:0;border-top:1px solid #e6e6e6;padding:13px 4px}
  .burger{display:block}
  .grid{grid-template-columns:1fr}
  .featured img{height:300px}
  .featured .ftext{padding:20px}
  .featured h2{font-size:23px}
  h1.pagetitle{font-size:24px}
  h1.dtitle{font-size:25px}
  .article{padding:24px 18px}
  .footgrid{grid-template-columns:1fr}
  .ctaband{padding:24px 20px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;scroll-behavior:auto!important}
}
