/* ============================================================
   SHAKON I.D — MAIN STYLESHEET
   Final clean version
   ============================================================ */

/* ============================================================
   1. BASE
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #1a4b8c;
  color: #fff;
}

/* ============================================================
   2. SNAP SCROLL
   ============================================================ */

.snap-container {
  position: relative;
}

.snap-section {
  position: relative;
}

/* Desktop — proximity snap */
@media (min-width: 769px) {
  .snap-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
  }

  .snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    min-height: 100vh;
  }

  footer {
    scroll-snap-align: none;
  }

  .snap-container::-webkit-scrollbar {
    width: 8px;
  }
  .snap-container::-webkit-scrollbar-track {
    background: transparent;
  }
  .snap-container::-webkit-scrollbar-thumb {
    background: rgba(26, 75, 140, 0.2);
    border-radius: 4px;
  }
  .snap-container::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 75, 140, 0.4);
  }
}

/* Mobile — natural scroll */
@media (max-width: 768px) {
  .snap-container {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .snap-section {
    min-height: auto;
    scroll-snap-align: none;
  }

  body::-webkit-scrollbar {
    display: none;
  }
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

/* ============================================================
   3. FLOATING NAV DOTS
   ============================================================ */

#floating-menu {
  z-index: 50;
}

#floating-menu > div {
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  gap: 14px !important;
}

.nav-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(26, 75, 140, 0.2);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-dot:hover {
  background: rgba(26, 75, 140, 0.5);
  transform: scale(1.4);
}

.nav-dot.active {
  background: #1a4b8c;
  height: 22px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  #floating-menu {
    display: none !important;
  }
}

/* ============================================================
   4. REVEAL ON SCROLL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   5. TYPEWRITER
   ============================================================ */

#typewriter::after {
  content: '|';
  display: inline-block;
  margin-left: 4px;
  color: #c6a15b;
  animation: blink 0.9s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   6. FLOATING CUBES (Hero)
   ============================================================ */

.hero-cubes {
  z-index: 0;
  overflow: hidden;
}

.floating-cube {
  position: absolute;
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.08), rgba(198, 161, 91, 0.06));
  border: 1px solid rgba(26, 75, 140, 0.1);
  backdrop-filter: blur(2px);
  animation: floatCube 20s ease-in-out infinite;
}

.cube-one {
  width: 120px;
  height: 120px;
  top: 15%;
  right: 8%;
  --rot: 15deg;
  transform: rotate(15deg);
}

.cube-two {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 20%;
  animation-delay: -7s;
  --rot: -10deg;
  transform: rotate(-10deg);
}

.cube-three {
  width: 60px;
  height: 60px;
  top: 35%;
  right: 35%;
  animation-delay: -14s;
  --rot: 25deg;
  transform: rotate(25deg);
}

@keyframes floatCube {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 15deg)); }
  25% { transform: translateY(-30px) rotate(calc(var(--rot, 15deg) + 15deg)); }
  50% { transform: translateY(-15px) rotate(var(--rot, 15deg)); }
  75% { transform: translateY(-40px) rotate(calc(var(--rot, 15deg) - 10deg)); }
}

/* ============================================================
   7. HERO VISUAL FLOAT
   ============================================================ */

.hero-visual {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   8. SCROLL INDICATOR
   ============================================================ */

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 42px;
  border: 1.5px solid rgba(26, 75, 140, 0.25);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  pointer-events: none;
}

.scroll-dot {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #1a4b8c;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

@media (max-width: 768px) {
  .scroll-indicator {
    bottom: 20px;
    width: 20px;
    height: 34px;
    border-width: 1px;
  }
  .scroll-dot {
    height: 5px;
    width: 2.5px;
  }
}

/* ============================================================
   9. SKETCHED ARROW (Editorial accent — Services section)
   ============================================================ */

.header-sketch-arrow .arrow-shaft,
.header-sketch-arrow .arrow-head {
  stroke: #c6a15b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Initial hidden state */
.header-sketch-arrow .arrow-shaft {
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
}

.header-sketch-arrow .arrow-head {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
}

/* When active — draw shaft, then head */
.header-sketch-arrow.active .arrow-shaft {
  animation: draw-shaft 0.95s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.header-sketch-arrow.active .arrow-head {
  animation: draw-head 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.95s forwards;
}

@keyframes draw-shaft {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-head {
  to { stroke-dashoffset: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .header-sketch-arrow .arrow-shaft,
  .header-sketch-arrow .arrow-head {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
}

/* ============================================================
   10. SERVICE ROWS
   ============================================================ */

.service-row {
  transition: padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.service-row:hover {
  padding-left: 20px;
}

@media (max-width: 768px) {
  .service-row:hover {
    padding-left: 0;
  }
}

/* ============================================================
   11. PROJECT CARDS
   ============================================================ */

.project-card {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(26, 75, 140, 0.06);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(26, 75, 140, 0.15);
}

.project-card img {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ============================================================
   12. TESTIMONIAL SLIDER
   ============================================================ */

.testimonial-slide {
  display: none;
  opacity: 0;
}

.testimonial-slide.active {
  display: block;
  opacity: 1;
  animation: fadeSlide 0.6s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.testimonial-dot {
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: #1a4b8c !important;
  transform: scale(1.3);
}

/* ============================================================
   13. SOCIAL SECTION
   ============================================================ */

.social-section {
  scroll-snap-align: none;
}

.social-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(26, 75, 140, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a4b8c;
  font-weight: 700;
  font-family: 'Syne', serif;
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
}

.social-icon:hover {
  background: linear-gradient(135deg, #1a4b8c, #3a7bd5);
  color: #fff;
  border-color: transparent;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 30px rgba(26, 75, 140, 0.3);
}

@media (max-width: 768px) {
  .social-icon {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}

/* ============================================================
   14. NEWS POPUP
   ============================================================ */

#news-popup {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#news-popup.show {
  display: flex;
  opacity: 1;
}

#news-popup.hide {
  opacity: 0;
}

.news-popup-card {
  animation: popupIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes popupIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ============================================================
   15. STAT NUMBERS
   ============================================================ */

.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   16. FORM FOCUS
   ============================================================ */

input:focus,
textarea:focus {
  outline: none;
}

/* ============================================================
   17. ACCESSIBILITY
   ============================================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1a4b8c;
  outline-offset: 3px;
}

/* ============================================================
   18. ARROW ICONS (clean, simple nudge)
   ============================================================ */

.arrow-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover .arrow-icon,
button:hover .arrow-icon,
.group:hover .arrow-icon,
.service-row:hover .arrow-icon,
.project-card:hover .arrow-icon {
  transform: translate(3px, -3px);
}

/* ============================================================
   19. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .floating-cube,
  .hero-visual,
  .reveal,
  .project-card img,
  #typewriter::after,
  .scroll-dot,
  .arrow-icon {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   20. MOBILE DECORATION ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
  .floating-cube {
    opacity: 0.5;
  }

  .cube-one {
    width: 80px;
    height: 80px;
  }

  .cube-two {
    width: 60px;
    height: 60px;
  }

  .cube-three {
    display: none;
  }

  .hero-visual {
    animation: none;
  }
}

/* ============================================================
   21. PROJECT CAROUSEL + SEARCH
   ============================================================ */

.carousel-outer {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 85%;
  scroll-snap-align: center;
  min-height: 420px;
  position: relative;
}

@media (min-width: 768px) {
  .carousel-item {
    flex: 0 0 45%;
    min-height: 500px;
  }
}

@media (min-width: 1024px) {
  .carousel-item {
    flex: 0 0 40%;
  }
}

/* ===== SEARCH ===== */
.search-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.search-toggle {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover {
  color: #1a4b8c;
  transform: scale(1.1);
}

.search-toggle.hidden {
  display: none;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
}

.search-input-wrap.open {
  width: 220px;
  opacity: 1;
}

.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: #1a1a1a;
  font-family: 'Manrope', sans-serif;
  padding: 0;
  min-width: 0;
}

.search-input-wrap input::placeholder {
  color: #94a3b8;
}

.search-input-wrap:focus-within {
  border-bottom-color: #1a4b8c;
}

.search-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.search-close:hover {
  color: #1a4b8c;
}

@media (max-width: 768px) {
  .search-input-wrap.open {
    width: 160px;
  }
}

/* ===== DOTS ===== */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26, 75, 140, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0;
}

.carousel-dot:hover {
  background: rgba(26, 75, 140, 0.5);
  transform: scale(1.3);
}

.carousel-dot.active {
  background: #1a4b8c;
  width: 24px;
  border-radius: 4px;
}

.carousel-empty {
  padding: 4rem 0;
  text-align: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    scroll-behavior: auto;
  }
}

/* ============================================================
   22. FLOATING CONSTELLATION (Featured section)
   ============================================================ */

.constellation {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.constellation-bubble {
  position: absolute;
  width: 140px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
  box-shadow: 0 8px 24px rgba(26, 75, 140, 0.15),
              0 0 0 1.5px rgba(198, 161, 91, 0.3);
  background: #e7e0d8;
  will-change: transform, opacity;
}

.constellation-bubble.visible {
  opacity: 1;
}

.constellation-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.constellation-bubble:hover {
  transform: scale(1.15) rotate(0deg) !important;
  z-index: 20;
  box-shadow: 0 16px 48px rgba(26, 75, 140, 0.35),
              0 0 0 2px #c6a15b;
  animation-play-state: paused;
}

.constellation-bubble:hover img {
  transform: scale(1.1);
}

/* Title overlay on hover */
.constellation-bubble::after {
  content: attr(data-title);
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(26, 75, 140, 0.95), transparent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.constellation-bubble:hover::after {
  opacity: 1;
}

/* Placeholder when no image */
.constellation-bubble.no-image {
  background: linear-gradient(135deg, #1a4b8c, #3a7bd5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Syne', serif;
  font-size: 1rem;
  padding: 8px;
  text-align: center;
}

/* Mobile — smaller, fewer */
@media (max-width: 768px) {
  .constellation-bubble {
    width: 90px;
    height: 70px;
    border-radius: 10px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .constellation-bubble {
    transition: opacity 0.4s ease;
    animation: none !important;
    transform: none !important;
  }
  .constellation-bubble.visible {
    opacity: 0.85;
  }
}
/* ============================================================
   21. DESIGN SHOWCASE — Android-style stacked cards
   ============================================================ */

.showcase-heading {
  margin-bottom: 3rem;
}

.stack-wrap {
  perspective: 1200px;
}

.stack-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  transition: all 0.5s ease;
}

/* ===== STACKED CARD ===== */
.stack-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 780px;
  height: 45vh;
  min-height: 320px;
  max-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #1a1a1a;
  box-shadow:
    0 4px 20px rgba(26, 75, 140, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Stacking */
  margin-top: calc(-1 * (45vh - 80px));
  transform-origin: center top;
  z-index: calc(100 - var(--i));
}

/* First card — no negative margin */
.stack-card:first-child {
  margin-top: 0;
}

/* ===== CONTAINER HOVER → SPREAD ===== */
.stack-container:hover .stack-card {
  margin-top: calc(-1 * (45vh - 140px));
}

.stack-container:hover .stack-card:first-child {
  margin-top: 0;
}

/* ===== SINGLE CARD HOVER → LIFT ===== */
.stack-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(26, 75, 140, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 200;
}

/* Other cards dim when one is hovered */
.stack-container:has(.stack-card:hover) .stack-card:not(:hover) {
  opacity: 0.7;
  filter: blur(1px);
}

/* ===== IMAGES ===== */
.stack-images {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1a1a1a;
}

.stack-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 0.8s ease;
}

.stack-img.active {
  opacity: 1;
}

.stack-card:hover .stack-img.active {
  transform: scale(1.06);
}

/* ===== GRADIENT OVERLAY ===== */
.stack-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 20, 40, 0.9) 0%,
    rgba(10, 20, 40, 0.4) 40%,
    transparent 100%
  );
  pointer-events: none;
}

/* ===== INFO ===== */
.stack-info {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 24px 32px;
  z-index: 2;
}

.stack-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

.stack-dot {
  opacity: 0.5;
}

.stack-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stack-title {
  font-family: 'Syne', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  transition: color 0.3s ease;
}

.stack-card:hover .stack-title {
  color: #c6a15b;
}

.stack-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stack-card:hover .stack-arrow {
  background: #c6a15b;
  border-color: #c6a15b;
  color: #1a1a1a;
  transform: rotate(-45deg);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .stack-container {
    padding: 40px 0;
  }

  .stack-card {
    height: 40vh;
    min-height: 280px;
    max-height: 340px;
    border-radius: 16px;
    margin-top: calc(-1 * (40vh - 70px));
  }

  .stack-card:first-child {
    margin-top: 0;
  }

  .stack-container:hover .stack-card {
    margin-top: calc(-1 * (40vh - 120px));
  }

  .stack-container:hover .stack-card:first-child {
    margin-top: 0;
  }

  .stack-info {
    padding: 18px 22px;
  }

  .stack-arrow {
    width: 40px;
    height: 40px;
  }

  .stack-arrow svg {
    width: 16px;
    height: 16px;
  }

  /* No :has support on some mobile — fallback */
  .stack-container:has(.stack-card:hover) .stack-card:not(:hover) {
    opacity: 1;
    filter: none;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .stack-card,
  .stack-img {
    transition: opacity 0.3s ease;
  }
  .stack-card:hover {
    transform: none;
  }
  .stack-container:hover .stack-card {
    margin-top: calc(-1 * (45vh - 80px));
  }
}


/* ============================================================
   22. SECTION BACKGROUNDS
   ============================================================ */

.testimonials-section.has-bg,
.contact-section.has-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Overlay for text readability */
.testimonials-section.has-bg::before,
.contact-section.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay-color, rgba(10, 20, 40, var(--overlay-opacity, 0.6)));
  z-index: 1;
  pointer-events: none;
}

/* Content above overlay */
.testimonials-section.has-bg > *,
.contact-section.has-bg > * {
  position: relative;
  z-index: 2;
}

/* Text colors adjust when bg is active */
.testimonials-section.has-bg,
.contact-section.has-bg {
  color: #fff;
}

.testimonials-section.has-bg .text-blue,
.contact-section.has-bg .text-blue {
  color: #c6a15b;
}

.testimonials-section.has-bg .text-slate-500,
.testimonials-section.has-bg .text-slate-600,
.testimonials-section.has-bg .text-slate-800,
.contact-section.has-bg .text-slate-500,
.contact-section.has-bg .text-slate-600,
.contact-section.has-bg .text-slate-400 {
  color: rgba(255, 255, 255, 0.85);
}

.testimonials-section.has-bg .bg-white,
.contact-section.has-bg .bg-white {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Mobile — remove fixed attachment (breaks on mobile) */
@media (max-width: 768px) {
  .testimonials-section.has-bg,
  .contact-section.has-bg {
    background-attachment: scroll;
  }
}

/* Cream overlay → dark text */
.testimonials-section.has-bg[data-overlay="cream"],
.contact-section.has-bg[data-overlay="cream"] {
  color: #1a1a1a;
}

.testimonials-section.has-bg[data-overlay="cream"] .text-blue,
.contact-section.has-bg[data-overlay="cream"] .text-blue {
  color: #1a4b8c;
}

.testimonials-section.has-bg[data-overlay="cream"] .text-slate-500,
.testimonials-section.has-bg[data-overlay="cream"] .text-slate-600,
.testimonials-section.has-bg[data-overlay="cream"] .text-slate-800,
.contact-section.has-bg[data-overlay="cream"] .text-slate-500,
.contact-section.has-bg[data-overlay="cream"] .text-slate-600,
.contact-section.has-bg[data-overlay="cream"] .text-slate-400 {
  color: #4a5568;
}

/* ============================================================
   23. ADMIN — DRAG TO REORDER
   ============================================================ */

.drag-cell {
  width: 40px;
  text-align: center;
  cursor: grab;
  user-select: none;
  color: #94a3b8;
  transition: color 0.2s;
}

.drag-cell:active {
  cursor: grabbing;
}

.drag-cell:hover {
  color: #1a4b8c;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.drag-cell:hover .drag-handle {
  background: rgba(26, 75, 140, 0.08);
}

/* Dragging state */
tr.sortable-ghost {
  opacity: 0.4;
  background: #faf8f5;
}

tr.sortable-chosen {
  background: #fff;
  box-shadow: 0 10px 30px rgba(26, 75, 140, 0.2);
  transform: scale(1.02);
}

tr.sortable-drag {
  opacity: 0.95;
}

/* Saved toast */
.reorder-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #2e7d32, #43a047);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reorder-toast.show {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .drag-cell {
    display: flex !important;
    justify-content: center;
    padding: 0.5rem 0 !important;
    min-height: 44px;
  }
}

/* ============================================================
   24. PAGE LOADER
   ============================================================ */

.page-loader {
  position: fixed;
  inset: 0;
  background: #faf8f5;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-loader.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-content {
  text-align: center;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(26, 75, 140, 0.15);
  border-top-color: #1a4b8c;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: 'Syne', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a4b8c;
  letter-spacing: -0.5px;
}

.loader-text span {
  color: #c6a15b;
}

/* ============================================================
   25. TOP NAVIGATION
   ============================================================ */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 75, 140, 0.06);
  transition: all 0.3s ease;
}

.top-nav.scrolled {
  background: rgba(250, 248, 245, 0.98);
  box-shadow: 0 4px 20px rgba(26, 75, 140, 0.06);
}

.top-nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.top-nav-logo {
  text-decoration: none;
  flex-shrink: 0;
}

.top-nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.top-nav-menu a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.25s ease;
  padding: 6px 0;
}

.top-nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #c6a15b;
  transition: width 0.3s ease;
}

.top-nav-menu a:hover,
.top-nav-menu a.active {
  color: #1a4b8c;
}

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

.top-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: linear-gradient(135deg, #1a4b8c, #3a7bd5);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 75, 140, 0.2);
  flex-shrink: 0;
}

.top-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 75, 140, 0.35);
}

.top-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.top-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a4b8c;
  transition: all 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #faf8f5;
  border-top: 1px solid rgba(26, 75, 140, 0.06);
  box-shadow: 0 10px 30px rgba(26, 75, 140, 0.1);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 20px 24px;
}

.mobile-menu li {
  margin-bottom: 8px;
}

.mobile-menu a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.mobile-menu a:hover {
  background: rgba(26, 75, 140, 0.06);
  color: #1a4b8c;
}

/* Push content below nav */
body {
  padding-top: 76px;
}

@media (max-width: 900px) {
  .top-nav-menu,
  .top-nav-cta {
    display: none;
  }

  .top-nav-toggle {
    display: flex;
  }

  .top-nav-inner {
    padding: 14px 20px;
  }

  body {
    padding-top: 64px;
  }
}

/* ============================================================
   26. SPA PAGE SYSTEM
   ============================================================ */

.spa-page {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.spa-page.active {
  display: block;
  opacity: 1;
}

/* Remove old side nav dots when in SPA mode */
body.spa-mode #floating-menu {
  display: none;
}
