/* ==========================================================================
   HRPM GUARD - DESIGN SYSTEM & STYLESHEET
   Based on PetroLink structure converted to Royal Blue + Crisp White
   ========================================================================== */

:root {
  --primary: #0B5ED7;
  --primary-hover: #094bb0;
  --primary-dark: #0A2D6B;
  --primary-darker: #061B40;
  --primary-light: #E8F1FF;
  --primary-tint: #F2F7FF;
  
  --accent: #F5B400;
  --accent-hover: #d99f00;
  --success: #198754;
  --danger: #DC3545;
  
  --text: #1B2433;
  --text-muted: #5B6678;
  --text-light: #8E9BAE;
  
  --bg-white: #FFFFFF;
  --bg-subtle: #F6F9FC;
  --bg-card: #FFFFFF;
  --line: #DCE3EE;
  --line-light: #EDF2F9;
  
  --font-heading: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(10, 45, 107, 0.04);
  --shadow-md: 0 6px 18px rgba(10, 45, 107, 0.08);
  --shadow-lg: 0 16px 36px rgba(10, 45, 107, 0.12);
  --shadow-xl: 0 24px 50px rgba(10, 45, 107, 0.16);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
  padding-bottom: 70px; /* Space for mobile sticky bottom bar */
}

main {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.3;
}

/* All Hero / Page Header / Dark Banner Titles MUST be crisp pure white */
.article-header h1,
.page-header h1,
.page-header-dark h1,
div[style*="linear-gradient"] h1,
div[style*="background: #0"] h1,
div[style*="background:#0"] h1,
.hero-dark h1,
.page-header-title {
  color: #FFFFFF !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.section {
  padding: 80px 0;
}

@media (max-width: 767px) {
  .section {
    padding: 42px 0;
  }
}

.section-alt {
  background-color: var(--bg-subtle);
}

.section-tint {
  background-color: var(--primary-tint);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.section-header {
  margin-bottom: 50px;
}

@media (max-width: 767px) {
  .section-header {
    margin-bottom: 28px;
  }
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

@media (max-width: 767px) {
  .section-title {
    font-size: 1.55rem;
    line-height: 1.35;
    margin-bottom: 10px;
  }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767px) {
  .section-subtitle {
    font-size: 0.925rem;
    line-height: 1.6;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .btn {
    white-space: normal;
    word-break: break-word;
    padding: 12px 16px;
  }
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11, 94, 215, 0.3);
}

.btn-navy {
  background-color: var(--primary-dark);
  color: #FFFFFF;
}

.btn-navy:hover {
  background-color: var(--primary-darker);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 45, 107, 0.3);
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

.btn-outline-white {
  background-color: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.btn-outline-white:hover {
  background-color: #FFFFFF;
  color: var(--primary-dark);
}

.btn-line {
  background-color: #06C755;
  color: #FFFFFF;
}

.btn-line:hover {
  background-color: #05b04c;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ==========================================================================
   TOP BAR & NAVIGATION (Matches PetroLink structure)
   ========================================================================== */

/* ==========================================================================
   TOP BAR (Unified Responsive)
   ========================================================================== */

.topbar {
  background: var(--primary-darker);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.topbar-item a {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}

.topbar-item a:hover {
  text-decoration: underline;
}

.topbar-login-link {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.topbar-login-link:hover {
  color: #FFFFFF;
}

.topbar-app-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.topbar-app-link:hover {
  color: #FFFFFF;
}

/* Mobile Responsive Adjustments (< 768px) */
@media (max-width: 767px) {
  .topbar {
    display: block;
    background: #061A3A;
    padding: 6px 0;
    font-size: 0.775rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .topbar .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar-left {
    gap: 0;
  }

  .topbar-phone {
    font-size: 0.775rem;
    font-weight: 700;
  }

  .topbar-phone svg {
    width: 12px;
    height: 12px;
    color: #F5B400;
    flex-shrink: 0;
  }

  .topbar-label-desktop,
  .topbar-phone-2,
  .topbar-line,
  .topbar-facebook,
  .topbar-app-link {
    display: none !important;
  }

  .topbar-right {
    gap: 0;
  }

  .topbar-login-link {
    font-size: 0.775rem;
    color: #F5B400;
    font-weight: 700;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(245, 180, 0, 0.12);
  }

  .topbar-login-link svg {
    width: 12px;
    height: 12px;
  }

  .brand-sub-desktop {
    display: none !important;
  }
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

@media (max-width: 991px) {
  .navbar .container {
    height: 58px;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(11, 94, 215, 0.25);
}

@media (max-width: 991px) {
  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .brand-icon svg {
    width: 22px;
    height: 22px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 32px;
}

@media (min-width: 992px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-quote-btn {
  background-color: var(--primary-dark);
  color: #FFFFFF;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .nav-quote-btn {
    display: inline-flex;
  }
}

.nav-quote-btn:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF;
}

.mobile-toggle,
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.search-toggle:hover,
.mobile-toggle:hover,
.search-toggle[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
}

@media (min-width: 992px) {
  .mobile-toggle {
    display: none;
  }
}

/* Off-canvas Mobile Menu */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100%;
  background: #FFFFFF;
  z-index: 2000;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 45, 107, 0.5);
  z-index: 1999;
  display: none;
  backdrop-filter: blur(2px);
}

.mobile-nav-backdrop.active {
  display: block;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.drawer-link {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
}

.drawer-link:hover, .drawer-link.active {
  color: var(--primary);
}

/* ==========================================================================
   HERO SECTION (Matches PetroLink Hero Structure)
   ========================================================================== */

.hero-section {
  position: relative;
  background: linear-gradient(135deg, #F0F5FD 0%, #FFFFFF 65%, #EBF3FF 100%);
  padding: 28px 0 75px;
  overflow: hidden;
}

@media (max-width: 991px) {
  .hero-section {
    padding: 12px 0 35px; /* Snug top spacing directly touching navbar */
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 991px) {
  .hero-grid {
    gap: 16px;
  }
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 45px;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-top: 0;
  margin-bottom: 16px;
  border: 1px solid rgba(11, 94, 215, 0.15);
}

@media (max-width: 991px) {
  .hero-badge {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 0.75rem;
    padding: 4px 10px;
    gap: 5px;
  }
  .hero-badge svg {
    width: 14px;
    height: 14px;
  }
}

.hero-title {
  color: var(--primary-dark);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.hero-title-main {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-dark);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-title-sub {
  display: block;
  font-size: 2.0rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  letter-spacing: -0.3px;
}

@media (max-width: 991px) {
  .hero-title-main {
    font-size: 1.85rem;
    line-height: 1.25;
  }
  .hero-title-sub {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-top: 4px;
  }
}

@media (max-width: 767px) {
  .hero-title {
    margin-bottom: 10px;
  }
  .hero-title-main {
    font-size: 1.38rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
  }
  .hero-title-sub {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary);
  }
}

.hero-title .highlight {
  color: var(--primary);
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 580px;
}

@media (max-width: 767px) {
  .hero-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 14px;
    color: #4A5568;
  }
}

/* Hero Bullets (Clean checkmarks on mobile) */
.hero-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.hero-bullet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.hero-bullet .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: #E8F7ED;
  color: #198754;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .hero-bullets {
    gap: 6px;
    margin-bottom: 16px;
  }
  .hero-bullet {
    font-size: 0.825rem;
    line-height: 1.35;
  }
  .hero-bullet .check-icon {
    width: 17px;
    height: 17px;
    font-size: 0.7rem;
  }
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

@media (max-width: 767px) {
  .hero-cta-group {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  .hero-cta-group .btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    justify-content: center;
    border-radius: 10px;
  }
  .hero-cta-group .btn-outline-primary {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 4px 12px;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.hero-slider-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1rem;
}

@media (max-width: 767px) {
  .hero-slider-nav {
    display: none;
  }
}

.slide-num {
  cursor: pointer;
  padding: 4px 8px;
  transition: var(--transition);
}

.slide-num.active {
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  padding: 2px 10px;
}

/* Hero Media Display (Prominent Mobile App + Dashboard Banner) */
.hero-media-wrapper {
  position: relative;
}

@media (max-width: 991px) {
  .hero-media-wrapper {
    margin-top: 10px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .hero-banner-card {
    display: none;
  }
  .accent-corner {
    display: none;
  }
}

.hero-banner-card {
  position: relative;
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 4px solid #FFFFFF;
}

.hero-banner-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Floating App Mockup (Stand Out Prominently!) */
.floating-mobile-app {
  position: absolute;
  right: -25px;
  bottom: -45px;
  width: 250px;
  background: #1E293B;
  border-radius: 32px;
  padding: 4px;
  box-shadow: 0 16px 40px rgba(10, 45, 107, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
  border: 2px solid #334155;
  animation: floatApp 4s ease-in-out infinite alternate;
  z-index: 10;
  overflow: hidden;
}

@media (max-width: 991px) {
  .floating-mobile-app {
    position: static;
    width: 235px;
    margin: 0 auto;
    animation: none;
    transform: none !important;
    background: #1E293B;
    border-radius: 32px;
    padding: 4px;
    box-shadow: 0 14px 35px rgba(10, 45, 107, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    border: 2px solid #334155;
    overflow: hidden;
  }
}

@media (min-width: 992px) {
  .floating-mobile-app {
    width: 250px;
    right: -25px;
    bottom: -50px;
  }
}

@keyframes floatApp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.floating-mobile-app img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
}

.mobile-mockup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: #FFFFFF;
  color: var(--primary-dark);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 10px rgba(10, 45, 107, 0.1);
  border: 1px solid rgba(11, 94, 215, 0.15);
}

@media (min-width: 992px) {
  .mobile-mockup-badge {
    display: none;
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.accent-corner {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  border-radius: 8px;
  z-index: 0;
}

.accent-corner.corner-tr {
  top: -15px;
  right: -15px;
  background-color: var(--primary-light);
}

.accent-corner.corner-bl {
  bottom: -15px;
  left: -15px;
  background-color: var(--primary);
}

/* ==========================================================================
   BLUE CONTACT RIBBON (Replaces Red Ribbon in PetroLink)
   ========================================================================== */

.contact-ribbon {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  padding: 24px 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 5;
}

.ribbon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

@media (min-width: 768px) {
  .ribbon-grid {
    grid-template-columns: 1.2fr 1fr auto;
  }
}

.ribbon-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ribbon-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

.ribbon-text .label {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.ribbon-text .value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.ribbon-text .value a {
  color: #FFFFFF;
}

.ribbon-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   ABOUT / 4 PILLARS & STATS (Matches PetroLink 2nd Section)
   ========================================================================== */

.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .about-intro-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.about-media-box {
  position: relative;
}

.about-main-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid #FFFFFF;
  position: relative;
  background-color: var(--primary-tint);
}

.about-main-image img {
  width: 100%;
  height: auto;
}

.about-video-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 16px 24px;
  border-top-right-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.about-video-badge:hover {
  background: var(--primary);
}

.play-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

/* Progress / Metric Bars */
.metrics-group {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.metric-bar-item {
  width: 100%;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
}

.metric-track {
  height: 8px;
  background-color: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 4 Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 576px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .pillars-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pillar-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.pillar-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   APP SHOWCASE SECTION (Make Mobile App Ultra Prominent)
   ========================================================================== */

.app-spotlight-section {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, #FFFFFF 100%);
  padding: 90px 0;
}

.app-spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

@media (min-width: 992px) {
  .app-spotlight-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.phone-mockup-container {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-frame {
  width: 300px;
  max-width: 100%;
  background: #1E293B;
  border-radius: 36px;
  padding: 4px;
  box-shadow: 0 16px 40px rgba(10, 45, 107, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 2px solid #334155;
  position: relative;
  overflow: hidden;
}

.phone-frame img {
  border-radius: 32px;
  width: 100%;
  height: auto;
  display: block;
}

.interactive-callout {
  position: absolute;
  background: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  animation: pulseBadge 3s infinite ease-in-out;
}

.interactive-callout.c1 {
  top: 15%;
  right: -30px;
}

.interactive-callout.c2 {
  bottom: 25%;
  left: -30px;
  border-left-color: var(--success);
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.app-feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.app-feature-num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-feature-text h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.app-feature-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   FEATURES 10 CARDS GRID
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.feature-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.feature-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1;
}

.feature-card:hover .feature-num {
  color: var(--primary);
}

.feature-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex-grow: 1;
}

/* ==========================================================================
   COMPARISON TABLE (Before vs After HRPM Guard)
   ========================================================================== */

.comparison-table-wrapper {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 36px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.comparison-table th.th-feature {
  background: #F8FAFC;
  color: var(--primary-dark);
  width: 28%;
}

.comparison-table th.th-before {
  background: #FFF5F5;
  color: #991B1B;
  width: 36%;
}

.comparison-table th.th-after {
  background: #F0FDF4;
  color: #065F46;
  width: 36%;
}

.th-badge-before {
  display: inline-block;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-right: 6px;
}

.th-badge-after {
  display: inline-block;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-right: 6px;
}

.comparison-table td.td-feature {
  font-weight: 600;
  color: var(--primary-dark);
}

.feature-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.comparison-table td.td-before {
  color: #555555;
  background: #FFFBFB;
}

.comparison-table td.td-after {
  color: var(--primary-dark);
  font-weight: 600;
  background: #F7FEFA;
}

.m-card-badge {
  display: none;
}

/* Mobile Responsive Transformation (< 768px): Card Stack Pattern */
@media (max-width: 767px) {
  .comparison-table-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-top: 20px;
    overflow: visible;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table thead {
    display: none; /* Hide squeezed 3-column table header on mobile */
  }

  .comparison-table tr {
    background: #FFFFFF;
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(10, 45, 107, 0.06);
  }

  .comparison-table td.td-feature {
    padding: 0 0 10px 0;
    border-bottom: 1px solid var(--line-light);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
  }

  .comparison-table td.td-before {
    background: #FFF5F5;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #FED7D7;
    border-left: 4px solid #E53E3E;
  }

  .comparison-table td.td-after {
    background: #F0FDF4;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #BBF7D0;
    border-left: 4px solid #10B981;
  }

  .m-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.775rem;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
  }

  .m-card-badge.before-badge {
    color: #DC2626;
  }

  .m-card-badge.after-badge {
    color: #16A34A;
  }

  .td-content {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #2D3748;
  }

  .comparison-table td.td-after .td-content {
    color: #064E3B;
    font-weight: 600;
  }
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-dark);
  background: transparent;
  width: 100%;
  border: none;
  text-align: left;
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 24px;
}

/* ==========================================================================
   LEAD CAPTURE FORM / DEMO REQUEST
   ========================================================================== */

.lead-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
  color: #FFFFFF;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

@media (max-width: 991px) {
  .lead-section {
    padding: 40px 0;
  }
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.lead-grid > div {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 991px) {
  .lead-grid {
    gap: 28px;
  }
}

@media (min-width: 992px) {
  .lead-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 50px;
  }
}

.lead-info-title {
  font-size: 2.3rem;
  color: #FFFFFF;
  margin-bottom: 18px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.lead-title-line {
  display: block;
}

@media (max-width: 767px) {
  .lead-info-title {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 12px;
  }
}

.lead-info-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
  line-height: 1.65;
}

@media (max-width: 767px) {
  .lead-info-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 18px;
  }
}

.lead-benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

@media (max-width: 767px) {
  .lead-benefit-list {
    gap: 10px;
    margin-bottom: 22px;
  }
}

.lead-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  color: #FFFFFF;
  line-height: 1.5;
}

.lead-benefit-item svg {
  flex-shrink: 0;
  margin-top: 3px;
}

@media (max-width: 767px) {
  .lead-benefit-item {
    font-size: 0.88rem;
  }
}

.lead-quick-contact {
  padding-top: 5px;
}

.lead-quick-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 6px;
}

.lead-quick-phones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.lead-quick-phones a {
  color: #FFFFFF;
}

.lead-quick-phones a:hover {
  color: var(--accent);
}

.lead-phone-sep {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

@media (max-width: 767px) {
  .lead-quick-phones {
    font-size: 1.08rem;
    gap: 6px;
  }
}

.lead-form-card {
  background: #FFFFFF;
  color: var(--text);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  .lead-form-card {
    padding: 20px 14px;
    border-radius: 16px;
  }
}

.lead-form-title {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
  word-break: break-word;
}

@media (max-width: 767px) {
  .lead-form-title {
    font-size: 1.25rem;
    line-height: 1.35;
  }
}

.lead-form-subtitle {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.55;
}

@media (max-width: 767px) {
  .lead-form-subtitle {
    font-size: 0.825rem;
    margin-bottom: 16px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 576px) {
  .form-row.two-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-label .req {
  color: var(--danger);
}

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

select.form-control {
  max-width: 100%;
  min-width: 0;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  min-width: 0;
  max-width: 100%;
}

.checkbox-group input {
  margin-top: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  flex: 1;
}

.lead-submit-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(11, 94, 215, 0.35);
}

@media (max-width: 767px) {
  .lead-submit-btn {
    font-size: 0.95rem;
    padding: 13px 12px;
  }
}

/* ==========================================================================
   FOOTER (E-E-A-T Legal Entity & High Trust)
   ========================================================================== */

.site-footer {
  background-color: var(--primary-darker);
  color: rgba(255, 255, 255, 0.75);
  padding: 80px 0 30px;
  font-size: 0.925rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background-color: var(--primary);
}

.footer-about p {
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-entity-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-entity-badge strong {
  color: #FFFFFF;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: #FFFFFF;
  padding-left: 6px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-contact-item .icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal-links a:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   STICKY MOBILE BOTTOM BAR (High Conversion Mobile Element)
   ========================================================================== */

@media (max-width: 991px) {
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
}

.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  box-shadow: 0 -4px 16px rgba(10, 45, 107, 0.12);
  display: flex;
  z-index: 1000;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 992px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.m-bar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  font-family: var(--font-heading);
  font-size: 0.775rem;
  font-weight: 600;
  gap: 4px;
  min-height: 60px;
}

.m-bar-btn.call {
  color: #FFFFFF;
  background: #EA580C;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.m-bar-btn.call:hover,
.m-bar-btn.call:active {
  background: #C2410C;
  color: #FFFFFF;
}

.m-bar-btn.line {
  color: #FFFFFF;
  background: #06C755;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.m-bar-btn.line:hover,
.m-bar-btn.line:active {
  background: #05A847;
  color: #FFFFFF;
}

.m-bar-btn.demo {
  color: #FFFFFF;
  background: var(--primary);
  flex: 1.3;
}

.m-bar-btn.demo:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
}

/* ==========================================================================
   Latest Articles (Home) — 3 บทความล่าสุดแบบกล่อง
   ========================================================================== */
.latest-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 991px) {
  .latest-articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .latest-articles-grid { grid-template-columns: 1fr; gap: 20px; }
}
.latest-article-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.latest-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.latest-article-thumb {
  display: block;
  aspect-ratio: 40 / 21;
  background: #E2E8F0;
  overflow: hidden;
}
.latest-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.latest-article-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #0A2D6B 0%, #0B5ED7 100%);
  color: #FFFFFF;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}
.latest-article-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.latest-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.latest-article-cat {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.latest-article-title {
  font-family: 'Prompt', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 10px;
}
.latest-article-title a {
  color: var(--text);
  text-decoration: none;
}
.latest-article-title a:hover { color: var(--primary); }
.latest-article-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest-article-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ==========================================================================
   Blog search & pagination
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.blog-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 28px;
}
.blog-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: #FFFFFF;
}
.blog-search input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.blog-search button {
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #FFFFFF;
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  cursor: pointer;
}
.blog-search-result {
  text-align: center;
  color: var(--text-muted);
  margin: -12px 0 24px;
}
.blog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}
.blog-pagination a,
.blog-pagination span {
  min-width: 42px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}
.blog-pagination span[aria-current] {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Header: ปุ่มค้นหา + เมนู และแผงค้นหาทั้งเว็บ
   ========================================================================== */
@media (max-width: 991px) {
  .nav-actions { gap: 8px; }
}
@media (max-width: 400px) {
  .mobile-toggle,
  .search-toggle { padding: 0 9px; font-size: 0.9rem; gap: 4px; }
  .nav-actions { gap: 6px; }
}
/* ปุ่มค้นหาแสดงเฉพาะไอคอนแว่นขยาย (ชื่อปุ่มสำหรับ screen reader อยู่ใน aria-label) */
.search-toggle { width: 44px; padding: 0; }
.site-search {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 14px 0;
  z-index: 60;
}
.site-search[hidden] { display: none; }
.site-search .container { display: block; }
.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.site-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.site-search-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
}
.site-search-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
}
.site-search-submit {
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
}
.site-search-close {
  width: 40px;
  height: 48px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
@media (max-width: 480px) {
  .site-search-submit { padding: 0 14px; }
  .site-search-close { width: 32px; }
}

/* Search results page */
.search-page-header {
  background: linear-gradient(135deg, #071C43 0%, #0A2D6B 60%, #0B5ED7 100%);
  padding: 50px 0 36px;
  text-align: center;
}
.search-page-header h1 {
  color: #FFFFFF !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 2rem;
  margin-bottom: 20px;
}
.search-page-form { margin-bottom: 0; }
.search-results-section {
  background: #F8FAFC;
  padding: 36px 0 80px;
}
.search-results-container { max-width: 820px; }
.search-summary {
  color: var(--text-muted);
  margin-bottom: 20px;
}
.search-group-title {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin: 28px 0 12px;
}
.search-result {
  display: block;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-result:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.search-result-url {
  display: block;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 4px;
  word-break: break-all;
}
.search-result-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.search-result-snippet {
  display: block;
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.search-result mark {
  background: #FEF3C7;
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.search-empty {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 24px;
}

/* Desktop nav: ไม่ให้เมนูตัดบรรทัดเมื่อมีปุ่มค้นหาเพิ่ม */
.nav-link,
.nav-quote-btn { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1279px) {
  .nav-menu { gap: 18px; }
  .nav-link { font-size: 0.95rem; }
  .nav-quote-btn { padding: 11px 16px; }
  .brand-sub-desktop { display: none; }
  .navbar .container { gap: 16px; }
}
@media (min-width: 992px) and (max-width: 1099px) {
  .nav-menu { gap: 14px; }
  .nav-link { font-size: 0.9rem; }
  .nav-quote-btn { font-size: 0.9rem; padding: 10px 12px; }
}

/* ==========================================================================
   Facebook buttons
   ========================================================================== */
.topbar-facebook svg { color: #FFFFFF; }
.btn-facebook {
  background: #1877F2;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-facebook:hover {
  background: #0E5FCC;
  color: #FFFFFF;
}
.footer-fb-icon {
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
