/* ทวีทรัพย์ แอร์ แอนด์ เซาวน์ด — Custom Stylesheet */
/* Framework: Bulma CSS (via CDN) + custom overrides */

:root {
  --primary: #0a3055;       /* Deep navy — automotive trust */
  --primary-light: #1a5276;
  --primary-dark: #071e38;
  --accent: #e84118;        /* Bold red — energy, action */
  --accent-light: #f05a34;
  --steel: #7f8c8d;         /* Steel grey */
  --steel-light: #bdc3c7;
  --bg: #f5f7fa;
  --bg-white: #ffffff;
  --text-dark: #1a1f2e;
  --text-muted: #596275;
  --border: #e0e4eb;
}

/* ——— BASE ——— */
html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Noto Sans Thai', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.7;
}

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

a { color: var(--primary); transition: color .2s; }
a:hover { color: var(--accent); }

/* ——— NAVBAR ——— */
.site-nav {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-brand .brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #c9d0db;
  text-decoration: none;
  padding: .5rem .85rem;
  border-radius: 6px;
  font-size: .92rem;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 1rem;
    gap: .5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .75rem 1rem; }
}

/* ——— HERO ——— */
.hero-section {
  position: relative;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-section img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(7,30,56,.88) 0%, rgba(7,30,56,.5) 60%, rgba(7,30,56,.15) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  max-width: 620px;
  color: #fff;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.hero-content p {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 1.5rem;
}

/* ——— BUTTONS ——— */
.btn {
  display: inline-block;
  padding: .7rem 1.6rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  border: none;
  font-size: .95rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }

.btn-submit {
  background: var(--accent);
  color: #fff;
  padding: .8rem 2rem;
  border-radius: 6px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-submit:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ——— CONTAINER / SECTIONS ——— */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-dark { background: var(--primary); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-alt { background: #fff; }

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: .5rem;
  color: var(--primary);
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ——— PAGE HERO (non-home) ——— */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 3rem 0;
  margin-bottom: 0;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: .5rem;
}
.page-hero .breadcrumb {
  font-size: .88rem;
  opacity: .75;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: #fff; }

/* ——— PRODUCT GRID ——— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  color: inherit;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--primary);
}
.product-card-desc { font-size: .92rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.product-card-link {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

/* ——— FEATURES ROW ——— */
.features-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.feature-item {
  text-align: center;
  padding: 1.5rem 1rem;
}
.feature-icon {
  font-size: 2.8rem;
  margin-bottom: .75rem;
  display: block;
}
.feature-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .4rem;
  color: var(--primary);
}
.feature-desc { font-size: .9rem; color: var(--text-muted); }

/* ——— CONTENT ARTICLE ——— */
.content-article {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  line-height: 1.9;
}
.content-article h1 { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.content-article h2 { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin: 2rem 0 .75rem; border-left: 4px solid var(--accent); padding-left: .75rem; }
.content-article h3 { font-size: 1.15rem; font-weight: 700; color: var(--primary-light); margin: 1.5rem 0 .5rem; }
.content-article p { margin-bottom: 1rem; }
.content-article ul, .content-article ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content-article li { margin-bottom: .4rem; }
.content-article strong { color: var(--primary); }
.content-article a { color: var(--accent); }
.content-article a:hover { color: var(--accent-light); }

/* ——— INLINE IMAGE ——— */
.content-image {
  margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.content-image img { width: 100%; height: auto; }
.content-image figcaption {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .5rem 1rem;
  background: var(--bg);
  text-align: center;
}

/* ——— SIDEBAR LAYOUT ——— */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .sidebar-layout { grid-template-columns: 1fr; }
}

.sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  margin-bottom: 1.5rem;
}
.sidebar-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
}
.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-card li { margin-bottom: .5rem; }
.sidebar-card a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.sidebar-card a:hover { color: var(--accent); }
.sidebar-card-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
}
.sidebar-card-cta h3 { color: #fff; border-color: rgba(255,255,255,.2); }
.sidebar-card-cta p { color: rgba(255,255,255,.85); font-size: .92rem; margin-bottom: 1rem; }

/* ——— CONTACT FORM ——— */
.contact-form {
  display: grid;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-weight: 600;
  font-size: .92rem;
  color: var(--primary);
}
.form-group input, .form-group select, .form-group textarea {
  padding: .7rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
  background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; }

/* ——— INFO GRID ——— */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.info-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 1.25rem;
  border-left: 4px solid var(--accent);
}
.info-box h4 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.info-box p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ——— STATS BAR ——— */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--accent);
  flex-wrap: wrap;
}
.stat-item {
  padding: 1.5rem 2.5rem;
  text-align: center;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.25);
}
.stat-item:last-child { border-right: none; }
.stat-number { font-size: 2rem; font-weight: 800; display: block; }
.stat-label { font-size: .85rem; opacity: .9; }

/* ——— FOOTER ——— */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  padding: 3rem 0 1.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand { color: #fff; font-size: 1.1rem; font-weight: 800; margin-bottom: .75rem; }
.footer-brand .brand-accent { color: var(--accent); }

.footer-col h4 {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .88rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-desc { font-size: .88rem; line-height: 1.7; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-copy { font-size: .82rem; opacity: .6; }
.footer-tagline { font-size: .82rem; opacity: .6; font-style: italic; }

/* ——— BREADCRUMB ——— */
.breadcrumb {
  font-size: .88rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 .4rem; }

/* ——— 404 ——— */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.error-code { font-size: 8rem; font-weight: 900; color: var(--accent); line-height: 1; }
.error-title { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 1rem 0 .5rem; }
.error-desc { color: var(--text-muted); margin-bottom: 2rem; }

/* ——— UTILITIES ——— */
.text-center { text-align: center; }
.text-white { color: #fff; }
.mt-2 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ——— RESPONSIVE ——— */
@media (max-width: 768px) {
  .hero-section { height: 380px; }
  .hero-content h1 { font-size: 1.6rem; }
  .section { padding: 2.5rem 0; }
  .content-article { padding: 1.5rem; }
  .content-article h1 { font-size: 1.5rem; }
  .stats-bar { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.25); }
}
