/**
 * Home Page Styles - SIMPLIFIED VERSION
 * Estilos directos y naturales para la página Home
 */

/* ===== VARIABLES ESPECÍFICAS DE HOME ===== */
:root {
  /* Variables específicas de home que extienden design-system.css */
  --home-hero-overlay: rgba(0, 68, 148, 0.85);
  --home-hero-text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  --home-hero-image-filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
  --home-section-max-width: 1140px;
}

/* ===== HERO SECTION ESPECÍFICO ===== */
.hero-section {
  background-color: var(--color-primary-600);
  color: var(--color-on-primary);
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--home-hero-overlay);
  z-index: 1;
}

.hero-section > * {
  position: relative;
  z-index: 2;
}

.hero-section .display-4 {
  text-shadow: var(--home-hero-text-shadow);
  margin-bottom: var(--space-4);
}

.hero-section .lead {
  text-shadow: var(--home-hero-text-shadow);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-inline: auto;
}

.hero-section .container {
  max-width: var(--home-section-max-width);
  text-align: center;
}

/* ===== CONTENEDORES HERO ===== */
.hero-container {
  z-index: 2;
}

.hero-image-container {
  width: 300px;
  height: 240px;
  margin: 0 auto;
  overflow: visible;
  position: relative;
}

.hero-image-container img {
  width: 300px !important;
  max-width: 300px !important;
  height: auto !important;
  max-height: 240px !important;
}

.hero-pattern {
  position: absolute;
  bottom: -2%;
  right: -2%;
  z-index: 1;
  opacity: 0.1;
}

/* ===== HERO IMAGE ESPECÍFICO ===== */
.hero-image-compact {
  max-height: 200px;
  height: auto;
  filter: var(--home-hero-image-filter);
  transition: transform var(--duration-normal) var(--easing-standard);
}

.hero-image-compact:hover {
  transform: scale(1.05);
}

/* ===== SECCIONES PRINCIPALES ===== */
.tools-section {
  position: relative;
  z-index: 2;
  contain: content;
}

.section-title-container {
  height: 120px;
  contain: strict;
}

.use-cases-section {
  min-height: 400px;
  contain: content;
}

/* ===== CALL TO ACTION ===== */
.cta-pattern {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(25%, -25%);
}

/* ===== SVG BACKGROUNDS ===== */
.svg-background {
  background-image: url("/static/images/hero.svg");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
}

/* ===== HERO CARDS ESPECÍFICOS ===== */
.hero-card {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-primary-500) 10%, var(--color-surface)),
    color-mix(in srgb, var(--color-primary-600) 5%, var(--color-surface))
  );
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  container-type: inline-size;
  transition:
    transform var(--duration-normal) var(--easing-standard),
    box-shadow var(--duration-normal) var(--easing-standard);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@container (max-width: 400px) {
  .hero-card h2 {
    font-size: var(--font-size-xl);
  }
}

/* ===== SECCIONES ESPECÍFICAS ===== */
.section-title {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  color: var(--color-on-surface);
}

.section-subtitle {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-on-surface-variant);
}

.section-description {
  color: var(--color-on-surface-variant);
  max-width: 600px;
  margin-inline: auto;
  line-height: var(--line-height-relaxed);
}

.section-spacing {
  margin-block: var(--space-16);
}

.section-divider {
  padding-block: var(--space-12);
  border-block: 1px solid var(--color-outline-variant);
}

/* ===== TOOL CARDS ESPECÍFICOS ===== */
.tool-card,
.pro-tool-card,
.use-case-card {
  height: 100%;
  transition:
    transform var(--duration-normal) var(--easing-standard),
    box-shadow var(--duration-normal) var(--easing-standard);
  contain: layout style;
}

.tool-card:hover,
.pro-tool-card:hover,
.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE ESPECÍFICO ===== */
@media (max-width: 767.98px) {
  .hero-section {
    padding: var(--space-12) 0;
  }

  .hero-image-compact {
    max-height: 150px;
  }

  .svg-background {
    background-image: url("/static/images/hero-mobile.svg");
  }

  .hero-section .display-4 {
    font-size: var(--font-size-3xl);
  }

  .hero-section .lead {
    font-size: var(--font-size-lg);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .section-subtitle {
    font-size: var(--font-size-xl);
  }

  .section-spacing {
    margin-block: var(--space-12);
  }

  .section-divider {
    padding-block: var(--space-8);
  }

  .row.g-4 {
    row-gap: var(--space-4);
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section .container {
    max-width: 90%;
  }
}

/* ===== ACCESSIBILITY ESPECÍFICO ===== */
@media (forced-colors: active) {
  .hero-card,
  .tool-card,
  .pro-tool-card,
  .use-case-card {
    border: 2px solid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image-compact,
  .hero-card,
  .tool-card,
  .pro-tool-card,
  .use-case-card {
    transition: none;
  }

  .hero-image-compact:hover,
  .hero-card:hover,
  .tool-card:hover,
  .pro-tool-card:hover,
  .use-case-card:hover {
    transform: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .hero-section {
    background: white;
    color: black;
    padding: var(--space-8) 0;
  }

  .hero-image-compact {
    filter: none;
  }

  .svg-background {
    display: none;
  }
}

/* ===== DEBUGGING ===== */
@media screen and (max-width: 0px) {
  .debug-home-page::before {
    content: "🏠 Home Page ELITE";
    position: fixed;
    top: 410px;
    right: 10px;
    background: var(--color-success-500);
    color: var(--color-on-success);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    z-index: var(--z-debug);
    opacity: 0.8;
  }
}
