/* ==========================================================================
   AEROPARTS - 3. PRODUCTOS Y SERVICIOS (AIRBUS 4-PANEL COMPONENT)
   Replicating the exact structure, proportions, and animations of Airbus
   ========================================================================== */

.services-section {
  position: relative;
  background-color: var(--color-white);
  padding-top: clamp(4.5rem, 7vw, 6.5rem);
  padding-bottom: 0;
  overflow: hidden;
}

.services-header-container {
  margin-bottom: 2.5rem;
}

/* Full-width 4-panel interactive band (100vw edge-to-edge) */
.airbus-band-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  height: 540px;
  background-color: var(--color-blue-deep);
  overflow: hidden;
}

/* Master background for open state crossfade */
.airbus-band-master-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s ease-out;
  transform: scale(1.02);
  z-index: 1;
}

.airbus-band-wrapper.has-open-panel .airbus-band-master-bg {
  opacity: 1;
  transform: scale(1);
}

.airbus-band-master-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6, 25, 40, 0.45) 0%, rgba(2, 45, 90, 0.35) 100%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.airbus-band-wrapper.has-open-panel .airbus-band-master-overlay {
  opacity: 1;
}

/* Columns container */
.airbus-columns {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  z-index: 5;
}

/* Individual Column */
.airbus-panel {
  position: relative;
  flex: 1;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  transition: flex var(--transition-panel), width var(--transition-panel), background-color var(--transition-normal);
}

.airbus-panel:last-child {
  border-right: none;
}

/* Column individual background image (closed state) */
.airbus-panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: contrast(1.05) brightness(0.9);
  transition: transform 0.5s ease-out, opacity 0.4s ease;
  z-index: 1;
}

/* Dark blue tint overlay per column */
.airbus-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 25, 40, 0.42);
  transition: background-color var(--transition-normal);
  z-index: 2;
}

/* Content layer inside panel */
.airbus-panel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 48px 36px 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 3;
  transition: all var(--transition-panel);
}

/* Title positioning: ~110px from top, 40px from left in closed state */
.airbus-panel-title-wrap {
  margin-top: 55px;
  max-width: 320px;
  transition: all var(--transition-panel);
}

.airbus-panel-title {
  font-family: var(--font-title);
  font-size: 1.5rem; /* ~24px */
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-white);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

/* Action button "+" / "−" at top-right */
.airbus-panel-btn {
  position: absolute;
  top: 48px;
  right: 36px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  z-index: 10;
}

.airbus-panel-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  transition: transform 0.4s ease;
}

/* Detail text (hidden in closed state) */
.airbus-panel-body {
  opacity: 0;
  max-height: 0;
  transform: translateY(16px);
  overflow: hidden;
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem; /* 15px */
  line-height: 1.65;
  color: var(--color-blue-deep);
  transition: opacity 0.45s ease 0.1s, transform 0.45s ease 0.1s, max-height 0.4s ease;
}

/* ==========================================================================
   HOVER STATE (When all panels are closed)
   ========================================================================== */
.airbus-band-wrapper:not(.has-open-panel) .airbus-panel:hover {
  flex: 1.35;
}

.airbus-band-wrapper:not(.has-open-panel) .airbus-panel:hover .airbus-panel-bg {
  transform: scale(1.06);
}

.airbus-band-wrapper:not(.has-open-panel) .airbus-panel:hover .airbus-panel-overlay {
  background: rgba(6, 25, 40, 0.28);
}

.airbus-band-wrapper:not(.has-open-panel) .airbus-panel:hover .airbus-panel-btn {
  transform: scale(1.15);
  color: var(--color-sky-aeroparts);
}

/* ==========================================================================
   OPEN STATE (When a panel is active)
   ========================================================================== */
/* Hide individual panel backgrounds so master image shows */
.airbus-band-wrapper.has-open-panel .airbus-panel:not(.is-open) .airbus-panel-bg,
.airbus-band-wrapper.has-open-panel .airbus-panel:not(.is-open) .airbus-panel-overlay {
  opacity: 0;
}

/* Inactive panels keep visible white title and + icon */
.airbus-band-wrapper.has-open-panel .airbus-panel:not(.is-open) {
  flex: 1;
  opacity: 0.85;
}

.airbus-band-wrapper.has-open-panel .airbus-panel:not(.is-open):hover {
  opacity: 1;
}

/* The ACTIVE Panel transforms into a Frosted Glass Card */
.airbus-panel.is-open {
  flex: 1.65;
  cursor: default;
  margin: 14px 10px;
  height: calc(100% - 28px);
  border-radius: 4px;
  background-color: var(--glass-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.airbus-panel.is-open .airbus-panel-bg,
.airbus-panel.is-open .airbus-panel-overlay {
  opacity: 0;
}

.airbus-panel.is-open .airbus-panel-inner {
  padding: 32px 32px 28px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.airbus-panel.is-open .airbus-panel-title-wrap {
  margin-top: 24px;
  max-width: 100%;
}

.airbus-panel.is-open .airbus-panel-title {
  color: var(--color-blue-aeroparts);
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.2;
}

.airbus-panel.is-open .airbus-panel-btn {
  top: 32px;
  right: 28px;
  color: var(--color-blue-aeroparts);
  cursor: pointer;
}

.airbus-panel.is-open .airbus-panel-btn svg {
  transform: rotate(45deg); /* "+" morphs into "x/minus" */
}

.airbus-panel.is-open .airbus-panel-body {
  opacity: 1;
  max-height: 380px;
  transform: translateY(0);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-sky-aeroparts) transparent;
}

.airbus-panel.is-open .airbus-panel-body::-webkit-scrollbar {
  width: 4px;
}

.airbus-panel.is-open .airbus-panel-body::-webkit-scrollbar-thumb {
  background-color: var(--color-sky-aeroparts);
  border-radius: 2px;
}
