/* ============================================================
   IT Solutions Thailand — Global Stylesheet
   Light theme / responsive / EN-TH bilingual ready
   ============================================================ */

:root {
  --primary: #0b5cad;
  --primary-dark: #08447e;
  --accent: #f39c12;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --text: #22303c;
  --text-muted: #5b6b7a;
  --border: #dde5ec;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(11, 92, 173, 0.08);
  --max-width: 1120px;
  --font: "Inter", "Segoe UI", "Helvetica Neue", "Noto Sans Thai",
    "Leelawadee UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

/* Thai script needs slightly more line-height */
body.lang-th { line-height: 1.85; }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Language switch */
.lang-switch {
  margin-left: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.lang-switch:hover { background: #e6eef6; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- Hero / Page banner ---------- */
.hero {
  background:
    linear-gradient(100deg, rgba(7, 40, 77, 0.9) 0%, rgba(8, 68, 126, 0.62) 48%, rgba(11, 92, 173, 0.18) 100%),
    url("../img/hero-home.jpg?v=6") center / cover no-repeat;
  color: #fff;
  padding: 64px 0 74px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.25;
  max-width: 720px;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
}
body.lang-th .hero h1 { line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(243, 156, 18, 0.35); }
.btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 2rem; margin-bottom: 12px; }
.section-head p { color: var(--text-muted); }

/* Cards grid */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(11, 92, 173, 0.14); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: #e8f1fa;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.5rem;
}
.card .icon img {
  width: 28px; height: 28px;
  display: block;
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card ul { margin-top: 14px; }
.card ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 8px;
}
.card ul li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Stats band */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
}
.stat { text-align: center; }
.stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.stat .label { color: var(--text-muted); font-size: 0.92rem; }

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.partner-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s, box-shadow 0.2s;
}
.partner-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.partner-card img {
  max-height: 28px;
  max-width: 62%;
  width: auto;
  height: auto;
}
.partner-card.lg img {
  max-height: 52px;
  max-width: 88%;
}
/* per-logo size tuning */
.partner-card img.sz-l {
  max-height: 44px;
  max-width: 72%;
}
.partner-card img.sz-m {
  max-height: 36px;
  max-width: 72%;
}
.partner-card img.sz-xl {
  max-height: 52px;
  max-width: 70%;
}

@media (max-width: 640px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-card { min-height: 56px; }
  .partner-card img { max-height: 22px; }
  .partner-card.lg img { max-height: 34px; }
  .partner-card img.sz-l { max-height: 30px; }
  .partner-card img.sz-m { max-height: 26px; }
  .partner-card img.sz-xl { max-height: 40px; }
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: 14px;
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-text { flex: 1 1 420px; }
.cta-text h2 { font-size: 1.55rem; margin-bottom: 8px; }
.cta-text p { color: rgba(255, 255, 255, 0.85); max-width: 560px; }
.cta-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 15px 38px;
  font-size: 1.02rem;
}

/* Page banner (inner pages) */
.page-banner {
  background:
    linear-gradient(100deg, rgba(7, 40, 77, 0.94) 0%, rgba(11, 92, 173, 0.78) 100%),
    url("../img/banner-inner.jpg?v=2") center / cover no-repeat;
  color: #fff;
  padding: 72px 0;
}
.page-banner h1 { font-size: 2.2rem; margin-bottom: 8px; }
.page-banner p { color: rgba(255, 255, 255, 0.85); max-width: 640px; }

/* Two-column feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split h2 { font-size: 1.8rem; margin-bottom: 16px; }
.split p { color: var(--text-muted); margin-bottom: 14px; }
.visual-placeholder {
  background: linear-gradient(135deg, #dfe9f3, #c6d9ec);
  border-radius: var(--radius);
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark);
  font-weight: 600;
}

/* Values list */
.value-item { display: flex; gap: 16px; margin-bottom: 22px; }
.value-item .dot {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #e8f1fa;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.about-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.ai-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.value-item h4 { margin-bottom: 4px; }
.value-item p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
}
.contact-info .item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info .item .icon {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: #e8f1fa;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-info h4 { margin-bottom: 2px; font-size: 0.98rem; }
.contact-info p { color: var(--text-muted); font-size: 0.94rem; }

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.form-note { font-size: 0.83rem; color: var(--text-muted); margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #10263c;
  color: #b9c7d4;
  padding: 56px 0 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}
.site-footer a { color: #b9c7d4; font-size: 0.93rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer .f-contact {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.site-footer .f-contact img {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  flex: 0 0 auto;
}
.footer-about p { font-size: 0.93rem; margin-top: 12px; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 44px 0 54px; }
  .section { padding: 56px 0; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 22px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 26px; }
}
