/* ==========================================================================
   FIRST FRONT SOLAR ENERGY — COMPREHENSIVE RESPONSIVE FIXES
   Preserves desktop design identity; fixes mobile/tablet only
   ========================================================================== */

/* --------------------------------------------------------------------------
   GLOBAL — Prevent horizontal overflow at root level
   -------------------------------------------------------------------------- */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: #04141F !important;
}

/* Hide visual scrollbars while preserving touch swipe */
::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

* {
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

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

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

.contact-map-fullwidth iframe,
.contact-map-wrapper iframe {
  height: 580px !important;
  min-height: 580px !important;
  width: 100% !important;
}

/* --------------------------------------------------------------------------
   1–5. MOBILE HEADER & NAVIGATION
   -------------------------------------------------------------------------- */

/* Body lock when menu open — JS handles position/scroll save */
body.menu-open,
body.nav-open {
  overflow: hidden;
}

/* Mobile responsive logo height — exactly 54px */
@media (max-width: 768px) {
  .brand-logo-img {
    height: 54px !important;
    max-height: 54px !important;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    padding-bottom: 6px !important;
  }
}

/* Tablet: larger logo */
@media (min-width: 769px) and (max-width: 1024px) {
  .brand-logo-img {
    height: 68px !important;
    max-width: 220px;
    width: auto;
    object-fit: contain;
  }
}

/* Mobile nav panel — full-height, scrollable, no white gaps */
@media (max-width: 768px) {
  .site-header-wrapper {
    padding-top: 0;
  }

  .site-header {
    top: 0 !important;
    height: 76px !important;
    padding: 0.35rem 0 !important;
  }

  .site-header.scrolled {
    top: 0 !important;
    height: 66px !important;
  }

  .site-header.scrolled .brand-logo-img {
    height: 48px !important;
    max-height: 48px !important;
  }

  .brand-logo {
    padding-left: 16px;
  }

  /* Compact hamburger — logo remains visually dominant */
  .mobile-nav-toggle {
    width: 38px;
    height: 32px;
    padding: 6px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #FFFFFF;
    transition: all 0.3s ease;
  }

  .mobile-nav-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .mobile-nav-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .mobile-nav-toggle.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Mobile nav panel styling lives in header-footer.css (navy theme).
     Only safe-area padding refinement needed here: */
  .main-nav {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
  }

  /* CONTACT BLOCK — flows naturally below navigation links */
  .mobile-nav-contact-block {
    margin-top: 1rem !important;
  }
}

/* --------------------------------------------------------------------------
   6. STATISTICS — Responsive grid with consistent card heights
   -------------------------------------------------------------------------- */
/* Desktop: 4-column */
.stats-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* Tablet: 2-column */
@media (max-width: 1199px) {
  .stats-bar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* Mobile: single column cards, stacked vertically */
@media (max-width: 768px) {
  .stats-bar-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  .stats-bar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
  }

  .stats-bar-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .stats-bar-icon svg {
    width: 20px;
    height: 20px;
  }
  .stats-bar-number {
    font-size: clamp(1.3rem, 6vw, 1.75rem);
  }
  .stats-bar-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-bar-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .stats-bar-item {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  .stats-bar-icon {
    width: 40px;
    height: 40px;
  }
}

/* --------------------------------------------------------------------------
   7. FULLSCREEN VIDEO BACKGROUND — true cover on all viewports
   -------------------------------------------------------------------------- */
.fullscreen-video-cta-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.fullscreen-video-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.video-bg-iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 400vw !important;
  height: 400vh !important;
  min-width: 300vmax !important;
  min-height: 300vmax !important;
  border: none !important;
  filter: brightness(0.72) contrast(1.15) !important;
  pointer-events: none !important;
}

.video-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(6, 29, 42, 0.58) 0%,
    rgba(7, 95, 148, 0.38) 100%
  );
  z-index: 2;
}

.fullscreen-cta-body {
  position: relative;
  z-index: 3;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem clamp(2rem, 4vw, 3.5rem);
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

/* --------------------------------------------------------------------------
   8. WHY CHOOSE US — Mobile accordion (master-detail → stacked)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .why-master-detail-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .why-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(242, 162, 11, 0.2);
  }

  .why-nav-item {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid rgba(242, 162, 11, 0.15);
    border-radius: 0;
    padding: 1rem 1.25rem;
    text-align: left;
    justify-content: space-between;
    background: transparent;
    transition: background 0.2s ease, padding-left 0.2s ease;
  }

  .why-nav-item {
    background: var(--color-brand-navy-deep);
    color: #E2E8F0;
  }

  .why-nav-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-brand-gold);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
  }

  .why-nav-item span:last-child {
    color: #CBD5E1;
  }

  .why-nav-item.is-active {
    background: var(--color-brand-gold);
    color: var(--color-brand-navy-deep);
    padding-left: 1.5rem;
    border-bottom-color: var(--color-brand-gold);
    transform: none;
  }

  .why-nav-item.is-active .why-nav-num {
    background: var(--color-brand-navy-deep);
    border-color: var(--color-brand-navy-deep);
    color: #FFFFFF;
  }

  .why-nav-item.is-active span:last-child {
    color: var(--color-brand-navy-deep);
    font-weight: 700;
  }

  .why-nav-item.is-active::after {
    color: var(--color-brand-navy-deep);
  }

  .why-nav-item:hover:not(.is-active) {
    background: rgba(242, 162, 11, 0.12);
  }

  .why-detail-panel {
    background: var(--color-brand-navy-deep);
    color: #CBD5E1;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .why-detail-body h3 {
    color: #FFFFFF;
  }

  .why-detail-body p {
    color: #CBD5E1;
  }

  .why-detail-media {
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .why-nav-item::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-brand-gold);
    transition: transform 0.3s ease;
  }

  .why-nav-item.is-active::after {
    transform: rotate(45deg);
  }

  .why-detail-panel {
    position: static;
    margin-top: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 1.25rem;
  }

  .why-detail-panel.is-active {
    max-height: 500px;
    opacity: 1;
    padding: 1.5rem 1.25rem 2rem;
  }

  .why-detail-media {
    height: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .why-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .why-detail-body {
    padding: 1rem 0.5rem 0;
  }

  .why-detail-body h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
  }
}

/* Desktop: restore original master-detail */
@media (min-width: 1025px) {
  .why-nav-item::after { display: none; }
  .why-detail-panel { max-height: none; opacity: 1; padding: 0; }
}

/* -------------------------------------------------------------------------- 
   9. OUR EXPERTISE / SERVICES — Mobile accordion rows
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .services-showcase-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .services-tab-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  .service-tab-item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.85rem 1.25rem;
    text-align: left;
    background: var(--color-brand-navy-deep);
    color: #CBD5E1;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
  }

  .service-tab-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #CBD5E1;
    flex: 1;
    order: 1;
  }

  .service-tab-num {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-brand-gold);
    order: 2;
    flex-shrink: 0;
  }

  /* Chevron icon via pseudo-element */
  .service-tab-item::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-brand-gold);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    order: 3;
  }

  .service-tab-item.is-active::after {
    content: '×';
  }

  .service-tab-item:hover,
  .service-tab-item.is-active {
    background: var(--color-brand-gold);
    transform: none;
    border-bottom-color: var(--color-brand-gold);
  }

  .service-tab-item.is-active .service-tab-title {
    color: var(--color-brand-navy-deep);
    font-weight: 700;
  }

  .service-tab-item.is-active .service-tab-num {
    color: var(--color-brand-navy-deep);
  }

  .service-tab-item.is-active::after {
    color: var(--color-brand-navy-deep);
  }

  .service-tab-item:hover:not(.is-active) {
    background: rgba(242, 162, 11, 0.12);
    border-bottom-color: rgba(242, 162, 11, 0.2);
  }

  /* Detail panel — shared showcase display below tabs */
  .service-showcase-display {
    width: 100%;
    background: var(--color-brand-navy-deep);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    margin-bottom: 1.5rem;
  }

  .service-showcase-image-wrapper {
    height: 200px;
    border-radius: 0;
    overflow: hidden;
  }

  .service-showcase-content {
    padding: 1.25rem 1.5rem 1.5rem;
    background: var(--color-brand-navy-deep);
  }

  .service-showcase-content h3 {
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    color: #FFFFFF;
  }

  .service-showcase-content [id="serviceShowcaseSubhead"] {
    color: var(--color-brand-gold) !important;
  }

  .service-showcase-content [id="serviceShowcaseDesc"] {
    color: #CBD5E1 !important;
  }

  .service-showcase-content .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .service-showcase-content .btn:last-child {
    margin-bottom: 0;
  }

  /* Dark section header override for expertise */
  .services-section .section-header h2 {
    color: var(--color-brand-navy-deep) !important;
  }
}

@media (max-width: 480px) {
  .service-tab-item {
    padding: 0.75rem 1rem;
  }

  .service-tab-title {
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   10. ENGINEERING FLOW — Mobile vertical timeline
   -------------------------------------------------------------------------- */
.engineering-flow-section [style*="grid-template-columns"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .engineering-flow-section [style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .engineering-flow-section [style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column;
    gap: 1.25rem;
  }

  .engineering-flow-section [style*="grid-template-columns"] > div {
    width: 100%;
    padding: 1.5rem;
    position: relative;
  }

  /* Add connecting line between cards on mobile */
  .engineering-flow-section [style*="grid-template-columns"] > div:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -0.625rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 1.25rem;
    background: linear-gradient(180deg, var(--color-brand-gold), transparent);
    border-radius: 1px;
  }
}

/* --------------------------------------------------------------------------
   11. HOW WE WORK (Process Section) — Mobile vertical timeline
   -------------------------------------------------------------------------- */
.process-section .process-timeline-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .process-section .process-timeline-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .process-section .process-timeline-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
  }

  .process-section .process-timeline-wrapper > div {
    width: 100%;
    padding: 1.25rem;
    position: relative;
  }

  .process-section .process-timeline-wrapper > div:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 3.5rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--color-brand-gold), transparent);
    border-radius: 1px;
  }

  .process-section .process-timeline-wrapper > div > div:first-child {
    font-size: 1.25rem;
  }

  .process-section .process-timeline-wrapper h3 {
    font-size: 1rem;
  }

  .process-section .process-timeline-wrapper p {
    font-size: 0.825rem;
  }
}

/* --------------------------------------------------------------------------
   12. ICONIC PROJECTS & TESTIMONIALS SLIDERS
   -------------------------------------------------------------------------- */
.projects-slider-viewport,
.testimonials-carousel-viewport {
  width: 100% !important;
  overflow: hidden !important;
}

  .project-item-card .project-card-logo-circle {
    width: 56px;
    height: 56px;
  }
}

/* -------------------------------------------------------------------------- 
   13. AWARDS SECTION — Responsive grid (override inline styles with !important)
   -------------------------------------------------------------------------- */
.awards-section [style*="grid-template-columns"] {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .awards-section [style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .awards-section [style*="grid-template-columns"] > div {
    padding: 1.75rem 1.25rem !important;
    border-radius: var(--radius-lg) !important;
  }

  .awards-section [style*="grid-template-columns"] > div:first-child img {
    width: 140px;
    height: 140px;
    right: -10px;
    bottom: -10px;
    opacity: 0.12;
  }

  .awards-section [style*="grid-template-columns"] > div:first-child h3 {
    font-size: clamp(1.35rem, 5vw, 1.6rem);
    line-height: 1.25;
  }

  .awards-section [style*="grid-template-columns"] > div:first-child > div > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .awards-section h3 {
    font-size: clamp(1.35rem, 5vw, 1.6rem);
  }
}

/* -------------------------------------------------------------------------- 
   14. BLOG / INSIGHTS — Stack vertically on mobile (1 at a time, no slider)
   -------------------------------------------------------------------------- */
.blogs-section [style*="grid-template-columns"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .blogs-section [style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blogs-section [style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin: 0;
  }

  .blogs-section [style*="grid-template-columns"] > article {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scroll-snap-align: none;
  }
}

/* -------------------------------------------------------------------------- 
   15. TESTIMONIALS + PROJECTS — Arrows on mobile, no scrollbar, no dots
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   16. RESPONSIVE BUTTONS — Full width on mobile, flex-wrap groups
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero-cta-group,
  .btn-group,
  [style*="display: flex"][style*="justify-content: center"] {
    flex-direction: column !important;
    width: 100%;
    gap: 0.75rem !important;
  }

  .hero-cta-group .btn,
  .btn-group .btn,
  [style*="display: flex"][style*="justify-content: center"] .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Remove white-space: nowrap on mobile for buttons */
  .btn {
    white-space: normal;
    word-break: keep-all;
  }
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE HEADINGS — clamp() for fluid typography
   -------------------------------------------------------------------------- */
.section-header h2 {
  font-size: clamp(1.75rem, 5.5vw, 2.6rem) !important;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
}

.section-header p {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

/* Hero title */
.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem) !important;
  line-height: 1.15;
}

/* Why Choose detail title */
.why-detail-body h3,
#whyDetailTitle {
  font-size: clamp(1.25rem, 4vw, 1.65rem) !important;
}

/* Service showcase title */
.service-showcase-content h3,
#serviceShowcaseTitle {
  font-size: clamp(1.25rem, 4vw, 1.65rem) !important;
}

/* Engineering flow cards */
.engineering-flow-section h3 {
  font-size: clamp(1.1rem, 3.5vw, 1.25rem) !important;
}

/* How we work cards */
.process-section h3 {
  font-size: clamp(1rem, 3vw, 1.05rem) !important;
}

/* Project cards */
.project-item-title {
  font-size: clamp(1rem, 3vw, 1.15rem) !important;
}

/* Blog cards */
.blogs-section h3 {
  font-size: clamp(1.05rem, 3.5vw, 1.15rem) !important;
}

/* --------------------------------------------------------------------------
   17. SECTION PADDING — Reduced on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section[style*="padding: 5.5rem"],
  .section[style*="padding: 5rem"],
  .section[style*="padding: 6rem"] {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
}

@media (max-width: 480px) {
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .section[style*="padding: 5.5rem"],
  .section[style*="padding: 5rem"],
  .section[style*="padding: 6rem"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

/* --------------------------------------------------------------------------
   18. IMAGES — Proper responsive behavior
   -------------------------------------------------------------------------- */
.about-visual-card img,
.service-showcase-image-wrapper img,
.why-detail-media img,
.project-item-card img,
.blogs-section article img,
.awards-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Certificates / logos — contain */
.awards-section [style*="award-badge"] {
  object-fit: contain !important;
}

/* --------------------------------------------------------------------------
   19. SPECIFIC OVERFLOW FIXES — Targeted, not blanket
   -------------------------------------------------------------------------- */

/* Hero grid on mobile */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding-top: 1rem;
  }

  .hero-right-card-wrapper {
    order: -1;
    height: auto;
    min-height: 300px;
  }

  .hero-glass-stats-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* About grid on mobile */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .about-visual-card {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Contact grid on mobile */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* Form grid on mobile */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Footer on mobile */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
  }

  .footer-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .footer-brand a {
    display: inline-block !important;
    margin: 0 auto !important;
  }

  .footer-brand img {
    display: block !important;
    margin: 0 auto !important;
  }

  .footer-brand p {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .footer-heading::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .footer-brand .social-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   20. FLOATING ELEMENTS — Mobile positioning
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .back-to-top-btn {
    bottom: 4.5rem !important;
    right: 1.25rem !important;
    width: 44px;
    height: 44px;
  }

  .back-to-top-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* --------------------------------------------------------------------------
   21. ACCESSIBILITY — Preserve and enhance
   -------------------------------------------------------------------------- */

/* Focus visible for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-brand-gold);
  outline-offset: 2px;
}

/* Mobile menu focus trap handled in JS */

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

/* --------------------------------------------------------------------------
   22. HIGH DPI / RETINA — Crisp assets
   -------------------------------------------------------------------------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .brand-logo-img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* --------------------------------------------------------------------------
   23. CONTAINER — Consistent max-width
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* --------------------------------------------------------------------------
   24. UTILITY CLASSES FOR JS SLIDERS
   -------------------------------------------------------------------------- */
.slider-container {
  overflow: hidden;
  width: 100%;
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slider-slide {
  flex: 0 0 100%;
  min-width: 0;
}

/* Desktop: 3 slides */
@media (min-width: 1025px) {
  .slider-slide {
    flex-basis: calc(100% / 3);
  }
}

/* Tablet: 2 slides */
@media (min-width: 769px) and (max-width: 1024px) {
  .slider-slide {
    flex-basis: calc(100% / 2);
  }
}

/* Mobile: 1 slide */
@media (max-width: 768px) {
  .slider-slide {
    flex-basis: 100%;
  }
}

/* --------------------------------------------------------------------------
   25. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .mobile-nav-toggle,
  .main-nav,
  .whatsapp-float,
  .back-to-top-btn,
  .video-popup-modal,
  .tech-modal-overlay,
  .hero-slider-controls,
  .projects-slider-arrow,
  .projects-slider-dots {
    display: none !important;
  }

  .hero-slide {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: auto !important;
    page-break-inside: avoid;
  }

  .fullscreen-video-wrapper {
    display: none;
  }

  body {
    overflow: visible;
    position: static;
  }
}
