/* ========================================================
   K.S.T. ENGINEERING AND CONSTRUCTION CO., LTD.
   Responsive & Modern Stylesheet (Mobile + Desktop Auto-adapt)
   ======================================================== */

:root {
  --primary: #0a3656;
  --primary-dark: #062237;
  --primary-light: #155d8f;
  --accent: #d90429;
  --accent-hover: #b80322;
  --accent-green: #198754;
  --accent-green-hover: #146c43;
  --text-main: #212529;
  --text-muted: #555e68;
  --bg-page: #eef2f6;
  --bg-card: #ffffff;
  --border-color: #dbe2ea;
  --border-radius: 8px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s ease-in-out;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Sarabun", "Segoe UI", Roboto, "Helvetica Neue", Tahoma, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography & Links */
a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
  text-decoration: none;
}

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

/* ========================================================
   LAYOUT CONTAINERS (Desktop Full Screen & Responsive Width)
   ======================================================== */
.site-wrapper {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  background-color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================================
   TOP CONTACT BAR (Desktop & Mobile)
   ======================================================== */
.top-bar {
  background-color: var(--primary-dark);
  color: #d8e2ec;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.top-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2eaf2;
}

.top-contact-item a {
  color: #ffffff;
  font-weight: 600;
}

.top-contact-item a:hover {
  color: #ffc107;
  text-decoration: underline;
}

.hotline-badge {
  background-color: var(--accent);
  color: #ffffff !important;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

/* ========================================================
   MAIN HEADER & NAVIGATION
   ======================================================== */
.main-header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo img {
  max-height: 52px;
  width: auto;
}

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

.logo-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item a {
  display: block;
  padding: 10px 14px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item.active a {
  background-color: rgba(10, 54, 86, 0.08);
  color: var(--primary-light);
}

.nav-cta {
  margin-left: 10px;
}

.btn-header-call {
  background-color: var(--accent);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(217, 4, 41, 0.3);
}

.btn-header-call:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  color: var(--primary);
}

/* Ticker bar */
.ticker-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 6px 15px;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

/* ========================================================
   HERO / BANNER SECTION
   ======================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(6, 34, 55, 0.92) 0%, rgba(15, 68, 105, 0.88) 100%), url('images/hed.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 55px 20px;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 14px 0;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: 17px;
  color: #e2eaf2;
  margin: 0 0 28px 0;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========================================================
   BUTTONS
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

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

.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(217, 4, 41, 0.35);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-green {
  background-color: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(25, 135, 84, 0.35);
}

.btn-green:hover {
  background-color: var(--accent-green-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 17px;
}

/* ========================================================
   SECTION HEADERS
   ======================================================== */
.section {
  padding: 45px 0;
}

.section-alt {
  background-color: #f7fafc;
}

.section-header {
  text-align: center;
  margin-bottom: 35px;
}

.section-tag {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 750px;
  margin: 0 auto;
}

/* ========================================================
   ABOUT US SECTION
   ======================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.about-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.about-card h3 {
  color: var(--primary);
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.feature-box {
  background: var(--bg-page);
  border-left: 4px solid var(--primary-light);
  padding: 12px 14px;
  border-radius: 4px;
}

.feature-box strong {
  display: block;
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.feature-box span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

/* ========================================================
   SERVICES / PRODUCTS GRID
   ======================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.service-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background-color: #212529;
}

.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img-wrap img {
  transform: scale(1.06);
}

.service-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 54, 86, 0.9);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.service-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.service-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.service-footer {
  margin-top: auto;
}

/* ========================================================
   CONTACT & HOTLINE PROMINENT SECTION
   ======================================================== */
.contact-section {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary-light) 100%);
}

.contact-card-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-highlight-box {
  background: #fff8f8;
  border: 2px dashed #f5b5b5;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.phone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0e0e0;
}

.phone-item:last-child {
  border-bottom: none;
}

.phone-info {
  display: flex;
  flex-direction: column;
}

.phone-label {
  font-size: 12px;
  color: #721c24;
  font-weight: bold;
  text-transform: uppercase;
}

.phone-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

.phone-number:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.contact-detail-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.contact-detail-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.contact-detail-item:last-child {
  border-bottom: none;
}

.contact-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.contact-text strong {
  display: block;
  color: var(--primary);
  font-size: 13px;
}

.contact-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* ========================================================
   GOOGLE MAPS SECTION (Embedded + Responsive)
   ======================================================== */
.map-section {
  background: #f8fafc;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.map-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-header {
  padding: 16px 20px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.map-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-iframe-container {
  position: relative;
  width: 100%;
  height: 380px;
  background-color: #eaeaea;
}

.map-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-footer-bar {
  padding: 14px 20px;
  background: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}

/* ========================================================
   FOOTER SECTION
   ======================================================== */
.site-footer {
  background-color: #17202a;
  color: #b0bec5;
  font-size: 13px;
  padding: 40px 0 25px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 35px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #b0bec5;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #8c9ba5;
}

/* ========================================================
   FLOATING BOTTOM ACTION BAR (MOBILE ONLY)
   ======================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  border-top: 1px solid var(--border-color);
  padding: 6px 8px;
}

.mobile-bottom-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-radius: 6px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
}

.mobile-action-btn .btn-icon {
  font-size: 19px;
  margin-bottom: 2px;
}

.mobile-action-btn.call-btn {
  background-color: var(--accent);
  color: #ffffff;
}

.mobile-action-btn.map-btn {
  background-color: var(--primary);
  color: #ffffff;
}

/* ========================================================
   LEGACY TABLE SUPPORT & RESPONSIVE RETROFIT
   Ensures old subpages (about.html, product.html, etc.)
   adapt nicely on mobile and desktop!
   ======================================================== */
table.first {
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  background-color: #ffffff !important;
}

table.first_2 {
  width: 100% !important;
}

td.hed {
  width: 100% !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Make tables scroll or stack if too wide */
@media (max-width: 768px) {
  table.w {
    display: block !important;
    width: 100% !important;
  }
  
  table.w > tbody > tr {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  table.w > tbody > tr > td {
    display: block !important;
    width: 100% !important;
  }
  
  td.f_left, td.f_right {
    display: none !important;
  }
  
  .hed_t span img[src*="log.gif"] {
    margin: 20px auto 0 auto !important;
    display: block !important;
    max-width: 85% !important;
    height: auto !important;
  }
}

/* ========================================================
   RESPONSIVE MEDIA QUERIES
   ======================================================== */

/* Large Desktop Displays (>= 1200px) */
@media (min-width: 1200px) {
  .site-wrapper {
    width: 96%;
    margin: 15px auto;
    border-radius: 8px;
    overflow: hidden;
  }
}

/* Tablets (<= 992px) */
@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero-title {
    font-size: 27px;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 60px; /* Space for mobile floating bottom bar */
  }
  
  .top-bar-inner {
    justify-content: center;
    text-align: center;
  }
  
  .top-bar-left, .top-bar-right {
    justify-content: center;
    gap: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    padding: 15px;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  
  .nav-item a {
    padding: 12px 16px;
    font-size: 15px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-cta {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .btn-header-call {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
  
  .hero-section {
    padding: 35px 15px;
  }
  
  .hero-title {
    font-size: 22px;
  }
  
  .hero-subtitle {
    font-size: 15px;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .phone-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .phone-item .btn {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .mobile-bottom-bar {
    display: block;
  }
  
  .map-header, .map-footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .map-footer-bar .btn {
    width: 100%;
  }
}

/* Small Mobile (<= 480px) */
@media (max-width: 480px) {
  .logo-title {
    font-size: 16px;
  }
  
  .logo-subtitle {
    font-size: 11px;
  }
  
  .contact-card {
    padding: 20px 15px;
  }
  
  .section {
    padding: 30px 0;
  }
  
  .section-title {
    font-size: 22px;
  }
}

/* Fixes for legacy subpages (about.html, product*.html, project.html) */
img[src*="spacer.gif"] {
  max-width: 1px !important;
}

@media (max-width: 768px) {
  img[src*="spacer.gif"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  table.first, table.first_2, table.w {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  td.hed {
    height: auto !important;
    padding: 15px 10px !important;
  }

  .hed_t span img[src*="log.gif"],
  .hed_t img[src*="log.gif"] {
    margin: 15px auto 10px auto !important;
    display: block !important;
    max-width: 90% !important;
    height: auto !important;
  }

  .menu_l {
    padding: 10px 5px !important;
    text-align: center !important;
  }

  .menu_l p a {
    display: inline-block !important;
    margin: 3px 4px !important;
    padding: 6px 12px !important;
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
  }

  td.w table {
    width: 100% !important;
    max-width: 100% !important;
  }

  td.w table img {
    max-width: 100% !important;
    height: auto !important;
  }
}



/* ========================================================
   UNIFIED SUBPAGE DESIGN SYSTEM COMPONENTS
   (About Us, Products, Projects, Sitemap, 404, Contacts)
   ======================================================== */

/* --- Page Banner & Hero for Subpages --- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 45px 20px 40px 20px;
  text-align: center;
  position: relative;
  border-bottom: 3px solid var(--accent);
}

.page-banner-title {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px 0;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.page-banner-subtitle {
  font-size: 16px;
  color: #d8e2ec;
  margin: 0 0 16px 0;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #b0c4de;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 18px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.breadcrumb a {
  color: #ffffff;
  font-weight: 600;
}

.breadcrumb a:hover {
  color: #ffc107;
  text-decoration: underline;
}

.breadcrumb-sep {
  opacity: 0.6;
}

.breadcrumb-current {
  color: #ffc107;
  font-weight: 600;
}

/* --- Subpage Product Navigation Pills --- */
.subpage-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 35px;
}

.subpage-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none !important;
}

.subpage-nav-link:hover {
  background: var(--bg-page);
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.subpage-nav-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(10, 54, 86, 0.25);
}

/* --- Prev / Next Navigation Controls --- */
.subpage-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.subpage-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.subpage-ctrl-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* --- Photo Gallery Grid & Cards --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 35px;
}

.gallery-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.gallery-img-wrap {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
  background-color: #1a2228;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 54, 86, 0.88);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(2px);
}

.gallery-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.gallery-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --- Stat Counter Summary Grid --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Project Table & Filters --- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  background: #ffffff;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--bg-page);
  border-color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.project-search {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  min-width: 240px;
  outline: none;
}

.project-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 54, 86, 0.15);
}

.project-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 30px;
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.project-table th {
  background-color: var(--primary);
  color: #ffffff;
  padding: 14px 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--primary-dark);
  white-space: nowrap;
}

.project-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.project-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.project-table tbody tr:hover {
  background-color: #eef5fc;
}

.badge-year {
  display: inline-block;
  background-color: var(--primary-light);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-client {
  font-weight: 700;
  color: var(--primary-dark);
}

.badge-place {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #495057;
  background: #edf2f7;
  padding: 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

/* --- Call to Action Banner Box --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  border-radius: var(--border-radius);
  padding: 38px 25px;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.cta-banner h3 {
  font-size: 24px;
  margin: 0 0 10px 0;
  color: #ffffff;
  font-weight: 800;
}

.cta-banner p {
  font-size: 15px;
  color: #e2eaf2;
  max-width: 700px;
  margin: 0 auto 22px auto;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- About Us Pillars / Values --- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.pillar-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-block;
}

.pillar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pillar-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --- Sitemap Component Grid --- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 35px;
}

.sitemap-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.sitemap-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.sitemap-card h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 10px;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list li {
  margin-bottom: 12px;
}

.sitemap-list a {
  font-weight: 600;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.sitemap-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.sitemap-desc {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.sitemap-sublist {
  list-style: none;
  padding-left: 18px;
  margin-top: 8px;
}

.sitemap-sublist li {
  margin-bottom: 6px;
}

.sitemap-sublist a {
  font-size: 13px;
  font-weight: normal;
  color: #495057;
}

/* --- 404 Error Page --- */
.error-wrapper {
  text-align: center;
  padding: 60px 20px;
  max-width: 650px;
  margin: 0 auto;
}

.error-badge {
  display: inline-block;
  background: rgba(217, 4, 41, 0.1);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 15px;
}

.error-code {
  font-size: 85px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 0 0 15px 0;
  letter-spacing: -2px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.error-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.error-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
  text-align: left;
}

.error-nav-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 6px;
  transition: var(--transition);
}

.error-nav-item:hover {
  border-color: var(--primary-light);
  background: #f8fafc;
}

.error-nav-item a {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.error-nav-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Responsive Adaptations for New Components --- */
@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid.grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sitemap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-banner {
    padding: 30px 15px;
  }
  .page-banner-title {
    font-size: 22px;
  }
  .page-banner-subtitle {
    font-size: 14px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid.grid-3 {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .pillar-grid {
    grid-template-columns: 1fr;
  }
  .sitemap-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .project-search {
    width: 100%;
    min-width: 0;
  }
  .subpage-controls {
    flex-direction: column;
  }
  .subpage-ctrl-btn {
    width: 100%;
    justify-content: center;
  }
  .error-nav-grid {
    grid-template-columns: 1fr;
  }
  .gallery-img-wrap {
    height: 220px;
  }
}

/* --- FAQ Section for Google Rich Snippets & Local Search --- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 950px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 22px 25px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.faq-question {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-answer {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
}
