/* =========================================================
   SMS ELECTRONIC SAFETY SERVICES — Stylesheet
   ========================================================= */

:root {
  --yellow: #f7b500;
  --yellow-dark: #e0a300;
  --ink: #1a1a1a;
  --ink-soft: #2b2b2b;
  --footer-bg: #1c1c1c;
  --text-body: #5c5c5c;
  --text-light: #ffffff;
  --green: #1f6f43;
  --green-dark: #17572f;
  --border-light: #ececec;
  --max-width: 1290px;
  --radius: 4px;
  --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Roboto', 'Segoe UI', Arial, sans-serif;
  --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.08);
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px; /* topbar + sticky nav height, kept in sync with --header-offset */
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: 1.6;
  background: #ffffff;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 44px;
  position: relative;
}

.section-pad {
  padding: 72px 0;
}

.bg-light {
  background: #fafafa;
}

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.85rem;
  padding: 9px 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.topbar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.topbar svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 500;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}


.header-logo {
  max-width: 160px;
}

.footer-logo {
  max-width: 200px;
}

.brand .logo-badge {
  width: 52px;
  height: 52px;
  background: var(--ink);
  clip-path: polygon(50% 0%, 100% 20%, 100% 65%, 50% 100%, 0% 65%, 0% 20%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-text {
  line-height: 1.15;
}

.brand-text .main {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.brand-text .sub {
  font-size: 0.68rem;
  color: var(--text-body);
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink);
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--yellow);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--yellow-dark);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Footer quick-links reuse .nav-link for scrollspy; give them their own hover/active color since the footer is dark */
.site-footer .nav-link {
  transition: color var(--transition);
}

.site-footer .nav-link:hover,
.site-footer .nav-link.active {
  color: var(--yellow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   HERO / CAROUSEL (Home)
   ========================================================= */
.anchor-section {
  scroll-margin-top: 108px;
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  max-height: 640px;
  overflow: hidden;
  background: #111;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-content h1 {
  color: var(--text-light);
  font-size: 2.6rem;
  max-width: 560px;
  margin-bottom: 26px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.btn-green {
  background: var(--green);
  color: #fff;
  width: fit-content;
}

.btn-green:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

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

.btn-yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background var(--transition);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

/* =========================================================
   SECTION BANNER (in-page section header, replaces separate page banners)
   ========================================================= */
.section-banner {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.6);
}

.section-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.section-banner-content h2 {
  color: var(--yellow);
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

/* =========================================================
   PAGE HEADER (legacy banner, kept for reference/reuse)
   ========================================================= */
.page-banner {
  position: relative;
  height: 300px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
}

.page-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.page-banner-content h1 {
  color: var(--yellow);
  font-size: 2.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.breadcrumb {
  color: #f2f2f2;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #f2f2f2;
  transition: color var(--transition);
}

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

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.service-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.service-card .img-wrap {
  height: 220px;
  overflow: hidden;
  background: #eee;
}

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

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

.service-card .label {
  background: var(--yellow);
  color: var(--ink);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 10px;
}

/* =========================================================
   PROJECT CARDS
   ========================================================= */
.project-card {
  background: #fff;
}

.project-card .img-wrap {
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.project-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .img-wrap img {
  transform: scale(1.05);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
  min-height: 52px;
}

/* =========================================================
   CLIENTS STRIP
   ========================================================= */
.clients-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.client-card {
  text-align: center;
}

.client-card .logo-box {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin-bottom: 16px;
}

.client-card .logo-box img {
  max-height: 60px;
  width: auto;
  margin: 0 auto;
  filter: grayscale(20%);
}

.client-card .label {
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 3px;
}

/* =========================================================
   ABOUT / CONTENT PAGES
   ========================================================= */
.content-block h2 {
  font-size: 1.9rem;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.content-block p {
  margin-bottom: 18px;
  font-size: 0.98rem;
}

.content-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 30px;
  margin-bottom: 60px;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 420px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.office-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
}

.office-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: var(--ink);
}

.office-card p {
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: var(--text-body);
}

.office-card a {
  color: var(--green);
  font-weight: 600;
}

.office-card a:hover {
  text-decoration: underline;
}

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

.contact-form {
  max-width: 900px;
}

.contact-form h2 {
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

input,
textarea,
select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  border: 1px solid #dcdcdc;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #bdbdbd;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(247, 181, 0, 0.25);
}

.contact-form .btn {
  border: none;
}

/* =========================================================
   GENERIC PLACEHOLDER PAGE SECTIONS (Solutions/Services/Welfare)
   ========================================================= */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.feature-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-item h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.9rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--footer-bg);
  color: #cfcfcf;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand .logo-badge {
  width: 56px;
  height: 56px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 100% 20%, 100% 65%, 50% 100%, 0% 65%, 0% 20%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  flex-shrink: 0;
}

.footer-brand .main {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
}

.footer-brand .sub {
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: #a5a5a5;
  font-weight: 600;
}

.site-footer h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 22px;
}

.site-footer p,
.site-footer a {
  font-size: 0.92rem;
  color: #b8b8b8;
  margin-bottom: 12px;
  display: block;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--yellow);
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-row a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2c2c2c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.social-row svg {
  width: 15px;
  height: 15px;
  fill: #cfcfcf;
}

.social-row a:hover {
  background: var(--yellow);
}

.social-row a:hover svg {
  fill: var(--ink);
}

.footer-bottom {
  border-top: 1px solid #303030;
  text-align: center;
  padding: 20px 0;
  font-size: 0.82rem;
  color: #8c8c8c;
  position: relative;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 400;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .office-grid {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 24px 26px;
    gap: 4px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .clients-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .hero {
    height: 62vh;
    min-height: 380px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-banner h1 {
    font-size: 1.7rem;
  }
}
