/* ============================================================
   ZI SOFTECH — Spatial UI / OLED Dark / Motion-Driven
   Skill: UI UX Pro Max — Enterprise Gateway Pattern
   Brand: #0047AB (Royal Blue) | #CC0000 (Bold Red) | White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS VARIABLES — Skill-guided design tokens ── */
:root {
  /* Brand */
  --blue:         #0047AB;
  --blue-light:   #3b82f6;
  --blue-neon:    #60a5fa;
  --blue-glow:    rgba(59, 130, 246, 0.55);
  --red:          #CC0000;
  --red-hover:    #e60000;

  /* OLED-optimised backgrounds (skill: Dark Mode OLED) */
  --bg-dark:      #00000F;
  --bg-navy:      #0A0E1F;
  --bg-section:   #060B18;
  --bg-alt:       #0D1321;

  /* Spatial UI glass (skill: blur(40px) saturate(180%)) */
  --glass-bg:     rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.20);
  --glass-blur:   40px;
  --glass-saturate: 180%;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

  /* Text */
  --text-white:   #ffffff;
  --text-muted:   rgba(255, 255, 255, 0.58);
  --text-dark:    #1A1A2E;

  /* Radii */
  --radius:       14px;
  --radius-lg:    22px;

  /* Motion (skill: 300-400ms, transform/opacity only) */
  --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast:     200ms;
  --dur-base:     320ms;
  --dur-slow:     420ms;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-white);
  overflow-x: hidden;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

#cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, rgba(59,130,246,0) 70%);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

#cursor-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-neon);
  box-shadow: 0 0 10px var(--blue-neon), 0 0 20px rgba(96,165,250,0.4);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.tilt-card {
  will-change: transform;
  cursor: pointer;
}

.section-padding { padding: 90px 0; }

.section-small-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--red);
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-weight: 600;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -2px;
}
.wave-divider svg { display: block; width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.custom-navbar {
  background: rgba(232, 240, 250, 0.85);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 1px solid rgba(0, 71, 171, 0.15);
  transition: border-color var(--dur-base) var(--ease),
              background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
  padding: 0;
}

.custom-navbar.scrolled {
  background: rgba(232, 240, 250, 0.96);
  border-bottom-color: var(--blue);
  box-shadow: 0 2px 30px rgba(0, 71, 171, 0.12), 0 1px 0 rgba(0, 71, 171, 0.08);
}

.custom-navbar .navbar-brand {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 84px;
  width: autopx;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0, 71, 171, 0.35));
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(0,71,171,0.35)); }
  50%       { filter: drop-shadow(0 0 14px rgba(0,71,171,0.7)); }
}

.custom-navbar .nav-link,
.custom-navbar .navbar-brand {
  color: var(--text-dark) !important;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px !important;
}

.custom-navbar .nav-link { cursor: pointer; }

.custom-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width var(--dur-base) var(--ease);
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
  width: 100%;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: var(--blue) !important;
}

@media (max-width: 768px) {
  .navbar-logo { height: 64px; width: 64px; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 130px 0 90px;
  background: var(--bg-dark);
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,71,171,0.22) 0%, transparent 70%);
  top: -150px; left: -150px;
  animation: orbFloat 12s ease-in-out infinite;
}
.hero-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: orbFloat 16s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(204,0,0,0.10) 0%, transparent 70%);
  top: 50%; left: 60%;
  animation: orbFloat 20s ease-in-out infinite 4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  33%       { transform: translateY(-30px) translateX(15px); }
  66%       { transform: translateY(20px) translateX(-20px); }
}

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

.hero-card {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  padding: 56px 48px 48px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease);
  box-shadow:
    0 0 0 1px rgba(0,71,171,0.18),
    0 40px 80px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.hero-section h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-white);
  letter-spacing: -0.03em;
}

.hero-section h1 .typed-highlight {
  color: var(--blue-light);
  text-shadow: 0 0 30px rgba(0,71,171,0.7);
}

.hero-section .dot { color: var(--red); }

.hero-text {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.typed-cursor {
  color: var(--blue-light);
  animation: blink 0.75s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--blue);
  border-radius: 50px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
  box-shadow: 0 0 24px var(--blue-glow);
}

.btn-hero-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn-hero-primary:hover::before { left: 150%; }
.btn-hero-primary:hover {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 36px rgba(204,0,0,0.65);
  color: #fff;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.btn-hero-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 22px rgba(204,0,0,0.4);
}

.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue-light);
  text-shadow: 0 0 20px rgba(0,71,171,0.6);
  line-height: 1;
}

.hero-stat .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.wave-sep {
  position: relative;
  z-index: 2;
  margin-top: -2px;
  line-height: 0;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  background: var(--bg-navy);
  position: relative;
}

.about-section .section-title,
.about-section h3 {
  color: var(--text-white);
}

.about-section p {
  color: var(--text-muted);
  line-height: 1.8;
}

.about-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(0,71,171,0.2);
}

/* ============================================================
   SPECIALTY / SERVICES SECTION
   ============================================================ */
.specialty-section {
  background: var(--bg-section);
  position: relative;
}

.specialty-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  will-change: transform;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
  transform-style: preserve-3d;
}

.specialty-card:hover {
  border-color: rgba(0,71,171,0.55);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 36px rgba(0,71,171,0.18);
}

.specialty-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: 0.85;
}

.specialty-card .card-body {
  padding: 24px;
}

.specialty-card h5 {
  color: var(--blue-light);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.specialty-card p { color: var(--text-muted); font-size: 14px; }

.specialty-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.specialty-card ul li {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================================
   GROWTH SECTION
   ============================================================ */
.growth-section {
  background: var(--bg-navy);
  position: relative;
}

.growth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  cursor: pointer;
  will-change: transform;
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
  transform-style: preserve-3d;
}

.growth-card:hover {
  border-color: rgba(0,71,171,0.55);
  box-shadow: 0 24px 56px rgba(0,0,0,0.45), 0 0 30px rgba(0,71,171,0.15);
}

.growth-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(96,165,250,0.14), rgba(96,165,250,0.03));
  border: 1px solid rgba(96,165,250,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 32px;
  color: rgba(147, 197, 253, 0.9);
  box-shadow: 0 0 16px rgba(96,165,250,0.12);
}

.growth-card h5 {
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-white);
}

.growth-card p { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   CLIENTS SECTION
   ============================================================ */
.clients-section {
  background: var(--bg-section);
  position: relative;
}

.card-heading {
  color: var(--text-white);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.client-card {
  background-color: #ffffff !important;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius);
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.client-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,71,171,0.2);
}

.client-logo {
  width: 100%;
  height: 110px;
  object-fit: contain;
  margin-bottom: 14px;
  transition: transform 0.3s ease;
}

.client-card:hover .client-logo {
  transform: scale(1.05);
}

.client-name {
  font-size: 11px;
  font-weight: 700;
  color: #1A1A2E !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
  line-height: 1.4;
  text-align: center;
}

/* ============================================================
   PARTNERS SECTION
   ============================================================ */
.partners-section {
  background: var(--bg-navy);
  position: relative;
}

.partner-tag {
  display: inline-block;
  background: rgba(0,71,171,0.10);
  color: var(--blue);
  border: 1px solid rgba(0,71,171,0.25);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* ============================================================
   MARQUEE — infinite auto-scrolling logo strips
   Used by: #clients and #partners
   ============================================================ */
.marquee-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 8px 0 4px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  align-items: stretch;
  gap: 22px;
  width: max-content;
  padding: 0 22px;
  animation: marqueeScroll 42s linear infinite;
  will-change: transform;
}

.marquee-track.marquee-reverse {
  animation-name: marqueeScrollReverse;
  animation-duration: 52s;
}

.marquee-wrap:hover .marquee-track,
.marquee-wrap:focus-within .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee-item {
  flex: 0 0 auto;
  width: 168px;
  cursor: pointer;
}

.marquee-item .client-logo {
  height: 90px;
}

@media (max-width: 767.98px) {
  .marquee-item        { width: 140px; }
  .marquee-item .client-logo { height: 72px; }
  .marquee-track        { gap: 16px; padding: 0 16px; animation-duration: 30s; }
  .marquee-track.marquee-reverse { animation-duration: 36s; }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  background: var(--bg-section);
  position: relative;
}

.contact-box {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  padding: 32px;
  border-radius: var(--radius-lg);
}

.contact-info i {
  color: var(--blue-light);
  font-size: 20px;
  margin-right: 14px;
  margin-top: 3px;
  flex-shrink: 0;
}

.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.contact-info strong { color: var(--text-white); }

.contact-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: var(--radius);
  filter: invert(0.9) hue-rotate(180deg);
  opacity: 0.85;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: relative;
}

.footer-main {
  background: #020912;
  color: var(--text-white);
  padding: 60px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,71,171,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,71,171,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}

.footer-main .container { position: relative; z-index: 1; }

.footer-logo {
  display: inline-block;
  margin-bottom: 18px;
}

.footer-logo img {
  height: 44px;
  filter: drop-shadow(0 0 8px rgba(0,71,171,0.5));
}

.footer-main p,
.footer-main li,
.footer-main a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-main a:hover { color: var(--blue-light); }

.footer-main h6 {
  color: var(--text-white);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-main ul {
  list-style: none;
  padding-left: 0;
}

.footer-main ul li { margin-bottom: 10px; }

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

.footer-social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7) !important;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  font-size: 16px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff !important;
  box-shadow: 0 0 16px rgba(0,71,171,0.6);
  transform: translateY(-2px);
}

.footer-bottom {
  background: #010508;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 16px 0;
  font-size: 13px;
  border-top: 1px solid rgba(0,71,171,0.15);
  position: relative;
  z-index: 1;
}

.footer-bottom strong { color: var(--blue-light); }

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-section {
  padding: 120px 0 90px;
  background: var(--bg-section);
  min-height: 100vh;
}

.gallery-section .section-title { color: var(--text-white); }

/* ── FEATURED ZIGZAG ROWS ── */
.zigzag-wrap {
  margin-bottom: 70px;
}

.zigzag-row {
  margin-bottom: 60px;
}
.zigzag-row:last-child { margin-bottom: 0; }

.zigzag-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(0,71,171,0.18), 0 24px 60px rgba(0,0,0,0.45);
}

.zigzag-media img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease);
}

.zigzag-media:hover img {
  transform: scale(1.05);
}

.zigzag-caption {
  padding: 8px 8px 8px 0;
}

.zigzag-reverse .zigzag-caption {
  padding: 8px 0 8px 8px;
}

.zigzag-index {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 14px;
}

.zigzag-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 16px;
}

.zigzag-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--blue-light);
  box-shadow: 0 0 12px var(--blue-glow);
  border-radius: 2px;
}

.zigzag-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 480px;
}

.gallery-more-label {
  margin-bottom: 44px;
}

@media (max-width: 991.98px) {
  .zigzag-media img { height: 300px; }
  .zigzag-row { margin-bottom: 44px; }
  /* Stack photo above caption on tablets/mobile regardless of side */
  .zigzag-reverse .order-lg-1,
  .zigzag-reverse .order-lg-2 { order: initial; }
  .zigzag-caption,
  .zigzag-reverse .zigzag-caption { padding: 4px 4px; }
}

@media (max-width: 575.98px) {
  .zigzag-media img { height: 220px; }
  .zigzag-title { font-size: 1.4rem; }
  .zigzag-text { font-size: 0.92rem; }
}

/* ── HORIZONTAL TIMELINE (year-only) ──
   A single horizontal line with a dot per year and the year
   label sitting above each dot. No cards, no copy inline —
   click a dot to open the popup with photos + caption.
   To add an entry: duplicate a .timeline-item and add a
   matching entry to timelineData in the script. */
.timeline-outer {
  width: 100%;
  overflow: visible;
}

.timeline-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 60px 10px 30px;
}

.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(to right, rgba(0,71,171,0), rgba(0,71,171,0.55) 4%, rgba(0,71,171,0.55) 96%, rgba(0,71,171,0));
}

.timeline-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.timeline-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue-light);
  border: 3px solid var(--bg-section);
  box-shadow: 0 0 0 1px rgba(0,71,171,0.5), 0 0 16px var(--blue-glow);
  z-index: 3;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.timeline-item:hover .timeline-dot,
.timeline-dot:focus-visible {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 0 1px rgba(0,71,171,0.6), 0 0 24px var(--blue-glow);
  outline: none;
}

.timeline-connector {
  position: absolute;
  left: 50%;
  top: calc(50% - 24px);
  width: 2px;
  height: 24px;
  background: rgba(0,71,171,0.5);
  transform: translateX(-50%);
}

.timeline-date {
  position: absolute;
  left: 50%;
  bottom: calc(50% + 24px);
  transform: translateX(-50%);
  display: block;
  font-size: clamp(15px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--red);
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), text-shadow var(--dur-base) var(--ease);
}

.timeline-item:hover .timeline-date {
  transform: translateX(-50%) translateY(-4px);
  text-shadow: 0 0 20px rgba(204,0,0,0.5);
}

/* Tighten further on small screens — font shrinks with clamp() above,
   so items just need less vertical breathing room */
@media (max-width: 767.98px) {
  .timeline-wrap  { padding: 44px 4px 22px; }
  .timeline-dot   { width: 11px; height: 11px; }
}

@media (max-width: 480px) {
  .timeline-date  { letter-spacing: 0; }
}

/* ── TIMELINE POPUP MODAL ── */
.timeline-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.timeline-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.timeline-modal-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: scale(0.94) translateY(10px);
  transition: transform var(--dur-base) var(--ease);
}

.timeline-modal-overlay.active .timeline-modal-card {
  transform: scale(1) translateY(0);
}

.timeline-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  z-index: 2;
}

.timeline-modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  transform: rotate(90deg);
}

.timeline-modal-year {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 18px;
}

/* Album tabs — switch between occasions within the same year popup */
.timeline-modal-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.timeline-tab {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.timeline-tab:hover {
  border-color: rgba(0,71,171,0.5);
  color: var(--text-white);
}

.timeline-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 16px rgba(0,71,171,0.4);
}

@media (max-width: 575.98px) {
  .timeline-tab { font-size: 11.5px; padding: 6px 12px; }
}

.timeline-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.timeline-modal-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  display: block;
  cursor: zoom-in;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.timeline-modal-grid img:hover {
  transform: scale(1.03);
  border-color: rgba(0,71,171,0.5);
}

.timeline-modal-caption {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* ── LIGHTBOX — enlarged single-photo view ──
   Sits above the timeline modal (higher z-index) so a photo can be
   opened from within the popup and closed independently. */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 5, 0.9);
  z-index: 10100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  transform: scale(0.96);
  transition: transform var(--dur-base) var(--ease);
  object-fit: contain;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-strong);
  background: rgba(255,255,255,0.08);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  z-index: 2;
}

.lightbox-close:hover {
  background: var(--red);
  border-color: var(--red);
  transform: rotate(90deg);
}

@media (max-width: 575.98px) {
  .lightbox-overlay { padding: 12px; }
  .lightbox-close { top: 14px; right: 14px; width: 36px; height: 36px; }
}

@media (max-width: 767.98px) {
  .timeline-modal-card { padding: 30px; }
  .timeline-modal-grid img { height: 150px; }
}

@media (max-width: 575.98px) {
  .timeline-modal-card { padding: 22px; }
  .timeline-modal-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .timeline-modal-grid img { height: 90px; }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur-base) var(--ease);
  opacity: 0.9;
}

.gallery-item:hover img {
  transform: scale(1.08);
  opacity: 1;
}

.gallery-item:hover {
  border-color: rgba(0,71,171,0.45);
  box-shadow: 0 0 28px rgba(0,71,171,0.2);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 16px 14px;
  background: linear-gradient(to top, rgba(6, 11, 24, 0.92) 0%, rgba(6, 11, 24, 0.55) 65%, rgba(6, 11, 24, 0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--glass-border);
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
  pointer-events: none;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

.gallery-caption .caption-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.02em;
}

.gallery-caption .caption-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (hover: none) {
  .gallery-caption {
    transform: translateY(0);
    opacity: 1;
    position: static;
    background: rgba(255,255,255,0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--glass-border);
  }
  .gallery-item:hover img { transform: none; }
}

/* ============================================================
   AOS OVERRIDES — ensure dark text on dark backgrounds
   ============================================================ */
[data-aos] { color: inherit; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .section-padding  { padding: 70px 0; }
  .hero-section     { min-height: 88vh; padding-top: 110px; }
  .hero-section h1  { font-size: 2.4rem; }
  .hero-card        { padding: 40px 28px; }
  .about-img        { height: 300px; }

  .custom-navbar .navbar-collapse {
    background: rgba(85, 95, 115, 0.97);
    backdrop-filter: blur(14px);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-top: 12px;
    border: 1px solid rgba(200, 210, 230, 0.18);
  }
}

@media (max-width: 767.98px) {
  .section-padding   { padding: 55px 0; }
  .hero-section      { min-height: 80vh; padding: 100px 0 55px; }
  .hero-section h1   { font-size: 2rem; line-height: 1.2; }
  .hero-text         { font-size: 1rem; }
  .section-title     { font-size: 1.75rem; }
  .about-img,
  .specialty-card img { height: 220px; }
  .growth-card,
  .contact-box       { padding: 24px 18px; }
  .growth-icon       { width: 68px; height: 68px; font-size: 28px; }
  .hero-stats        { gap: 24px; }
  .hero-card         { padding: 32px 20px; }
}

@media (max-width: 575.98px) {
  .hero-section h1  { font-size: 1.75rem; }
  .hero-stat .stat-num { font-size: 1.8rem; }
  .section-small-title { letter-spacing: 1.5px; }
  .contact-map iframe  { height: 200px; }
  .gallery-section     { padding: 100px 0 60px; }
  .gallery-item img    { height: 180px; }
}