/* =========================================================
   SOLINEX — PORTAL PRINCIPAL (index.html)
   Hero "Equipamos. Mantenemos. Protegemos."
   ========================================================= */

/* ===========================================
   HERO PRINCIPAL
   =========================================== */
.portal-hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  background: var(--sx-azul-900);
  color: white;
  overflow: hidden;
  padding: 100px 0 80px;
}

.portal-hero-bg {
  /* ===== FONDO DEL HERO PRINCIPAL =====
     Actual: SVG abstracto sobrio (azul marino con líneas y luces sutiles).
     Si quieres cambiarlo por una foto, reemplaza la URL por la de tu imagen,
     por ejemplo: url('../images/hero/hero-portal.jpg')
  */
  position: absolute;
  inset: 0;
  background-image: url('../images/hero/hero-portal.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  filter: none;
}

@keyframes heroZoom {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.12); }
}

.portal-hero-overlay {
  /* ===== CAPA AZULADA DEL LADO IZQUIERDO =====
     Asegura el contraste del texto sin teñir por completo tu fotografía.
  */
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg, 
    rgba(11, 30, 63, 0.96) 0%,    /* Esquina izquierda-abajo sólida */
    rgba(11, 30, 63, 0.75) 15%,   /* Protege el inicio del texto */
    rgba(11, 30, 63, 0.30) 40%,   /* Se desvanece rápido en diagonal */
    rgba(11, 30, 63, 0) 60%       /* TRANSPARENCIA TOTAL: muere antes del 50% (mitad) */
  );
  z-index: 1;
}

.portal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--sx-azul-900));
  z-index: 1;
  pointer-events: none;
}

.portal-hero .sx-container {
  position: relative;
  z-index: 2;
}

.portal-hero-content {
  max-width: 880px;
  animation: heroFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sx-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.portal-hero-eyebrow::before {
  content: '';
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #3FAFC5, #2BA88E);
}

/* Título: Equipamos. Mantenemos. Protegemos. */
.portal-hero-title {
  font-family: var(--sx-font-display);
  font-size: clamp(2.75rem, 7.2vw, 5.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: white;
  margin-bottom: 32px;
}

.portal-hero-title .verb {
  display: block;
  position: relative;
  animation: verbReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portal-hero-title .verb:nth-child(1) { animation-delay: 0.15s; }
.portal-hero-title .verb:nth-child(2) { animation-delay: 0.3s; }
.portal-hero-title .verb:nth-child(3) { animation-delay: 0.45s; }

@keyframes verbReveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-hero-title .dot {
  /* ===== PUNTOS DE LAS FRASES: ahora son blancos discretos (antes tenían gradiente colorido) ===== */
  color: white;
  font-weight: 800;
}

.portal-hero-subtitle {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin-bottom: 44px;
  font-weight: 400;
  animation: heroFadeUp 1s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  animation: heroFadeUp 1s 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portal-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollHint 2.4s ease-in-out infinite;
}

.portal-hero-scroll::after {
  content: '';
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
}

@keyframes scrollHint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.95; }
}

/* ===========================================
   ÁREAS DE TRABAJO (Laboratorio / Industrial / Legal)
   =========================================== */
.portal-areas {
  background: var(--sx-blanco);
  padding: 112px 0;
  position: relative;
}

.portal-areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.area-card {
  position: relative;
  background: var(--sx-blanco);
  border-radius: var(--sx-radius-lg);
  overflow: hidden;
  border: 1px solid var(--sx-gris-200);
  text-decoration: none;
  color: inherit;
  transition: var(--sx-transition);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.area-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--sx-shadow-xl);
  border-color: transparent;
}

.area-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sx-azul-900);
}

.area-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.area-card:hover .area-card-image img {
  transform: scale(1.08);
}

/* Slider de 3 imágenes que se intercambian con fade (tarjeta División 1) */
.area-card-slider .area-slide {
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.area-card-slider .area-slide.active {
  opacity: 1;
}

.area-card-image::after {
  /* ===== OVERLAY DE LAS IMÁGENES DE LAS ÁREAS =====
     Más suave que antes. La imagen se ve mucho mejor.
     Si quieres oscurecer más, sube los valores de opacidad (rgba: 0.55 → 0.7 por ej.).
  */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 30, 63, 0.05) 0%,
    rgba(11, 30, 63, 0.25) 55%,
    rgba(11, 30, 63, 0.75) 100%
  );
  z-index: 1;
  transition: opacity 0.4s ease;
}

.area-card-number {
  /* ===== NUMERACIÓN 01/02/03 DE LAS TARJETAS: ocultas por decisión del cliente.
     Si las quieres volver a mostrar cambia `display: none` a `display: block`. =====
  */
  display: none;
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 2;
  font-family: var(--sx-font-display);
  font-size: 56px;
  font-weight: 800;
  color: white;
  line-height: 1;
  letter-spacing: -0.04em;
  opacity: 0.95;
}

.area-card-number::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #3FAFC5, #2BA88E);
  margin-bottom: 14px;
}

.area-card-title {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 28px;
  z-index: 2;
  color: white;
  font-family: var(--sx-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.area-card-body {
  padding: 28px 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.area-card-body > p {
  color: var(--sx-gris-600);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

/* ===== TAGLINE / PROMESA DE CADA ÁREA (frase entre comillas)
   Aparece justo arriba de la descripción. Si quieres cambiar el color
   del acento, edita la línea `color:` =====
*/
.area-card-tagline {
  color: var(--sx-azul-700) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  font-style: italic;
  line-height: 1.4 !important;
  margin-bottom: 14px !important;
  flex: none !important;
  letter-spacing: -0.01em;
}

.area-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.area-card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-azul-700);
  background: var(--sx-azul-100);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.area-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sx-azul-600);
  font-size: 15px;
  font-weight: 600;
  margin-top: auto;
  transition: var(--sx-transition);
}

.area-card-cta::after {
  content: '→';
  font-size: 18px;
  transition: transform 0.3s ease;
}

.area-card:hover .area-card-cta {
  gap: 14px;
}

.area-card:hover .area-card-cta::after {
  transform: translateX(4px);
}

/* ===========================================
   STATS — Cifras corporativas
   =========================================== */
.portal-stats {
  background: var(--sx-azul-900);
  padding: 80px 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.portal-stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(63, 175, 197, 0.08), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(43, 168, 142, 0.06), transparent 45%);
  z-index: 0;
}

.portal-stats .sx-container { position: relative; z-index: 1; }

.portal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-block {
  text-align: center;
  position: relative;
  padding: 8px 16px;
}

.stat-block:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-family: var(--sx-font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, #85B7EB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

/* Para los stats con texto largo ("Personal con +XX años") */
.stat-number.stat-text {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===========================================
   FEATURES — Por qué Solinex
   =========================================== */
.portal-features {
  padding: 112px 0;
  background: var(--sx-blanco);
}

.portal-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 64px;
}

.feature-card {
  padding: 36px 32px;
  background: var(--sx-azul-50);
  border-radius: var(--sx-radius-lg);
  border: 1px solid transparent;
  transition: var(--sx-transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--sx-azul-600), #2BA88E);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  background: white;
  border-color: var(--sx-gris-200);
  box-shadow: var(--sx-shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--sx-radius-md);
  background: linear-gradient(135deg, var(--sx-azul-700), var(--sx-azul-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(31, 79, 139, 0.25);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.feature-card h3 {
  font-size: 19px;
  margin-bottom: 12px;
  color: var(--sx-azul-900);
  font-weight: 700;
}

.feature-card p {
  color: var(--sx-gris-600);
  font-size: 15px;
  line-height: 1.65;
}

/* ===========================================
   CLIENTES
   =========================================== */
.portal-clientes {
  padding: 72px 0;
  background: var(--sx-azul-50);
  border-top: 1px solid var(--sx-gris-200);
  border-bottom: 1px solid var(--sx-gris-200);
}

.portal-clientes-title {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--sx-gris-500);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.portal-clientes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: center;
}

.cliente-logo {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: var(--sx-radius-md);
  padding: 14px;
  border: 1px solid var(--sx-gris-200);
  filter: grayscale(100%);
  opacity: 0.55;
  transition: var(--sx-transition);
}

.cliente-logo span {
  font-family: var(--sx-font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1.5px;
  color: #2F3847;
  text-align: center;
}

.cliente-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
}

.cliente-logo:hover {
  filter: grayscale(100%);
  opacity: 0.85;
  border-color: var(--sx-gris-300);
  transform: translateY(-2px);
}

/* ===========================================
   CTA FINAL
   =========================================== */
.portal-cta {
  background: var(--sx-azul-900);
  color: white;
  padding: 112px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.portal-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(63, 175, 197, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(31, 79, 139, 0.3), transparent 50%);
  z-index: 0;
}

.portal-cta .sx-container { position: relative; z-index: 1; }

.portal-cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
  color: white;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.portal-cta p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.portal-cta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ===== Formulario de contacto del portal ===== */
.portal-contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  margin-top: 40px;
  text-align: left;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.portal-contact-info {
  padding: 8px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.portal-contact-info h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 700;
}

.portal-contact-info p {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  margin: 0 0 12px;
  text-align: left;
  max-width: none;
}

.portal-contact-info p strong {
  color: #fff;
  display: inline-block;
  min-width: 90px;
}

.portal-contact-info a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: color 0.2s ease;
}

.portal-contact-info a:hover {
  color: #fff;
}

.portal-wa-btn {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

.portal-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--sx-radius-lg);
}

.portal-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.portal-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-form-row label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
}

.portal-form-row input,
.portal-form-row textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--sx-radius-md);
  font-family: var(--sx-font-body);
  font-size: 15px;
  color: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.portal-form-row input::placeholder,
.portal-form-row textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.portal-form-row input:focus,
.portal-form-row textarea:focus {
  outline: none;
  border-color: #3FAFC5;
  background: rgba(255,255,255,0.1);
}

.portal-form-row textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--sx-font-body);
}

.slx-form-feedback {
  margin-top: 8px;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 968px) {
  .portal-areas-grid { grid-template-columns: 1fr; }
  .portal-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .stat-block:nth-child(2)::after { display: none; }
  .portal-features-grid { grid-template-columns: 1fr; }
  .portal-clientes-grid { grid-template-columns: repeat(3, 1fr); }
  .portal-hero { min-height: 640px; padding: 80px 0 60px; }
  .portal-contact-wrapper { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .portal-areas, .portal-features, .portal-cta { padding: 72px 0; }
  .portal-stats { padding: 56px 0; }
  .portal-stats-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-block::after { display: none; }
  .portal-clientes-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-hero-eyebrow { font-size: 13px; letter-spacing: 3px; }
  .portal-form-row-2 { grid-template-columns: 1fr; }
  .portal-contact-form, .portal-contact-info { padding: 22px; }

  .portal-hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .portal-hero-actions .sx-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
  }
}
