/* ==========================================================================
   tramsacdien.vn — Design System & CSS Stylesheet
   Brand Colors: Ink #0D3B4E | Green #00A94F | Teal #009D9D | Blue #0093DE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #0D3B4E;
  --green: #00A94F;
  --teal: #009D9D;
  --blue: #0093DE;
  --mint: #B9F6CA;
  --mint-soft: #EBFBF3;
  --sage: #3E6B6B;
  --bg: #F5FAF8;
  --panel: #FFFFFF;
  --line: #DCE9E5;
  --muted: #5C7A78;
  --white: #FFFFFF;
  --grad: linear-gradient(135deg, #00A94F 0%, #009D9D 50%, #0093DE 100%);
  --grad-dark: linear-gradient(135deg, #0D3B4E 0%, #092835 100%);

  --font-body: 'Be Vietnam Pro', sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(13, 59, 78, 0.04);
  --shadow: 0 6px 20px rgba(13, 59, 78, 0.06);
  --shadow-lg: 0 12px 36px rgba(13, 59, 78, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 760px;
}

/* TYPOGRAPHY & BADGES */
.mono {
  font-family: var(--font-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--mint-soft);
  color: #007336;
}

.badge-blue {
  background: #E6F4FF;
  color: #0066B3;
}

.badge-teal {
  background: #E6F7F7;
  color: #007373;
}

.badge-green {
  background: var(--mint-soft);
  color: #007336;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 169, 79, 0.25);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 169, 79, 0.35);
}

.btn-accent {
  background: var(--green);
  color: var(--white);
}

.btn-accent:hover {
  background: #009043;
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--white);
  border-color: var(--teal);
  color: var(--teal);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: #144E67;
}

/* HEADER & NAVBAR */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 48px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.brand-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sage);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--bg);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 180px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--teal);
  background: var(--white);
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--muted);
}

/* MARKET TICKER BAR */
.ticker-bar {
  background: var(--ink);
  color: var(--white);
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ticker-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ticker-items {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker-items::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  color: rgba(255, 255, 255, 0.85);
}

.ticker-item:hover {
  color: var(--mint);
}

.ticker-item .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 8px;
  vertical-align: middle;
}

/* HERO FEATURED GRID */
.hero-section {
  padding: 24px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.hero-main-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.hero-main-card .thumb {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--ink);
}

.hero-main-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-card:hover .thumb img {
  transform: scale(1.03);
}

.hero-main-card .content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.hero-main-card h1, .hero-main-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.hero-main-card h1 a:hover, .hero-main-card h2 a:hover {
  color: var(--blue);
}

.hero-main-card p.excerpt {
  font-size: 14px;
  color: var(--sage);
  line-height: 1.6;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.meta-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-sub-card {
  display: flex;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.hero-sub-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.hero-sub-card .sub-thumb {
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.hero-sub-card .sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-sub-card .sub-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-sub-card h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.hero-sub-card h3 a:hover {
  color: var(--blue);
}

/* CORE CATEGORIES GRID */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--green);
  border-radius: 2px;
}

.section-title a.see-all {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

.cat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cat-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cat-card .num-box {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  background: var(--mint-soft);
  border: 1px solid rgba(0, 169, 79, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.cat-card h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.cat-card span.count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* MAIN LAYOUT (2 COLUMNS) */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-bottom: 48px;
}

/* ARTICLES LIST */
.articles-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-card-horizontal {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.article-card-horizontal:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.article-card-horizontal .card-thumb {
  height: 150px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-card-horizontal .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card-horizontal:hover .card-thumb img {
  transform: scale(1.04);
}

.article-card-horizontal .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-card-horizontal h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 6px 0 8px;
}

.article-card-horizontal h3 a:hover {
  color: var(--blue);
}

.article-card-horizontal p {
  font-size: 13.5px;
  color: var(--sage);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SIDEBAR WIDGETS */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  position: relative;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--green);
}

.most-read-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.most-read-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.most-read-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  width: 24px;
  flex-shrink: 0;
}

.most-read-text h4 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.most-read-text h4 a:hover {
  color: var(--blue);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  font-size: 12px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--sage);
}

.tag-pill:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* CHARGING STATION FINDER WIDGET */
.station-finder-widget {
  background: var(--grad-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.station-finder-widget h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}

.station-finder-widget p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}

.filter-group {
  margin-bottom: 12px;
}

.filter-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mint);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  outline: none;
}

.filter-select option {
  background: var(--ink);
  color: var(--white);
}

.station-mini-card {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
}

.station-mini-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
}

.station-mini-card p {
  font-size: 12px;
  margin: 2px 0 6px;
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-available {
  background: rgba(0, 169, 79, 0.25);
  color: #52F090;
  border: 1px solid #00A94F;
}

.status-full {
  background: rgba(214, 69, 69, 0.25);
  color: #FF7B7B;
  border: 1px solid #D64545;
}

/* UNIFIED FORM SECTION */
.cta-section {
  background: var(--grad-dark);
  color: var(--white);
  padding: 48px 0;
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
}

.cta-box {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-box p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.cta-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  text-align: left;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 147, 222, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 90px;
}

.cta-inputs .form-input-dark {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

.terms-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  margin: 12px 0 16px;
  cursor: pointer;
}

.terms-label input[type="checkbox"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}

/* FOOTER */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
}

.footer-col h4::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green);
  margin-top: 6px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--mint);
}

.footer-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-top: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: none;
}

.cookie-banner.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* PAGE HERO & BREADCRUMB */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 36px 0 40px;
  margin-bottom: 32px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.breadcrumb a:hover {
  color: var(--mint);
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
}

/* ARTICLE PROSE CONTENT */
.prose {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
}

.prose h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 28px 0 14px;
}

.prose h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 12px;
}

.prose p {
  margin-bottom: 16px;
}

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.prose table th {
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--green);
}

.prose table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--ink);
}

.prose table td:last-child {
  border-right: none;
}

.prose table tr:nth-child(even) {
  background: var(--bg);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-card-horizontal {
    grid-template-columns: 1fr;
  }
  .article-card-horizontal .card-thumb {
    height: 180px;
  }
  .cta-inputs {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
