/* CSS for Gateway Split Screen Layout */

.gateway-wrapper {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
}

.gateway-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  height: auto;
  position: relative;
}

@media (min-width: 992px) {
  .gateway-wrapper {
    height: 100vh;
    overflow: hidden;
  }
  .gateway-container {
    flex-direction: row;
    height: 100%;
  }
}

/* ==========================================
   PANELS
   ========================================== */
.gateway-panel {
  flex: none;
  width: 100%;
  min-height: 50vh;
  height: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: var(--space-xl) var(--space-lg);
  overflow: hidden;
  transition: height var(--transition-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter var(--transition-slow) ease;
  z-index: 1;
  text-decoration: none;
}

.panel-individual {
  padding-top: 120px; /* Space for absolute logo on mobile portrait */
}

@media (min-width: 992px) {
  .gateway-panel {
    width: 50%;
    height: 100vh;
    min-height: auto;
    padding: var(--space-4xl) var(--space-3xl);
    transition: width var(--transition-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter var(--transition-slow) ease;
  }
  .panel-individual {
    padding-top: var(--space-4xl); /* Reset top padding on desktop */
  }
}

/* Background image handling with blur and scale to prevent edge bleed */
.panel-bg {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background-size: cover;
  background-position: center;
  /* Premium blur + dark overlay default state */
  filter: blur(6px) brightness(65%);
  transform: scale(1.05);
  transition: transform var(--transition-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter var(--transition-slow) ease;
  z-index: 1;
}

.panel-individual .panel-bg {
  background-image: linear-gradient(180deg, rgba(12, 35, 18, 0.4) 0%, rgba(8, 25, 12, 0.9) 100%);
}

.panel-investment .panel-bg {
  background-image: linear-gradient(180deg, rgba(26, 27, 26, 0.4) 0%, rgba(26, 27, 26, 0.85) 100%);
  filter: blur(4.5px) brightness(65%); /* Obniżony blur dla wyrównania optycznego */
}

/* Panel Content */
.panel-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  transform: translateY(0);
  transition: transform var(--transition-normal) ease;
}

.panel-subtitle {
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.panel-title {
  font-family: var(--font-headings);
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .panel-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1200px) {
  .panel-title {
    font-size: 2.75rem;
  }
}

.panel-desc {
  font-size: 0.95rem;
  color: var(--text-light-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
  font-weight: 300;
}

@media (min-width: 768px) {
  .panel-desc {
    font-size: 1.05rem;
  }
}

.panel-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #FFFFFF;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: gap var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

.panel-cta svg {
  width: 16px;
  height: 16px;
  fill: #FFFFFF;
  transition: transform var(--transition-fast) ease;
}

/* ==========================================
   INTERACTIVE HOVER STATES (DESKTOP ONLY)
   ========================================== */
@media (min-width: 992px) and (hover: hover) {
  /* Smoothly adjust width of both panels */
  .gateway-container:hover .gateway-panel {
    width: 42%;
    filter: grayscale(10%) brightness(75%);
  }

  .gateway-container .gateway-panel:hover {
    width: 58%;
    filter: none;
    z-index: 2;
  }

  /* Reduce blur on hover to bring details into focus */
  .gateway-panel:hover .panel-bg {
    filter: blur(2px) brightness(75%);
    transform: scale(1.07);
  }

  /* Lift content on hover */
  .gateway-panel:hover .panel-content {
    transform: translateY(-8px);
  }

  /* Move arrow on hover */
  .gateway-panel:hover .panel-cta {
    gap: var(--space-md);
    border-color: #FFFFFF;
  }
  
  .gateway-panel:hover .panel-cta svg {
    transform: translateX(4px);
  }
}

/* ==========================================
   CENTER/TOP LOGO (Clean standalone icon)
   ========================================== */
.gateway-logo-container {
  position: absolute;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  .gateway-logo-container {
    top: var(--space-2xl);
  }
}

.gateway-logo-img {
  height: 55px; /* Shrunk for mobile/tablet */
  width: auto;
  /* Convert dark icon to brilliant white and apply high-contrast drop shadow */
  filter: brightness(0) invert(1) drop-shadow(0 4px 15px rgba(0, 0, 0, 0.6));
  transition: transform var(--transition-normal) ease;
}

@media (min-width: 992px) {
  .gateway-logo-img {
    height: 140px; /* Restored for desktop */
  }
}

/* ==========================================
   MOBILE LANDSCAPE / SHORT VIEWPORTS FIX
   ========================================== */
@media (max-width: 991px) and (max-height: 500px) {
  .gateway-wrapper {
    min-height: 100vh;
    overflow-y: auto;
  }
  .gateway-container {
    flex-direction: row;
    min-height: 100vh;
  }
  .gateway-panel {
    width: 50%;
    min-height: 100vh;
    height: auto;
    padding-top: 100px; /* Clear logo vertically */
  }
  .panel-individual {
    padding-top: 100px; /* Reset top padding from portrait mobile */
  }
}

/* Adjust font sizes in short viewports to prevent overflow */
@media (max-height: 500px) {
  .panel-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
  }
  .panel-desc {
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    line-height: 1.4;
  }
  .gateway-logo-img {
    height: 50px !important;
  }
  .gateway-panel {
    padding-top: 75px !important;
    padding-bottom: var(--space-md) !important;
  }
  .panel-individual {
    padding-top: 75px !important;
  }
}
