/* ==========================================================================
   INFINITYTECH — PORTAL SPLIT SCREEN ("/")
   ========================================================================== */

.portal-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #040D17;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Header Flutuante do Portal */
.portal-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: clamp(14px, 2.5vh, 24px) 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.portal-brand {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: rgba(7, 29, 51, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  max-width: 92vw;
}

.portal-brand img {
  height: clamp(36px, 5vh, 48px);
  width: auto;
  object-fit: contain;
}

.portal-main-title {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Container Split Screen */
.split-wrapper {
  display: flex;
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Metades */
.split-panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(100px, 14vh, 140px) clamp(20px, 4vw, 48px) clamp(80px, 10vh, 100px) clamp(20px, 4vw, 48px);
  text-decoration: none;
  overflow: hidden;
  transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  outline: none;
}

/* Acessibilidade: anel de foco no teclado */
.split-panel:focus-visible {
  outline: 3px solid #7EC1FF;
  outline-offset: -4px;
  z-index: 35;
}

.split-b2b:focus-visible {
  outline-color: #FF8F9B;
}

/* Imagem de Fundo & Overlay */
.split-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  filter: brightness(0.65) saturate(1.1);
}

.split-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: background 0.5s ease;
}

/* Lado Esquerdo: Cliente Final (B2C) */
.split-b2c .split-overlay {
  background: linear-gradient(
    180deg,
    rgba(14, 58, 99, 0.4) 0%,
    rgba(7, 29, 51, 0.85) 60%,
    rgba(4, 16, 29, 0.98) 100%
  );
}

/* Lado Direito: Lojistas (B2B) */
.split-b2b .split-overlay {
  background: linear-gradient(
    180deg,
    rgba(196, 30, 46, 0.3) 0%,
    rgba(10, 15, 24, 0.88) 60%,
    rgba(4, 8, 14, 0.98) 100%
  );
}

/* Interações em Dispositivos com Mouse / Hover */
@media (hover: hover) {
  .split-wrapper:hover .split-panel {
    flex: 0.9;
    opacity: 0.75;
  }

  .split-wrapper .split-panel:hover {
    flex: 1.25;
    opacity: 1;
  }

  .split-panel:hover .split-bg {
    transform: scale(1.06);
    filter: brightness(0.85) saturate(1.25);
  }

  .split-b2c:hover .split-overlay {
    background: linear-gradient(
      180deg,
      rgba(27, 90, 160, 0.35) 0%,
      rgba(14, 58, 99, 0.8) 55%,
      rgba(7, 29, 51, 0.96) 100%
    );
  }

  .split-b2b:hover .split-overlay {
    background: linear-gradient(
      180deg,
      rgba(196, 30, 46, 0.4) 0%,
      rgba(15, 23, 38, 0.82) 55%,
      rgba(5, 10, 18, 0.96) 100%
    );
  }

  .split-panel:hover .split-content {
    transform: translateY(-8px);
  }

  .split-cta-btn:hover {
    transform: translateX(4px);
  }
}

/* Feedback Tátil para Touchscreen (Celular/Tablet) */
@media (hover: none) {
  .split-panel:active {
    opacity: 0.92;
  }
  .split-panel:active .split-bg {
    transform: scale(1.03);
  }
}

/* Conteúdo interno da metade */
.split-content {
  position: relative;
  z-index: 10;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 16px);
  transform: translateY(0);
  transition: transform 0.4s ease;
}

.split-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: clamp(0.72rem, 1.2vw, 0.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: fit-content;
}

.split-b2c .split-badge {
  background: rgba(27, 90, 160, 0.35);
  color: #7EC1FF;
  border: 1px solid rgba(126, 193, 255, 0.3);
}

.split-b2b .split-badge {
  background: rgba(196, 30, 46, 0.35);
  color: #FF8F9B;
  border: 1px solid rgba(255, 143, 155, 0.3);
}

.split-title {
  font-size: clamp(1.65rem, 3.2vw, 3.2rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.split-desc {
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  color: #CBD5E1;
  line-height: 1.5;
}

.split-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px 0;
}

.split-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: clamp(0.75rem, 1.1vw, 0.82rem);
  color: #E2E8F0;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.split-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  width: fit-content;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.split-b2c .split-cta-btn {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-light) 100%);
  border: 1px solid rgba(126, 193, 255, 0.3);
}

.split-b2b .split-cta-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #9B111F 100%);
  border: 1px solid rgba(255, 143, 155, 0.3);
}

/* Divisor Central Glow (Desktop) */
.split-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.3) 80%, transparent 100%);
  z-index: 20;
  pointer-events: none;
}

.split-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  background: #071D33;
  border: 2px solid rgba(255, 255, 255, 0.2);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* Barra Inferior com Atalhos de WhatsApp */
.portal-bottom-bar {
  background: rgba(4, 13, 23, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 24px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 40;
}

.portal-bottom-title {
  color: #94A3B8;
  font-size: 0.85rem;
  font-weight: 600;
}

.portal-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}

.portal-wa-link:hover {
  background: var(--whatsapp-green);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--whatsapp-glow);
}

.portal-wa-link:focus-visible {
  outline: 2px solid #25D366;
  outline-offset: 2px;
}

.portal-wa-link svg {
  width: 18px;
  height: 18px;
  color: var(--whatsapp-green);
}

.portal-wa-link:hover svg {
  color: #FFFFFF;
}

/* ==========================================================================
   RESPONSIVIDADE & ADAPTAÇÃO MOBILE / TABLET
   ========================================================================== */

/* Telas Médias e Tablets (max-width: 1024px) */
@media (max-width: 1024px) {
  .split-panel {
    padding: clamp(90px, 12vh, 120px) 28px clamp(70px, 8vh, 85px) 28px;
  }
}

/* Telas Mobile e Tablets Verticais (max-width: 900px) */
@media (max-width: 900px) {
  .portal-header {
    position: relative;
    padding: 16px 16px 8px 16px;
    background: #040D17;
  }

  .portal-brand {
    padding: 10px 20px;
    width: 100%;
    max-width: 480px;
  }

  .split-wrapper {
    flex-direction: column;
    min-height: auto;
    flex: initial;
  }

  .split-divider {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  }

  .split-center-badge {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: -20px auto;
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
    z-index: 30;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  }

  .split-panel {
    min-height: 44vh;
    padding: 36px 20px 36px 20px;
    justify-content: center;
  }

  .split-content {
    max-width: 100%;
  }

  .split-cta-btn {
    width: 100%;
    text-align: center;
  }

  .portal-bottom-bar {
    flex-direction: column;
    text-align: center;
    padding: 16px 16px;
    gap: 12px;
  }

  .portal-bottom-actions {
    justify-content: center;
    width: 100%;
    flex-direction: column;
  }

  .portal-wa-link {
    width: 100%;
    justify-content: center;
  }
}

/* Telas Pequenas (max-width: 480px) */
@media (max-width: 480px) {
  .split-panel {
    min-height: 40vh;
    padding: 30px 16px 30px 16px;
  }

  .split-highlights {
    gap: 6px;
  }

  .split-pill {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
}
