/* ═══════════════════════════════════════════════════════
   SAGE Engineering – Main Stylesheet
   Font: Poppins (Google Fonts)
   ═══════════════════════════════════════════════════════ */

/* ─── CSS VARIABLES ─── */
:root {
  --color-primary:    #1B2E5E;   /* dark navy – header, footer, stats bg */
  --color-accent:     #2B63D9;   /* bright blue – labels, CEO title, icons */
  --color-accent-dark:#1947B8;
  --color-white:      #ffffff;
  --color-dark:       #1A1A2E;
  --color-body:       #555555;
  --color-light-bg:   #F7F8FC;
  --color-border:     #E2E6EF;
  --font:             'Poppins', sans-serif;
  --container:        1290px;
  --section-pad:      80px;
  --header-h:         90px;
  --radius:           4px;
  --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);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

/* ─── CONTAINER ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ─── SECTION PADDING ─── */
.section-pad { padding-block: var(--section-pad); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

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

.btn-outline-dark {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-dark:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ─── SECTION TITLES ─── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 48px;
}

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--color-white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hamburger – mobile only */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 820px;
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Slideshow container */
.hero-slideshow {
  position: absolute;
  inset: 0;
}

/* Each slide */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 20, 50, 0.78) 0%,
    rgba(10, 20, 50, 0.58) 60%,
    rgba(10, 20, 50, 0.25) 100%
  );
  z-index: 1;
}

/* Slideshow dot navigation */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.hero-dot.active {
  background: var(--color-white);
  transform: scale(1.25);
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Keep CTA box above overlay */
.hero-cta-box { z-index: 2; }

.hero-tagline {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-headline {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.18;
  margin-bottom: 40px;
  max-width: 700px;
}

.br-desktop { display: block; }

/* Hero CTA box – bottom right */
.hero-cta-box {
  position: absolute;
  right: 0;
  bottom: 60px;
  z-index: 2;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 28px 36px;
  min-width: 280px;
}

.cta-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 10px;
  white-space: nowrap;
}

.cta-line {
  display: inline-block;
  flex: 1;
  height: 2px;
  background: var(--color-dark);
  min-width: 60px;
}

.cta-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.cta-link:hover { color: var(--color-primary); }

/* ═══════════════════════════════════════════════════════
   OUR SERVICES
   ═══════════════════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 36px;
}

.service-card { display: flex; flex-direction: column; gap: 12px; }

.service-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.service-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.3;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--color-body);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════
   FIELD OF SERVICES – shared
   ═══════════════════════════════════════════════════════ */
.fos-section { background: var(--color-white); }
.fos-alt { background: var(--color-light-bg); }

.fos-titles { margin-bottom: 32px; }

.fos-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.fos-heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
}

/* Horizontal layout (Water Testing Lab) */
.fos-horizontal .fos-row {
  display: flex;
  align-items: flex-start;
  gap: 80px;
}

.fos-left { flex: 0 0 auto; min-width: 280px; }

.fos-right { flex: 1; display: flex; align-items: center; height: 100%; }

.fos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fos-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--color-body);
}

.fos-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 1.1rem;
  line-height: 1;
  top: 3px;
}

/* Fabrication top-row: titles + list columns side by side */
.fos-header-row {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  margin-bottom: 32px;
}

.fos-list-cols {
  display: flex;
  gap: 48px;
  flex: 1;
  align-items: flex-start;
  padding-top: 44px;
}

/* ═══════════════════════════════════════════════════════
   CAROUSEL
   ═══════════════════════════════════════════════════════ */
.carousel-wrapper {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Portrait items (Equipment) */
.carousel-item.portrait {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
}
.carousel-item.portrait img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
}

/* Square items (Filtering Media) */
.carousel-item.square {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
}
.carousel-item.square img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
}

/* Landscape items (Fabrication) */
.carousel-item.landscape {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
}
.carousel-item.landscape img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
}

.carousel-item p {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--color-body);
  font-weight: 500;
  text-align: center;
}

/* Carousel nav buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.carousel-btn:hover { background: var(--color-accent); }
.carousel-btn.carousel-prev { left: -24px; }
.carousel-btn.carousel-next { right: -24px; }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* ═══════════════════════════════════════════════════════
   FIRM PARTICULARS
   ═══════════════════════════════════════════════════════ */
.firm-particulars {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: stretch;
}

.firm-bg {
  position: absolute;
  inset: 0;
}

.firm-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Strong blue duotone overlay matching the Figma design */
.firm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 55, 160, 0.80);
  mix-blend-mode: multiply;
}

.firm-inner {
  position: relative;
  z-index: 2;
  padding-block: 70px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
}

/* Title sits at top-left */
.firm-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--color-white);
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
}

/* Stats spread across the full width */
.firm-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-number {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  font-weight: 400;
}

.stat-divider { display: none; }

/* ═══════════════════════════════════════════════════════
   CEO MESSAGE
   ═══════════════════════════════════════════════════════ */
.ceo-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
}

.ceo-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.25;
}

.ceo-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: var(--color-light-bg);
  border-radius: 8px;
  overflow: hidden;
}

.ceo-photo {
  flex: 0 0 320px;
  height: 420px;
  overflow: hidden;
}

.ceo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--color-border);
}

.ceo-text {
  flex: 1;
  padding: 40px 40px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ceo-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
}

.ceo-text p {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.75;
}

.ceo-regards {
  font-weight: 500;
  color: var(--color-dark);
}

.ceo-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════
   CORE VALUES
   ═══════════════════════════════════════════════════════ */
.core-values { background: var(--color-white); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 36px;
}

.value-card { display: flex; flex-direction: column; gap: 12px; }

.value-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.value-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.value-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
}

.value-card p {
  font-size: 0.875rem;
  color: var(--color-body);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════
   OUR CLIENTS – infinite scroll ticker
   ═══════════════════════════════════════════════════════ */
.clients-section { background: var(--color-light-bg); }

.clients-track-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.clients-track {
  display: flex;
  align-items: center;
  gap: 48px;
  animation: clientsScroll 22s linear infinite;
  width: max-content;
}

.clients-track img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter var(--transition), opacity var(--transition);
  flex-shrink: 0;
  background: var(--color-border);
}

.clients-track img:hover {
  filter: grayscale(0);
  opacity: 1;
}

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

/* ═══════════════════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════════════════ */
.gallery-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 180px);
  gap: 10px;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
  transition: transform var(--transition);
}

.gallery-img:hover { transform: scale(1.02); }

.gallery-cta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.gallery-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-dark);
}

/* ═══════════════════════════════════════════════════════
   CTA SECTION – pure CSS geometric background
   ═══════════════════════════════════════════════════════ */
.cta-section {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: #060d18;   /* near-black with subtle blue undertone */
  overflow: hidden;
}

/* ── Geometric blue shapes (right side) ── */
.cta-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Large main blue slab – sweeps from upper-centre to lower-right */
.cta-shape-a {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #1a65e8 0%, #0e42b8 100%);
  clip-path: polygon(42% 0%, 100% 0%, 100% 100%, 60% 100%, 8% 52%);
}

/* Dark diagonal cut through the blue – creates the double-panel depth */
.cta-shape-b {
  position: absolute;
  inset: 0;
  background: #060d18;
  clip-path: polygon(42% 0%, 62% 0%, 100% 100%, 60% 100%);
}

.cta-content {
  position: relative;
  z-index: 2;
  padding-block: 90px;
}

.cta-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: 40px;
}

/* "Work" – italic blue, matching Figma */
.cta-work {
  font-style: italic;
  color: #3a8fff;
  margin-right: 10px;
}

.cta-together { color: var(--color-white); }

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

/* Outlined box button (matches Figma "Build a Project with Us") */
.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border: 1.5px solid var(--color-white);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn-cta-outline:hover {
  background: var(--color-white);
  color: #060d18;
}

/* Plain text link button (matches Figma "Build Your Career With Us") */
.btn-cta-text {
  display: inline-flex;
  align-items: center;
  color: var(--color-white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  white-space: nowrap;
}
.btn-cta-text:hover { color: #3a8fff; }

/* ═══════════════════════════════════════════════════════
   FOOTER – full 7-column layout
   ═══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 220px repeat(5, 1fr) 260px;
  gap: 40px;
  padding-block: 60px;
  align-items: start;
}

/* Brand column */
.footer-brand { display: flex; flex-direction: column; gap: 16px; }

.footer-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  background: transparent;
  filter: brightness(0) saturate(0) invert(1);
}

.footer-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
}

/* Nav columns wrapper */
.footer-nav {
  display: contents; /* each .footer-col becomes a direct grid child */
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 14px;
  white-space: nowrap;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--color-white); }

/* Offices column */
.footer-offices { display: flex; flex-direction: column; gap: 14px; }

.footer-offices h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0;
}

.footer-office-block { display: flex; flex-direction: column; gap: 4px; }

.footer-office-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-white);
}

.footer-office-addr {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.footer-contact-list li {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.footer-contact-list li span.fc-icon {
  flex-shrink: 0;
  font-style: normal;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: 18px;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-legal a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}
.footer-legal a:hover { color: rgba(255,255,255,0.85); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE – TABLET  (≤ 1024px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --section-pad: 60px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }

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

  .ceo-inner { grid-template-columns: 1fr; gap: 32px; }
  .ceo-title { text-align: center; }

  .ceo-content { flex-direction: column; }
  .ceo-photo { flex: unset; width: 100%; height: 300px; }
  .ceo-text { padding: 28px; }

  .gallery-inner { grid-template-columns: 1fr; }
  .gallery-cta-col { flex-direction: row; align-items: center; }

  .fos-header-row { flex-direction: column; gap: 24px; }
  .fos-list-cols { padding-top: 0; }

  .fos-horizontal .fos-row { flex-direction: column; gap: 24px; }

  .footer-inner { grid-template-columns: repeat(3, 1fr); }
  .footer-nav { display: contents; }
  .footer-brand { grid-column: 1 / -1; }

  /* Carousel – 3 visible items on tablet */
  .carousel-item.portrait,
  .carousel-item.square,
  .carousel-item.landscape {
    flex: 0 0 calc((100% - 2 * 24px) / 3);
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE – MOBILE  (≤ 768px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --section-pad: 48px; --header-h: 70px; }

  /* Header */
  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 24px;
    display: none;
    flex-direction: column;
    z-index: 999;
  }

  .main-nav.open { display: flex; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .main-nav a { font-size: 1rem; padding: 10px 0; width: 100%; }
  .main-nav a::after { display: none; }

  /* Hero */
  .hero { height: auto; min-height: 580px; padding-block: 60px; }

  .br-desktop { display: none; }

  .hero-headline { font-size: clamp(1.6rem, 7vw, 2.5rem); }

  .hero-cta-box {
    position: static;
    margin: 40px 16px 0;
    width: auto;
    padding: 20px 24px;
  }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Values */
  .values-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Stats */
  .firm-stats { flex-direction: column; gap: 32px; }
  .stat-divider { width: 80px; height: 1px; }

  /* CEO */
  .ceo-content { border-radius: 0; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .gallery-grid .gallery-img { height: 140px; }
  .gallery-cta-col { flex-direction: column; }

  /* Carousel – 1.5 items visible on mobile */
  .carousel-item.portrait,
  .carousel-item.square,
  .carousel-item.landscape {
    flex: 0 0 80%;
  }

  .carousel-btn.carousel-prev { left: 0; }
  .carousel-btn.carousel-next { right: 0; }

  /* FoS horizontal */
  .fos-horizontal .fos-row { flex-direction: column; gap: 20px; }
  .fos-left { min-width: unset; }

  /* CTA */
  .cta-buttons { flex-direction: column; align-items: flex-start; }
  .btn-cta-outline,
  .btn-cta-text { width: 100%; justify-content: center; }

  /* CTA geometric shapes scale down */
  .cta-shape-a { clip-path: polygon(0% 55%, 100% 0%, 100% 100%, 0% 100%); }
  .cta-shape-b { clip-path: polygon(0% 55%, 30% 38%, 100% 100%, 0% 100%); }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-offices { grid-column: 1 / -1; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .gallery-img { height: 200px; }
}

/* ═══════════════════════════════════════════════════════
   PLACEHOLDER IMAGE
   ═══════════════════════════════════════════════════════ */
.placeholder-img {
  background: #c8d4e4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  width: 100%;
}

.placeholder-img span {
  font-size: 0.85rem;
  color: #5a7090;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════
   FORM FIELDS – shared across job-form & contact-us
   ═══════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--color-dark);
  outline: none;
  transition: border-color var(--transition);
  background: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-accent);
}

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

/* Radio inline groups */
.radio-group {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-dark);
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
  padding: 0;
  border: none;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.stepper-btn {
  width: 38px;
  height: 40px;
  background: var(--color-light-bg);
  border: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}
.stepper-btn:hover { background: var(--color-border); }

.stepper-input {
  width: 60px;
  height: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--color-dark);
  outline: none;
}

/* Section heading inside form */
.form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section-title .add-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  background: transparent;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition), color var(--transition);
}
.form-section-title .add-btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Repeatable group */
.repeatable-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: var(--color-light-bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════
   PAGE INTRO BANNER – about-us, careers
   ═══════════════════════════════════════════════════════ */
.page-intro {
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 56px;
  background: var(--color-white);
}

.page-intro-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
}

.page-intro-left .page-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.page-intro-left h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.15;
}

.page-intro-right p {
  font-size: 0.95rem;
  color: var(--color-body);
  line-height: 1.75;
}


/* ═══════════════════════════════════════════════════════
   ABOUT US
   ═══════════════════════════════════════════════════════ */
.our-theme {
  background: var(--color-white);
}

.our-theme .theme-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.our-theme .theme-heading {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.35;
  max-width: 900px;
}

.why-we-are {
  background: var(--color-light-bg);
}

.why-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 60px;
  align-items: center;
}

.why-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.why-text p {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.75;
}

.why-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}


/* ═══════════════════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════════════════ */
.page-header-simple {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 32px;
  background: var(--color-white);
}

.page-header-simple h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-dark);
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-item-wrap {
  overflow: hidden;
  border-radius: var(--radius);
}

.gallery-item-wrap img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.gallery-item-wrap:hover img { transform: scale(1.02); }

/* ═══════════════════════════════════════════════════════
   CAREERS
   ═══════════════════════════════════════════════════════ */
.life-at-sage {
  background: var(--color-light-bg);
}

.life-inner {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 60px;
  align-items: center;
}

.life-text h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
  line-height: 1.3;
}

.life-text p {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.75;
}

/* Benefits uses existing .values-grid / .value-card */

/* Open Roles */
.open-roles { background: var(--color-light-bg); }

.open-roles h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 32px;
}

.role-row {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.role-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.role-icon-wrap svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.role-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  flex: 1;
  min-width: 160px;
}

.role-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(43,99,217,0.1);
  border-radius: 20px;
  padding: 3px 12px;
  white-space: nowrap;
}

.role-location {
  font-size: 0.82rem;
  color: var(--color-body);
  white-space: nowrap;
  flex: 1;
}

.role-apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 8px 20px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.role-apply:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ═══════════════════════════════════════════════════════
   JOB FORM
   ═══════════════════════════════════════════════════════ */
.job-form-section {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 80px;
  background: var(--color-white);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 20px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--color-primary); }

.job-breadcrumb {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

#jobRoleTitle {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.form-sub-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 32px;
}

.job-form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn-submit {
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  padding: 14px 48px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  align-self: flex-start;
}
.btn-submit:hover { background: var(--color-accent-dark); }

.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.field-error-msg {
  display: block;
  font-size: 0.78rem;
  color: #e53e3e;
  margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════
   SUCCESS MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.modal-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-white);
}

.modal-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 16px;
  line-height: 1.3;
}

.modal-card p {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.7;
  margin-bottom: 12px;
}

.btn-modal-done {
  display: inline-block;
  margin-top: 12px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 40px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-modal-done:hover { background: var(--color-accent-dark); }

/* ═══════════════════════════════════════════════════════
   CONTACT US
   ═══════════════════════════════════════════════════════ */
.contact-section {
  padding-top: calc(var(--header-h) + 80px);
  padding-bottom: 80px;
  background: var(--color-white);
}

.contact-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.contact-label-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.contact-label-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.contact-label-line {
  display: block;
  width: 80px;
  height: 2px;
  background: var(--color-accent);
}

.contact-tagline {
  font-size: 0.9rem;
  color: var(--color-body);
  max-width: 380px;
  line-height: 1.6;
  text-align: right;
}

.contact-heading {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
  max-width: 400px;
  margin-bottom: 56px;
}

.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.contact-form-wrap h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn-contact-submit {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  align-self: flex-start;
}
.btn-contact-submit:hover { background: var(--color-accent-dark); }

.offices-wrap h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 24px;
}

.office-entry {
  margin-bottom: 24px;
}

.office-entry-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.office-entry-addr {
  font-size: 0.85rem;
  color: var(--color-body);
  line-height: 1.65;
  padding-left: 24px;
}

.contact-detail-block {
  margin-top: 24px;
}

.contact-detail-block strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-dark);
  display: block;
  margin-bottom: 6px;
}

.contact-detail-block p,
.contact-detail-block a {
  font-size: 0.85rem;
  color: var(--color-body);
  line-height: 1.7;
  display: block;
}

.contact-detail-block a:hover { color: var(--color-accent); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE – NEW PAGES  (≤ 1024px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .why-inner { grid-template-columns: 1fr; gap: 36px; }
  .life-inner { grid-template-columns: 1fr; gap: 36px; }
  .contact-cols { grid-template-columns: 1fr; gap: 48px; }
  .contact-tagline { text-align: left; }
  .page-intro-row { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .gallery-item-wrap img { height: 200px; }

  .role-row { flex-wrap: wrap; gap: 12px; }
  .role-title { min-width: unset; flex: unset; width: 100%; }

  .job-form-card { padding: 24px 16px; }
  .form-row-3 { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }

  .btn-submit { align-self: stretch; text-align: center; justify-content: center; }

  .contact-top { flex-direction: column; }
  .contact-tagline { text-align: left; max-width: 100%; }

  .why-photos { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gallery-page-grid { grid-template-columns: 1fr; }
  .gallery-item-wrap img { height: 240px; }
}
