/* ===========================
   SIAM Wireless — styles.css
   =========================== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary:      #1a2d4a;
  --color-primary-mid:  #5B8DC9;
  --color-primary-light:#7aaade;
  --color-accent:       #E85A4A;
  --color-accent-dark:  #c94535;
  --color-line-green:   #06C755;
  --color-bg:           #ffffff;
  --color-bg-light:     #f7f5f5;
  --color-bg-dark:      #111d2e;
  --color-text:         #1a202c;
  --color-text-muted:   #5a6575;
  --color-border:       #e4dedd;
  --color-white:        #ffffff;

  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.18);
  --radius:     12px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

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

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

ul { list-style: none; }

/* --- Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section spacing --- */
.section { padding: 96px 0; }

/* --- Section header --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-sub { max-width: 600px; margin: 16px auto 0; color: var(--color-text-muted); font-size: 1.05rem; }

/* --- Section eyebrow --- */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-eyebrow.light { color: rgba(255,255,255,0.7); }

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-primary);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 51, 41, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
}
.btn-line {
  background: var(--color-line-green);
  color: var(--color-white);
  border-color: var(--color-line-green);
}
.btn-line:hover {
  background: #05a847;
  border-color: #05a847;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.35);
}
.btn-lg { padding: 16px 36px; font-size: 0.95rem; }


/* ===========================
   NAVIGATION
   =========================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 8px 0;
  transition: all var(--transition);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  padding: 6px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}
.site-header.scrolled .nav-links li a {
  color: var(--color-primary);
}
.site-header.scrolled .nav-links li a:hover {
  background: rgba(91, 141, 201, 0.1);
  color: var(--color-primary-mid);
}
.site-header.scrolled .nav-link-highlight {
  color: var(--color-accent) !important;
  border-color: rgba(232, 90, 74, 0.3);
}
.site-header.scrolled .nav-contact a {
  color: var(--color-primary);
}
.site-header.scrolled .nav-toggle span {
  background: var(--color-primary);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo img { height: 100px; width: auto; display: block; }
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: 0.04em;
}
.logo-text strong { font-weight: 800; color: var(--color-accent); }
.footer-logo-img {
  height: 100px;
  width: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: 0;
  opacity: 1;
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links li a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all var(--transition);
}
.nav-links li a:hover { color: var(--color-white); background: rgba(255,255,255,0.1); }
.nav-link-highlight {
  color: var(--color-accent) !important;
  border: 1px solid rgba(230, 51, 41, 0.4);
}
.nav-link-highlight:hover { background: rgba(230, 51, 41, 0.15) !important; }



.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 31, 66, 0.88) 0%, rgba(15, 45, 94, 0.75) 60%, rgba(26, 74, 154, 0.6) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  text-align: center;
  color: var(--color-white);
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
}
.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 24px;
}

/* --- Rotating Text --- */
.rotate-wrap {
  display: inline-block;
  position: relative;
  text-align: left;
  vertical-align: bottom;
  overflow: hidden;
  height: 1.25em; /* Match h1 line-height effectively */
  min-width: 4ch; /* Reserve space to prevent layout jump if possible */
}

/* Individual word */
.rotate-item {
  display: block;
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.65s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
  color: var(--color-accent); /* Make rotating words stand out slightly */
}

.rotate-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Position for words waiting to come up */
.rotate-item.next {
  opacity: 0;
  transform: translateY(100%);
}

/* Position for words exiting */
.rotate-item.prev {
  opacity: 0;
  transform: translateY(-100%);
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-content .btn { margin: 8px; }


/* ===========================
   ABOUT SECTION
   =========================== */
.about { background: var(--color-bg-light); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.about-content h2 { margin-bottom: 20px; }
.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.about-content p strong { color: var(--color-primary); }
.about-content .btn { margin-top: 8px; }


/* ===========================
   SERVICES SECTION
   =========================== */
.services { background: var(--color-bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}
.service-icon {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: transparent; /* Ensure no background color interferes */
}
.service-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply; /* Removes white background from JPG icons */
}
.service-card h3 { margin-bottom: 12px; font-size: 1.05rem; }
.service-card p { color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.65; }

.services-vendors {
  margin-top: 56px;
  text-align: center;
}
.vendors-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.vendor-logos { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.vendor-tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  background: var(--color-bg-light);
  border: 2px solid var(--color-border);
  padding: 10px 24px;
  border-radius: 50px;
  letter-spacing: 0.05em;
}


/* ===========================
   CONSULTANT SECTION
   =========================== */
.consultant {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-dark);
  color: var(--color-white);
}
.consultant-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.consultant-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.15;
}
.consultant-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 31, 66, 0.95) 40%, rgba(15, 45, 94, 0.85) 100%);
  z-index: 1;
}
.consultant .container { position: relative; z-index: 2; }
.consultant-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: center;
}
.consultant-photo img {
  border-radius: var(--radius);
  box-shadow: 0 12px 50px rgba(0,0,0,0.4);
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: top;
}

.consultant-content h2 {
  color: var(--color-white);
  margin-bottom: 20px;
}
.cwne-label {
  font-size: 1.4rem;
  color: var(--color-accent);
  font-weight: 700;
}
.consultant-content > p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.consultant-content > p strong { color: var(--color-white); }
.consultant-credentials {
  list-style: none;
  margin-bottom: 32px;
}
.consultant-credentials li {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.consultant-credentials li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}
.credential-badges {
  display: flex;
  gap: 16px;
}
.badge {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border: none;
}


/* ===========================
   CLIENTS MARQUEE
   =========================== */
.clients { background: var(--color-bg-light); }
.clients .section-header { padding-bottom: 0; }

/* Outer wrapper — clips overflow and applies edge fade */
.marquee-outer {
  overflow: hidden;
  width: 100%;
  margin-top: 40px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* The scrolling strip */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

.marquee-outer:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track-reverse {
  animation: marquee-scroll-reverse 35s linear infinite;
}

@keyframes marquee-scroll-reverse {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Individual logo card */
.marquee-item {
  flex-shrink: 0;
  width: 160px;
  height: 80px;
  margin: 0 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  transition: all var(--transition);
}

.partner-logo-item {
  width: 250px;
  height: 125px;
  border: none !important;
  background: transparent !important;
}

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

.marquee-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* ===========================
   PARTNERS SECTION
   =========================== */
.partners { background: var(--color-bg); padding-top: 0; padding-bottom: 96px; }
.partners .section-header { margin-bottom: 16px; }
.partners .marquee-outer { margin-top: 0; }


/* ===========================
   CONTACT CTA SECTION
   =========================== */
.contact-cta { background: var(--color-primary); }
.cta-card {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: var(--color-white);
}
.cta-card h2 { color: var(--color-white); margin-bottom: 20px; }
.cta-card > p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 40px;
  line-height: 1.7;
}
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cta-phone {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}
.cta-phone a { color: rgba(255,255,255,0.85); font-weight: 600; }
.cta-phone a:hover { color: var(--color-white); }


/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 280px;
}
.footer-address {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 0;
}
.site-footer h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-nav ul, .footer-contact ul { display: flex; flex-direction: column; gap: 14px; }
.footer-contact li { color: rgba(255,255,255,0.5); font-size: 0.88rem; }
.footer-nav a, .footer-contact a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--color-white); }
.footer-bottom {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}


/* ===========================
   SCROLL ANIMATIONS
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }


/* ===========================
   RESPONSIVE
   =========================== */

/* --- Tablet landscape --- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .consultant-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .marquee-item { width: 140px; height: 72px; }
  .partner-logo-item { width: 218px; height: 112px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .nav-logo img { height: 80px; }
  .site-header.scrolled .nav-logo img { height: 60px; }
}

/* --- Tablet portrait --- */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }

  /* Navigation — hamburger menu */
  .nav-contact { display: none; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 31, 66, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { font-size: 1.2rem; padding: 12px 24px; }
  .nav-toggle { display: flex; z-index: 1001; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .nav-logo img { height: 72px; }
  .site-header.scrolled .nav-logo img { height: 52px; }

  /* Hero */
  .hero { min-height: 70vh; }
  .hero-content { padding-top: 100px; }
  .hero-sub { font-size: 1rem; max-width: 100%; }
  .hero-content .btn { margin: 6px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image img { height: 280px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card { padding: 28px 20px; }
  .service-icon { width: 80px; height: 80px; }

  /* Consultant */
  .consultant-grid { grid-template-columns: 1fr; gap: 32px; }
  .consultant-photo img { height: 350px; }
  .consultant-content { text-align: left; }
  .credential-badges { flex-wrap: wrap; gap: 12px; }
  .badge { width: 104px; height: 104px; }

  /* Clients carousel */
  .marquee-item { width: 130px; height: 68px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 0.9rem; }

  /* Partners */
  .partner-logo-item { width: 203px; height: 107px; }

  /* CTA */
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-card > p { font-size: 0.95rem; }
  .btn-lg { padding: 14px 28px; font-size: 0.88rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-logo-img { height: 80px; }
  .footer-brand p { max-width: 100%; }
}

/* --- Mobile --- */
@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .section-header { margin-bottom: 40px; }
  .section-eyebrow { font-size: 1.1rem; }

  /* Typography */
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.05rem; }
  .section-sub { font-size: 0.92rem; }

  /* Navigation */
  .nav-logo img { height: 60px; }
  .site-header.scrolled .nav-logo img { height: 44px; }
  .nav-container { padding: 0 16px; gap: 16px; }

  /* Hero */
  .hero { min-height: 60vh; }
  .hero-content { padding-top: 80px; padding-bottom: 40px; }
  .hero-eyebrow { font-size: 0.6rem; padding: 4px 12px; }
  .hero-sub { font-size: 0.9rem; line-height: 1.5; margin-bottom: 28px; }
  .hero-content .btn {
    width: 100%;
    margin: 5px 0;
    justify-content: center;
  }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .service-card { padding: 24px 18px; }
  .service-icon { width: 72px; height: 72px; }

  /* Consultant */
  .consultant-photo img { height: 280px; }
  .badge { width: 94px; height: 94px; }
  .cwne-label { font-size: 1.1rem; }

  /* Clients */
  .marquee-item { width: 120px; height: 64px; padding: 8px 12px; }
  .client-logo-box { height: 64px; padding: 8px; }

  /* Partners */
  .partner-logo-item { width: 187px; height: 100px; }

  /* CTA */
  .cta-card > p { font-size: 0.9rem; margin-bottom: 28px; }

  /* Footer */
  .footer-logo-img { height: 72px; }
  .footer-address { font-size: 0.82rem; }
  .footer-bottom { padding: 16px; font-size: 0.75rem; }
}

/* --- Small phones --- */
@media (max-width: 360px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  .hero-content { padding-top: 70px; }
  .btn { padding: 12px 20px; font-size: 0.82rem; }
  .btn-lg { padding: 12px 24px; font-size: 0.82rem; }
  .marquee-item { width: 110px; height: 60px; padding: 6px 10px; margin: 0 8px; }
  /* Partners */
  .partner-logo-item { width: 172px; height: 94px; }
  .nav-logo img { height: 48px; }
  .footer-logo-img { height: 60px; }
  .badge { width: 78px; height: 78px; }
}
