/* Ensure anchor scroprimaryll does not hide content behind sticky header */
section[id],
article[id],
#gallery,
#about,
#contact,
#safety,
#elevators,
#home,
#commercial-elevators,
#home-elevators,
#panoramic-elevators,
#hospital-elevators,
#goods-car-parking-elevators,
#dumb-waiters {
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  section[id],
  article[id],
  #gallery,
  #about,
  #contact,
  #safety,
  #elevators,
  #home,
  #commercial-elevators,
  #home-elevators,
  #panoramic-elevators,
  #hospital-elevators,
  #goods-car-parking-elevators,
  #dumb-waiters {
    scroll-margin-top: 70px;
  }
}
:root {
  --color-primary: #c6922e;
  --color-primary-dark: #a3771d;
  --color-bg: #f7f7f9;
  --color-bg-alt: #ffffff;
  --color-accent: #16324f;
  --color-text: #222222;
  --color-muted: #666666;
  --radius-card: 12px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.14);
  --container-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#topbar {
  background-color: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

#topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

#topbar .social-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

#topbar .social-icons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

#topbar .social-icons img {
  width: 24px;
  height: 24px;
}

#topbar .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #16324f;
  background-color: rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

#topbar .social-links a img {
  width: 16px;
  height: 16px;
  display: block;
}

#topbar .social-links a:hover {
  background-color: rgba(0, 0, 0, 0.12);
}

#topbar .contact-info {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  font-weight: 400;
}

#topbar .contact-info a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

#topbar .contact-info a img {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  gap: 1.25rem;
}

body {
  transition: opacity 0.2s ease;
}

body.language-switching {
  opacity: 0.8;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--color-accent);
}

.logo img {
  height: 60px;
  width: 250px;
}

.main-nav {
  position: relative;
}

.lang-switcher {
  display: flex;
  align-items: center;
}

#topbar .contact-info {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  font-weight: 400;
}

#topbar .contact-info a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  #topbar .container {
    flex-wrap: wrap;
    justify-content: center;
  }

  #topbar .contact-info {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }

  #topbar .contact-info a {
    min-width: 0;
    font-size: 0.8rem;
    white-space: normal;
  }

  #topbar .contact-info a b {
    overflow-wrap: anywhere;
  }
}

.lang-switcher select {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  background-color: #ffffff;
  color: var(--color-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a,
.nav-dropdown-toggle {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: bold;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-list a:hover,
.nav-dropdown-toggle:hover {
  color: var(--color-primary);
}

.nav-item-dropdown {
  position: relative;
}

.nav-submenu {
  position: absolute;
  top: 140%;
  right: 0;
  min-width: 220px;
  padding: 0.75rem 0;
  border-radius: 0.75rem;
  background-color: var(--color-bg);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  list-style: none;
  margin: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  z-index: 100;
}

.nav-submenu a {
  font-weight: bold;
  font-size: 0.9rem;
}
/* Make dropdown font match primary nav links */
.nav-submenu a {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-accent);
  font-weight: 700;
}

.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown.open .nav-submenu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.nav-submenu li {
  padding: 0.35rem 1rem;
}

.nav-submenu a {
  display: block;
}

/* WhatsApp floating button and Back-to-top styling */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 90px;
  width: 48px;
  height: 48px;
  background-color: #25d366;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  z-index: 9999;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  z-index: 9998;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 520px) {
  .whatsapp-float {
    right: 16px;
    bottom: 84px;
  }
  .back-to-top {
    right: 16px;
    bottom: 18px;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.22rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background-color: var(--color-bg);
  border-radius: 999px;
}

.hero {
  padding: 4.5rem 0 4rem;
  background: radial-gradient(
    circle at top left,
    #f4eee3 0,
    #f7f7f9 40%,
    #f7f7f9 100%
  );
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  margin: 0 0 0.75rem;
  color: var(--color-accent);
}

.hero-accent {
  display: block;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.hero-content p {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(
    120deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.25);
}

.btn-secondary {
  background-color: rgba(22, 50, 79, 0.04);
  color: var(--color-accent);
  border-color: rgba(22, 50, 79, 0.18);
}

.btn-secondary:hover {
  background-color: rgba(22, 50, 79, 0.1);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero-media {
  display: flex;
  justify-content: flex-end;
}

.hero-illustration {
  width: 100%;
  max-width: 420px;
  height: 460px;
  border-radius: 28px;
  background: linear-gradient(160deg, #141e30, #243b55);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.hero-glass-elevator {
  position: absolute;
  inset: 8%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.hero-glass-elevator img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hero-overlay-card {
  position: absolute;
  left: 10%;
  bottom: 9%;
  padding: 0.6rem 0.9rem;
  border-radius: 16px;
  background-color: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 0.75rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.hero-overlay-card p {
  margin: 0;
}

.hero-overlay-card p + p {
  opacity: 0.8;
}

.section {
  padding: 3.5rem 0;
}

.section-light {
  background-color: var(--color-bg-alt);
}

.section-accent {
  background: radial-gradient(circle at top left, #f1e4cf, #e4edf6);
}

.section-contact {
  background-color: #f4f6fb;
}

.section-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.section-header.align-left {
  text-align: left;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
  color: var(--color-accent);
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
  max-width: 36rem;
  margin-inline: auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radius-card);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: justify;
}

.mrl-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.mrl-text p {
  margin-top: 0;
  color: var(--color-muted);
}

.feature-list {
  padding-left: 1.1rem;
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.feature-list li {
  margin-bottom: 0.4rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.spec-table th,
.spec-table td {
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.95rem 1rem;
  text-align: left;
  font-size: 0.95rem;
}

.spec-table th {
  background-color: rgba(198, 146, 46, 0.08);
  color: var(--color-primary);
  font-weight: 700;
}

.certification-block {
  margin: 1.5rem 0 0;
}

.certification-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background-color: #fff8e2;
  border: 1px solid rgba(198, 146, 46, 0.3);
  color: #814b08;
  font-size: 0.92rem;
  font-weight: 600;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 1.8rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.testimonial-card p {
  color: var(--color-muted);
  line-height: 1.7;
}

.testimonial-card footer {
  margin-top: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

.mrl-visual {
  min-height: 260px;
}

.mrl-visual img {
  width: 100%;
  height: auto;
  max-height: 390px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.mrl-diagram {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.1)
  );
  backdrop-filter: blur(10px);
}

.safety-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.safety-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
}

.safety-list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--color-primary);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  border-radius: 12px;
  border: 2px solid rgba(198, 146, 46, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(248, 248, 248, 0.9)
  );
  background-size: cover;
  background-position: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 150px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease,
    background-color 0.3s ease;
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-3px);
  color: white;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.18);
  z-index: 100;
  text-decoration: none;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    opacity 200ms ease;
}
.whatsapp-float svg {
  width: 22px;
  height: 22px;
}
.whatsapp-float:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(37, 211, 102, 0.22);
}

/* Ensure back-to-top sits above whatsapp on larger screens */
.back-to-top {
  z-index: 110;
}

@media (max-width: 520px) {
  /* On small screens, move back-to-top above whatsapp */
  .back-to-top {
    right: 86px;
    bottom: 20px;
  }
  .whatsapp-float {
    right: 20px;
    bottom: 20px;
  }
}

/* Footer tweaks for new paragraph layout */
.footer-company {
  margin: 0;
  font-weight: 600;
}

.filter-btn span {
  position: relative;
  z-index: 1;
  display: block;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(198, 146, 46, 0.2);
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: var(--color-accent);
  color: #16324f;
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(198, 146, 46, 0.4);
}

.filter-btn.active::before {
  opacity: 0.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.gallery-item {
  background-color: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  color: var(--color-muted);
  transform: translateY(0) scale(1);
  transition:
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 360ms ease,
    border-color 360ms ease;
  animation: gallery-rise 700ms both;
}

.gallery-item:nth-child(2) {
  animation-delay: 80ms;
}
.gallery-item:nth-child(3) {
  animation-delay: 160ms;
}
.gallery-item:nth-child(4) {
  animation-delay: 240ms;
}
.gallery-item:nth-child(5) {
  animation-delay: 320ms;
}
.gallery-item:nth-child(6) {
  animation-delay: 400ms;
}

.gallery-item:hover,
.gallery-item.is-featured {
  transform: translateY(-8px) scale(1.015);
  border-color: var(--color-primary);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.18);
}

.gallery-image {
  width: 100%;
  height: 220px;
  aspect-ratio: auto;
  object-fit: contain;
  background-color: #f7f7f9;
  padding: 0.35rem;
  transition:
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 400ms ease;
}

.gallery-item:hover .gallery-image,
.gallery-item.is-featured .gallery-image {
  transform: scale(1.06);
  filter: saturate(1.1);
}

@keyframes gallery-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-placeholder {
  height: 140px;
  background: linear-gradient(135deg, #d4d4d8, #e4e4e7);
}

.gallery-item figcaption {
  padding: 0.75rem 0.9rem 0.9rem;
}

.gallery-preview {
  display: none;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 1rem;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(180deg, #fff, #fafafa);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  position: relative;
  z-index: 1;
  transition:
    transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 260ms ease;
}

.gallery-preview.visible {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.gallery-preview-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform-origin: left;
  background: var(--color-primary);
  animation: gallery-progress 4.2s linear infinite;
}

@keyframes gallery-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.gallery-preview figure {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.gallery-preview-image {
  width: 100%;
  max-width: 60%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0.75rem;
}

.gallery-preview-caption {
  padding: 0;
  font-size: 1rem;
  color: var(--color-accent);
  text-align: left;
  font-weight: 500;
  flex: 1;
}

.gallery-preview-close {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #444;
  padding: 0.75rem;
}

.gallery-preview.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.filter-highlighter {
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(
    90deg,
    var(--color-primary, #c6922e),
    #c6922e 80%
  );
  border-radius: 2px;
  transition:
    transform 280ms cubic-bezier(0.22, 0.9, 0.27, 1),
    width 280ms ease,
    opacity 200ms ease;
  transform: translateX(0);
  opacity: 0;
  will-change: transform, width;
}

.gallery-filters {
  position: relative;
}

.filter-btn {
  position: relative;
  z-index: 1;
}

.filter-btn.active {
  color: var(--color-primary, #c6922e);
}

/* Preview animation and filter highlighter */
.gallery-filters {
  position: relative;
}
.filter-highlighter {
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(
    90deg,
    var(--color-primary, #c6922e),
    #c6922e 80%
  );
  border-radius: 2px;
  transition:
    transform 280ms cubic-bezier(0.22, 0.9, 0.27, 1),
    width 280ms ease,
    opacity 200ms ease;
  transform: translateX(0);
  opacity: 0;
  will-change: transform, width;
}
.filter-btn {
  position: relative;
  z-index: 1;
}
.filter-btn.active {
  color: var(--color-primary, #c6922e);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-preview {
    flex-direction: column;
    align-items: stretch;
  }
  .gallery-preview-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .filter-btn {
    min-width: 84px;
    padding: 0.8rem 0.9rem;
  }
  .filter-highlighter {
    bottom: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-image,
  .gallery-preview,
  .gallery-preview-progress {
    animation: none;
    transition: none;
  }
}

/* Gallery category controls and carousel preview */
.gallery-filters {
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.filter-btn {
  min-width: auto;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.gallery-preview {
  min-height: 430px;
  margin: 0 0 1.25rem;
  padding: 0;
  border-radius: 16px;
  border-color: rgba(198, 146, 46, 0.38);
  background: #111827;
}

.gallery-preview figure {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 16px;
}

.gallery-preview figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 15, 24, 0.7), transparent 62%),
    linear-gradient(0deg, rgba(8, 15, 24, 0.6), transparent 45%);
}

.gallery-preview-image {
  display: block;
  width: 100%;
  max-width: none;
  height: 430px;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
  animation: gallery-carousel-zoom 4.2s ease-out both;
}

.gallery-preview-caption {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  bottom: 2rem;
  z-index: 2;
  max-width: 70%;
  padding: 0;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-weight: 700;
  text-align: left;
}

.gallery-preview-progress {
  z-index: 3;
  height: 4px;
}

.gallery-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.gallery-item {
  border-radius: 10px;
  cursor: pointer;
}

.gallery-item figcaption {
  padding: 0.55rem 0.65rem 0.65rem;
  font-size: 0.72rem;
}

@keyframes gallery-carousel-zoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .gallery-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .filter-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0.55rem 0.8rem;
  }

  .gallery-preview,
  .gallery-preview figure,
  .gallery-preview-image {
    min-height: 300px;
    height: 300px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Four-up gallery row with right-to-left category transitions */
.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  overflow: hidden;
}

.gallery-grid .gallery-item {
  min-width: 0;
  animation: none;
}

.gallery-grid.is-scrolling .gallery-item {
  animation: gallery-card-enter 620ms cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(2) {
  animation-delay: 70ms;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(3) {
  animation-delay: 140ms;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(4) {
  animation-delay: 210ms;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(5) {
  animation-delay: 280ms;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(6) {
  animation-delay: 350ms;
}

.gallery-grid.is-scrolling .gallery-item:nth-child(7) {
  animation-delay: 420ms;
}

@keyframes gallery-card-enter {
  from {
    opacity: 0;
    transform: translateX(72px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-grid.is-scrolling .gallery-item {
    animation: none;
  }
}

.showcase-section {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.showcase-frame {
  width: 1200px;
  height: 350px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(244, 246, 248, 0.95)
  );
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.showcase-card {
  width: 220px;
  height: 310px;
  margin-left: -90px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background-color: white;
  transition:
    transform 0.32s ease-in-out,
    box-shadow 0.32s ease-in-out,
    z-index 0.32s ease-in-out;
  transform-origin: center center;
}

.showcase-card:first-child {
  margin-left: 0;
}

.showcase-card:nth-child(1) {
  z-index: 1;
}

.showcase-card:nth-child(2) {
  z-index: 2;
}

.showcase-card:nth-child(3) {
  z-index: 3;
}

.showcase-card:nth-child(4) {
  z-index: 2;
}

.showcase-card:nth-child(5) {
  z-index: 1;
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease-in-out;
}

.showcase-card:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 30px 72px rgba(15, 23, 42, 0.22);
}

.showcase-card:hover img {
  transform: scale(1.06);
}

.contact-details h3 {
  margin: 0 0 0.5rem;
  color: var(--color-accent);
}

.contact-details p {
  margin: 0 0 0.6rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.contact-form {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.form-row {
  margin-bottom: 0.9rem;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(198, 146, 46, 0.3);
}

.field-error {
  margin: 0.18rem 0 0;
  min-height: 0.9rem;
  font-size: 0.75rem;
  color: #b91c1c;
}

.form-status {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--color-primary);
}

/* Map Container Styles */
.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.location-map {
  height: 300px;
  margin-top: 1.25rem;
}

.location-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

#mithra-map {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

/* Footer Styles */
.site-footer {
  background-color: var(--color-accent);
  color: #ffffff;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto;
  gap: 2rem;
  align-items: start;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  width: 100%;
}

.footer-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.6rem;
}

.footer-section a {
  color: #242323;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #b0b0b0;
}

/* Performance: Reduce Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile-First Responsive Optimization */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 250px;
  }

  .location-map {
    height: 250px;
  }

  #mithra-map {
    min-height: 250px;
  }
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background-color: #ffffff;
}

.footer-inner {
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    justify-content: center;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .mrl-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    right: 1rem;
    top: 120%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    background-color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    min-width: 210px;
    display: none;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-item-dropdown:hover .nav-submenu {
    display: none;
  }

  .nav-submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding-top: 0.25rem;
    display: none;
  }

  .nav-item-dropdown.open .nav-submenu {
    display: block;
  }

  .nav-submenu li {
    padding-inline: 0;
  }

  .hero {
    padding-top: 4rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
