:root {
  --bg: #adb5bd;
  --surface: #d8dde2;
  --surface-elevated: #e1e5e9;
  --ink: #11171e;
  --ink-soft: #3f4a57;
  --line: #bcc4cc;
  --brand: #add934;
  --brand-deep: #7f9f22;
  --deep-blue: #070f19;
  --deep-blue-2: #0b1623;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(8, 14, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Urbanist", sans-serif;
  color: var(--ink);
  font-size: 1rem;
  background:
    radial-gradient(circle at 12% -18%, rgba(255, 255, 255, 0.38) 0%, transparent 34%),
    radial-gradient(circle at 88% -22%, rgba(255, 255, 255, 0.26) 0%, transparent 32%),
    linear-gradient(180deg, #c0c7ce 0%, #aeb6be 52%, #a5afb8 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(17, 19, 22, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 22, 0.1) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, black 0, transparent 85%);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(173, 217, 52, 0.8), #add934);
}

main,
.topbar-wrap,
.site-footer-inner {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.topbar-wrap {
  position: sticky;
  top: 10px;
  z-index: 90;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.floating-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.floating-logo img {
  width: 108px;
  height: auto;
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--deep-blue);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(4, 8, 14, 0.42),
    0 0 0 1px rgba(7, 15, 25, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #f4f8ff;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px;
  border-radius: 12px;
  border: 1px solid rgba(17, 19, 22, 0.2);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.topbar.is-solid nav {
  background: linear-gradient(170deg, rgba(7, 15, 25, 0.94), rgba(11, 22, 35, 0.95));
  border-color: rgba(173, 217, 52, 0.28);
  box-shadow: 0 12px 26px rgba(2, 5, 10, 0.38);
}

.topbar nav a {
  text-decoration: none;
  color: #151b22;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 9px 11px;
  border-radius: 9px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.topbar.is-solid nav a {
  color: #eef4fb;
}

.topbar nav a:hover {
  background: rgba(173, 217, 52, 0.14);
}

.topbar nav a.active {
  background: var(--brand);
  color: #121510;
}

main {
  padding-bottom: 80px;
}

.page-hero {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
}

.page-hero.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.page-hero-text {
  padding: clamp(24px, 4vw, 46px);
}

.page-hero-text h1 {
  margin-top: 12px;
  max-width: 12.5ch;
}

.page-hero-text p {
  max-width: 58ch;
}

.page-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.kicker {
  margin: 0;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  line-height: 1.02;
  color: #11171e;
}

h1 {
  font-size: clamp(2.2rem, 5.7vw, 4.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4.4vw, 3.3rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

p,
li {
  color: var(--ink-soft);
  line-height: 1.6;
}

.section {
  margin-top: 72px;
}

.section-head h2 {
  margin-top: 10px;
  max-width: 16ch;
}

.grid-2,
.grid-3,
.grid-4,
.contact-grid {
  display: grid;
  gap: 12px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.panel,
.stat,
.contact-item,
.info {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 18px;
}

.card h3,
.panel h3,
.info h3,
.contact-item h3,
.stat h3 {
  margin-bottom: 8px;
}

.stat h3 {
  font-size: 2rem;
}

.checks {
  margin: 10px 0 0;
  padding-left: 18px;
}

.btn-row {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.solid {
  background: #add934;
  color: #101510;
  box-shadow: 0 10px 24px rgba(120, 160, 30, 0.28);
}

.btn.ghost {
  border: 1px solid #2a2d33;
  color: #1a1c20;
  background: #fff;
}

.dark-block {
  padding: 26px;
  border-radius: 22px;
  border: 1px solid rgba(173, 217, 52, 0.26);
  background: linear-gradient(170deg, var(--deep-blue), var(--deep-blue-2));
}

.dark-block h2,
.dark-block h3,
.dark-block h4,
.dark-block .step {
  color: #f2f7ff;
}

.dark-block p,
.dark-block li,
.dark-block .kicker {
  color: #d4deea;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border: 1px solid rgba(173, 217, 52, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
}

.timeline .step {
  font-size: 2rem;
  font-family: "Rajdhani", sans-serif;
}

.dominant-cluster {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.dominant-cluster .dominant,
.dominant-cluster .support img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
  background: #cdd4dc;
}

.dominant-cluster .dominant {
  height: 420px;
}

.dominant-cluster .support {
  display: grid;
  gap: 10px;
}

.dominant-cluster .support img {
  height: 133px;
}

.editorial-rail {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.editorial-rail figure {
  margin: 0;
  flex: 0 0 auto;
  width: min(420px, 78vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  scroll-snap-align: start;
}

.editorial-rail img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.editorial-rail figcaption {
  padding: 10px 12px;
  font-size: 0.86rem;
}

.process-story {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.process-steps {
  display: grid;
  gap: 10px;
}

.process-step {
  border: 1px solid rgba(173, 217, 52, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.process-step.active {
  border-color: rgba(173, 217, 52, 0.65);
  background: rgba(173, 217, 52, 0.08);
}

.process-step h3 {
  margin-bottom: 6px;
}

.process-visual {
  border: 1px solid rgba(173, 217, 52, 0.26);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  min-height: 420px;
  background: #0a121c;
}

.process-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.process-visual img.active {
  opacity: 1;
}

.photo-grid-2,
.photo-grid-3 {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

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

.photo-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-card figcaption {
  padding: 10px 12px;
  font-size: 0.86rem;
}

.media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.cta {
  text-align: center;
  border: 1px solid #d3dabf;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% -10%, rgba(173, 217, 52, 0.35), transparent 36%),
    radial-gradient(circle at 95% -18%, rgba(255, 255, 255, 0.5), transparent 40%),
    #dbe1c8;
  padding: 48px 24px;
}

.cta h2 {
  max-width: 17ch;
  margin: 10px auto 0;
}

.cta p {
  max-width: 58ch;
  margin-inline: auto;
}

.site-footer {
  width: 100%;
  margin-top: 30px;
  padding: 30px 0 22px;
  background: linear-gradient(170deg, var(--deep-blue), var(--deep-blue-2));
  border-top: 3px solid var(--brand);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.site-footer h4 {
  margin: 0 0 8px;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.15rem;
  color: #f2f7ff;
}

.site-footer p {
  margin: 0 0 8px;
  color: #d4deea;
  line-height: 1.5;
}

.site-footer a {
  color: #add934;
  text-decoration: none;
}

.footer-bottom {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(173, 217, 52, 0.24);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.interactive {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.interactive::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(173, 217, 52, 0.24), transparent 42%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

.interactive:hover::after {
  opacity: 1;
}

@media (max-width: 1080px) {
  .page-hero.split,
  .process-story {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .photo-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dominant-cluster {
    grid-template-columns: 1fr;
  }

  .dominant-cluster .dominant {
    height: 300px;
  }

  .dominant-cluster .support {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dominant-cluster .support img {
    height: 110px;
  }

  .process-visual {
    min-height: 320px;
  }
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .scroll-progress {
    display: none;
  }

  .topbar-wrap {
    width: min(1180px, 94vw);
    margin-top: 8px;
    top: 6px;
  }

  .floating-logo img {
    width: 92px;
  }

  .topbar {
    position: relative;
  }

  .menu-toggle {
    display: inline-flex;
    z-index: 92;
  }

  .topbar nav {
    position: fixed;
    top: 60px;
    right: 10px;
    left: auto;
    width: min(280px, calc(100vw - 20px));
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    display: block;
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(170deg, var(--deep-blue), var(--deep-blue-2));
    border: 1px solid rgba(173, 217, 52, 0.38);
    box-shadow: 0 22px 40px rgba(2, 5, 10, 0.58);
    transition: max-height 0.24s ease, opacity 0.24s ease, transform 0.24s ease, padding 0.24s ease;
    backdrop-filter: blur(6px);
  }

  .topbar.menu-open nav {
    max-height: 430px;
    opacity: 1;
    transform: translateY(0);
    padding: 8px;
  }

  .topbar nav a {
    display: block;
    color: #f4f8ff;
    padding: 11px 12px;
    border-radius: 10px;
    text-align: left;
  }

  .topbar nav a + a {
    margin-top: 2px;
  }

  .topbar nav a.active {
    background: var(--brand);
    color: #111510;
  }

  body.menu-opened::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 20, 0.36);
    backdrop-filter: blur(1px);
    z-index: 70;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .photo-grid-3,
  .photo-grid-2,
  .timeline,
  .dominant-cluster .support {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .section {
    margin-top: 52px;
  }

  .page-hero {
    margin-top: 12px;
  }

  .editorial-rail figure {
    width: min(300px, 84vw);
  }

  .editorial-rail img,
  .photo-card img {
    height: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* === Hotfix: readability + image fitting === */
.dark-block .card,
.dark-block .panel,
.dark-block .stat,
.dark-block .info,
.dark-block .contact-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(173, 217, 52, 0.24);
}

.dark-block .card h3,
.dark-block .panel h3,
.dark-block .stat h3,
.dark-block .info h3,
.dark-block .contact-item h3 {
  color: #f3f8ff;
}

.dark-block .card p,
.dark-block .panel p,
.dark-block .stat p,
.dark-block .info p,
.dark-block .contact-item p,
.dark-block .checks li {
  color: #d7e2ef;
}

.photo-card img,
.editorial-rail img,
.media img,
.dominant-cluster .support img,
.dominant-cluster .dominant {
  object-fit: contain;
  background: #c8d0d8;
}





/* === Premium photo direction override === */
.photo-card img,
.editorial-rail img,
.media img,
.dominant-cluster .support img,
.dominant-cluster .dominant {
  object-fit: cover;
  background: #c8d0d8;
}

/* Keep optional contain only where explicitly needed */
.fit-contain {
  object-fit: contain !important;
}

/* WOW auto-showcase */
.wow-showcase {
  margin-top: 16px;
  border: 1px solid rgba(173, 217, 52, 0.28);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(170deg, #0a1420, #101c2a);
}

.wow-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.wow-media {
  position: relative;
  min-height: 420px;
  background: #0a1018;
}

.wow-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.wow-media img.active {
  opacity: 1;
  transform: scale(1);
}

.wow-copy {
  padding: 22px;
  display: grid;
  gap: 8px;
}

.wow-item {
  border: 1px solid rgba(173, 217, 52, 0.16);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.22s ease, background-color 0.22s ease;
}

.wow-item h3 {
  color: #eef4fc;
  margin-bottom: 4px;
}

.wow-item p {
  color: #cdd9e7;
  margin: 0;
}

.wow-item.active {
  border-color: rgba(173, 217, 52, 0.62);
  background: rgba(173, 217, 52, 0.08);
}

@media (max-width: 1080px) {
  .wow-grid {
    grid-template-columns: 1fr;
  }

  .wow-media {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  .wow-media {
    min-height: 260px;
  }
}

/* Tune: Home WOW "System Integration" framing */
#wow-home .wow-media img[data-id="integration"] {
  object-position: 24% center;
}

/* === Link visibility + mail CTA clarity === */
.dark-block a {
  color: #add934;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dark-block a:hover {
  color: #d4f57f;
}

.micro-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #6b7683;
}

/* === Per-image art direction helpers === */
.focus-left { object-position: 24% center !important; }
.focus-right { object-position: 76% center !important; }
.focus-top { object-position: center 22% !important; }
.focus-bottom { object-position: center 78% !important; }

.btn-row .micro-note {
  flex-basis: 100%;
  margin: 4px 0 0;
}

/* Madrid case layout + auto-scroll */
.madrid-case .madrid-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.madrid-case .madrid-why {
  margin: 0;
}

.madrid-case .madrid-auto {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 14px;
}

.madrid-case .madrid-auto-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: madridScroll 22s linear infinite;
}

.madrid-case .madrid-auto:hover .madrid-auto-track {
  animation-play-state: paused;
}

.madrid-case .madrid-auto .photo-card {
  width: min(360px, 30vw);
  flex: 0 0 auto;
  border-color: rgba(173, 217, 52, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.madrid-case .madrid-auto .photo-card img {
  height: 220px;
}

@keyframes madridScroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 5px)); }
}

@media (max-width: 1080px) {
  .madrid-case .madrid-head {
    grid-template-columns: 1fr;
  }

  .madrid-case .madrid-auto .photo-card {
    width: min(330px, 72vw);
  }
}

@media (max-width: 760px) {
  .madrid-case .madrid-auto .photo-card {
    width: min(300px, 82vw);
  }
}

/* === Typography width fix (less forced wrapping) === */
.page-hero-text h1 {
  max-width: 18ch;
}

.section-head h2 {
  max-width: 100%;
}

.card h3,
.panel h3,
.info h3,
.contact-item h3,
.stat h3,
.wow-item h3 {
  max-width: 100%;
  text-wrap: balance;
}

/* === Smart image fit by real ratio classes === */
.page-hero-media img.ratio-portrait,
.photo-card img.ratio-portrait,
.editorial-rail img.ratio-portrait,
.media img.ratio-portrait,
.dominant-cluster img.ratio-portrait,
.wow-media img.ratio-portrait,
.madrid-auto img.ratio-portrait {
  object-fit: contain !important;
  background: #c7d0d9;
}

.page-hero-media img.ratio-wide,
.photo-card img.ratio-wide,
.editorial-rail img.ratio-wide,
.media img.ratio-wide,
.dominant-cluster img.ratio-wide,
.wow-media img.ratio-wide,
.madrid-auto img.ratio-wide {
  object-fit: contain !important;
  background: #c7d0d9;
}

.page-hero-media img.ratio-standard,
.photo-card img.ratio-standard,
.editorial-rail img.ratio-standard,
.media img.ratio-standard,
.dominant-cluster img.ratio-standard,
.wow-media img.ratio-standard,
.madrid-auto img.ratio-standard {
  object-fit: cover !important;
}

/* Luxury auto-scrolling rails (Machinery Detail + Project Snapshots) */
.auto-lux-wrap {
  position: relative;
  overflow: hidden;
  padding: 4px 0;
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.auto-lux-wrap .auto-lux-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: autoLuxScroll 26s linear infinite;
}

.auto-lux-wrap:hover .auto-lux-track {
  animation-play-state: paused;
}

.auto-lux-wrap .auto-lux-card {
  margin: 0;
  width: min(390px, 34vw);
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(8, 14, 24, 0.16);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auto-lux-wrap .auto-lux-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 26px rgba(8, 14, 24, 0.22);
}

.auto-lux-wrap .auto-lux-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.auto-lux-wrap .auto-lux-card figcaption {
  padding: 10px 12px;
  font-size: 0.86rem;
}

@keyframes autoLuxScroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 6px)); }
}

@media (max-width: 1080px) {
  .auto-lux-wrap .auto-lux-card {
    width: min(350px, 62vw);
  }
}

@media (max-width: 760px) {
  .auto-lux-wrap {
    mask-image: none;
  }

  .auto-lux-wrap .auto-lux-card {
    width: min(310px, 84vw);
  }

  .auto-lux-wrap .auto-lux-card img {
    height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auto-lux-wrap .auto-lux-track {
    animation: none;
  }
}

/* === Bespoke photo layout (ratio-driven, no letterbox look) === */
.fit-contain {
  object-fit: cover !important;
  background: transparent !important;
}

/* Global: keep photos full-bleed by default */
.page-hero-media img.ratio-portrait,
.photo-card img.ratio-portrait,
.editorial-rail img.ratio-portrait,
.media img.ratio-portrait,
.dominant-cluster img.ratio-portrait,
.wow-media img.ratio-portrait,
.madrid-auto img.ratio-portrait,
.page-hero-media img.ratio-wide,
.photo-card img.ratio-wide,
.editorial-rail img.ratio-wide,
.media img.ratio-wide,
.dominant-cluster img.ratio-wide,
.wow-media img.ratio-wide,
.madrid-auto img.ratio-wide {
  object-fit: cover !important;
  background: transparent !important;
}

/* Auto-lux rails: each card shape adapts to image ratio */
.auto-lux-wrap .auto-lux-card {
  overflow: hidden;
}

.auto-lux-wrap .auto-lux-card.ratio-portrait {
  width: min(250px, 24vw);
  height: 320px;
}

.auto-lux-wrap .auto-lux-card.ratio-standard {
  width: min(360px, 34vw);
  height: 260px;
}

.auto-lux-wrap .auto-lux-card.ratio-wide {
  width: min(460px, 42vw);
  height: 240px;
}

.auto-lux-wrap .auto-lux-card img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

/* Madrid strip: same bespoke behavior */
.madrid-case .madrid-auto .photo-card.ratio-portrait {
  width: min(240px, 22vw);
  height: 300px;
}

.madrid-case .madrid-auto .photo-card.ratio-standard {
  width: min(340px, 30vw);
  height: 230px;
}

.madrid-case .madrid-auto .photo-card.ratio-wide {
  width: min(430px, 38vw);
  height: 220px;
}

.madrid-case .madrid-auto .photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

/* Grid cards: portrait cards get more breathing room */
.photo-grid-2 .photo-card.ratio-portrait,
.photo-grid-3 .photo-card.ratio-portrait {
  grid-row: span 2;
}

.photo-grid-2 .photo-card.ratio-portrait img,
.photo-grid-3 .photo-card.ratio-portrait img {
  height: 100%;
  min-height: 360px;
}

@media (max-width: 1080px) {
  .auto-lux-wrap .auto-lux-card.ratio-portrait {
    width: min(240px, 44vw);
    height: 290px;
  }

  .auto-lux-wrap .auto-lux-card.ratio-standard {
    width: min(320px, 56vw);
    height: 240px;
  }

  .auto-lux-wrap .auto-lux-card.ratio-wide {
    width: min(390px, 68vw);
    height: 220px;
  }
}

@media (max-width: 760px) {
  .auto-lux-wrap .auto-lux-card.ratio-portrait {
    width: min(220px, 66vw);
    height: 260px;
  }

  .auto-lux-wrap .auto-lux-card.ratio-standard {
    width: min(300px, 82vw);
    height: 220px;
  }

  .auto-lux-wrap .auto-lux-card.ratio-wide {
    width: min(320px, 86vw);
    height: 200px;
  }

  .madrid-case .madrid-auto .photo-card.ratio-portrait,
  .madrid-case .madrid-auto .photo-card.ratio-standard,
  .madrid-case .madrid-auto .photo-card.ratio-wide {
    width: min(300px, 82vw);
    height: 220px;
  }

  .photo-grid-2 .photo-card.ratio-portrait,
  .photo-grid-3 .photo-card.ratio-portrait {
    grid-row: auto;
  }

  .photo-grid-2 .photo-card.ratio-portrait img,
  .photo-grid-3 .photo-card.ratio-portrait img {
    min-height: 0;
    height: 220px;
  }
}

/* Final Madrid rail stability override */
.madrid-case .madrid-auto {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.madrid-case .madrid-auto-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: madridScroll 30s linear infinite !important;
}

.madrid-case .madrid-auto .photo-card {
  flex: 0 0 auto;
  width: min(360px, 32vw) !important;
  height: 250px !important;
  overflow: hidden;
  border: 1px solid rgba(173, 217, 52, 0.26);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.madrid-case .madrid-auto .photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

.madrid-case .madrid-auto .photo-card figcaption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(7, 15, 25, 0.62);
  color: #eef5ff;
  font-size: 0.8rem;
}

@media (max-width: 1080px) {
  .madrid-case .madrid-auto .photo-card {
    width: min(330px, 66vw) !important;
    height: 235px !important;
  }
}

@media (max-width: 760px) {
  .madrid-case .madrid-auto {
    mask-image: none;
  }

  .madrid-case .madrid-auto .photo-card {
    width: min(300px, 84vw) !important;
    height: 220px !important;
  }
}
.madrid-case .madrid-auto .photo-card {
  position: relative;
}

/* Hotfix: disable broken tall/mini layout in photo grids */
.photo-grid-2,
.photo-grid-3 {
  grid-auto-rows: auto;
  align-items: stretch;
}

.photo-grid-2 .photo-card.ratio-portrait,
.photo-grid-3 .photo-card.ratio-portrait {
  grid-row: auto !important;
}

.photo-grid-2 .photo-card,
.photo-grid-3 .photo-card {
  height: auto;
}

.photo-grid-2 .photo-card img,
.photo-grid-3 .photo-card img {
  height: 240px !important;
  min-height: 0 !important;
  object-fit: cover !important;
}

@media (max-width: 760px) {
  .photo-grid-2 .photo-card img,
  .photo-grid-3 .photo-card img {
    height: 210px !important;
  }
}

/* Specific tweak: make office shot taller in Home support stack */
.dominant-cluster .support img.tall-shot {
  height: 180px !important;
}

@media (max-width: 1080px) {
  .dominant-cluster .support img.tall-shot {
    height: 140px !important;
  }
}

/* Fine tune: push Inside Enfrio office shot slightly higher */
.dominant-cluster .support img.tall-shot {
  object-position: center  92% !important;
}


/* Final: do not enlarge tall-shot, only crop ceiling */
.dominant-cluster .support img.tall-shot {
  height: 133px !important;
  object-position: center 92% !important;
}

@media (max-width: 1080px) {
  .dominant-cluster .support img.tall-shot {
    height: 110px !important;
  }
}

/* Solutions hero tweak: show slightly higher engine area */
.dominant-cluster .dominant.motor-up {
  object-position: 24% 38% !important;
}

/* Company: dedicated full-team banner */
.team-wide-banner {
  border-color: rgba(173, 217, 52, 0.28);
  background: #d1d8de;
}

.team-wide-banner img.team-wide {
  width: 100%;
  height: 240px !important;
  object-fit: cover !important;
  object-position: center 52% !important;
}

@media (max-width: 760px) {
  .team-wide-banner img.team-wide {
    height: 190px !important;
  }
}

/* Company team panorama */
.team-panorama {
  margin: 14px 0 0;
  border: 1px solid rgba(173, 217, 52, 0.28);
  border-radius: 14px;
  overflow: hidden;
  background: #0e1722;
  box-shadow: 0 12px 26px rgba(8, 14, 24, 0.2);
}

.team-panorama img {
  width: 100%;
  height: auto;
  display: block;
}
