/**
 * INDEX.CSS - Estilos para la página principal
 * Diseño inspirado en Airbnb - Limpio, moderno y responsive
 */

/* Variables globales ya definidas en header.css */

/* Contenido Principal */
.main-content {
    padding-top: var(--header-height);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    padding: 20px 0 60px; /* antes era 80px 0 → reduce el margen superior */
    background: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}


.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    width: fit-content;
    box-shadow: var(--shadow-sm);
}

.badge-icon {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

/* Título */
.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin: 0;
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    opacity: 0.3;
    border-radius: 2px;
}

/* Descripción */
.hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 540px;
}

/* Acciones */
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-outline {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: var(--light-bg);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: var(--transition);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Estadísticas */
.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Visual del Hero */
.hero-visual {
    position: relative;
    height: 500px;
}

.visual-card {
    position: absolute;
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: floatAnimation 6s ease-in-out infinite;
}

.card-1 {
    top: 20%;
    left: 10%;
    width: 320px;
    z-index: 2;
}

.card-2 {
    bottom: 20%;
    right: 10%;
    width: 200px;
    animation-delay: 1s;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.card-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.card-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 12px;
}

.progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 100px;
    animation: progressAnimation 2s ease-in-out infinite;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.mini-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.trend-icon {
    width: 32px;
    height: 32px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

/* Elementos flotantes */
.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: floatAnimation 8s ease-in-out infinite;
}

.floating-element svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.element-1 {
    top: 10%;
    right: 20%;
    animation-delay: 2s;
}

.element-2 {
    bottom: 10%;
    left: 5%;
    animation-delay: 3s;
}

/* ==================== SECCIONES GENERALES ==================== */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==================== CARACTERÍSTICAS ==================== */
.features-section {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--border-radius);
    background: white;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==================== BENEFICIOS ==================== */
.benefits-section {
    background: var(--light-bg);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.benefit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.benefit-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 3;
}

.benefit-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.benefit-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Dashboard Preview */
.dashboard-preview {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    background: var(--border-color);
    border-radius: 50%;
}

.preview-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-content {
    padding: 32px;
}

.preview-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.preview-stat .stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.preview-stat .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.preview-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px 4px 0 0;
    transition: var(--transition);
    animation: barGrow 1s ease-out forwards;
}

.chart-bar:hover {
    opacity: 0.8;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 24px;
}

.cta-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.cta-description {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

.cta-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.check-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ==================== ANIMACIONES ==================== */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes progressAnimation {
    0%, 100% {
        transform: scaleX(0.75);
    }
    50% {
        transform: scaleX(1);
    }
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

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

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-visual {
        order: -1;
        height: 400px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .benefit-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 80px 16px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cta-title {
        font-size: 36px;
    }
    
    .cta-description {
        font-size: 18px;
    }
    
    .hero-visual {
        height: 350px;
    }
    
    .card-1,
    .card-2 {
        width: 280px;
    }
}

/* ==== Centrar hero-badge en móviles ==== */
@media (max-width: 768px) {
  .hero-badge {
    display: flex;
    justify-content: center; /* centra el contenido */
    align-items: center;
    margin: 0 auto 20px auto; /* centra el bloque y da espacio debajo */
    text-align: center;
    font-size: 13px; /* ligeramente más pequeño para móviles */
    padding: 8px 14px; /* ajusta el padding para pantallas pequeñas */
  }
}




@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 15px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-container {
        padding: 60px 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .cta-container {
        padding: 60px 16px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-description {
        font-size: 16px;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .visual-card {
        padding: 16px;
    }
    
    .card-1,
    .card-2 {
        width: 240px;
    }
    
    .floating-element {
        width: 48px;
        height: 48px;
    }
    
    .floating-element svg {
        width: 24px;
        height: 24px;
    }
}

/* Estados de focus para accesibilidad */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animaciones de entrada para elementos */
.feature-card,
.benefit-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.benefit-item:nth-child(1) { animation-delay: 0.1s; }
.benefit-item:nth-child(2) { animation-delay: 0.2s; }
.benefit-item:nth-child(3) { animation-delay: 0.3s; }
.benefit-item:nth-child(4) { animation-delay: 0.4s; }


/* Menos espacio entre Hero y Características */
.hero-section {
    padding-bottom: 40px; /* antes 80px */
}

.features-section .section-container {
    padding-top: 40px; /* antes 100px */
}

/* Opcional: reduce también el espacio bajo el título de la sección */
.features-section .section-header {
    margin-bottom: 40px; /* antes 64px */
}

/* Ajustes en móviles */
@media (max-width: 768px) {
    .features-section .section-container { padding-top: 32px; }
    .features-section .section-header { margin-bottom: 32px; }
}


/* ==== Ajuste de espaciado del HERO en tablet y móvil (más pegado al header) ==== */
@media (max-width: 1024px) {
  .hero-section {
    padding: 24px 0 48px; /* menos aire arriba */
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 16px 0 40px; /* aún más pegado en tablet pequeña */
    min-height: auto;      /* evita espacio vertical extra */
  }
  .hero-container {
    gap: 32px;             /* reduce separación interna */
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 12px 0 32px;  /* móvil bien pegado al header */
    min-height: auto;
  }
  /* Opcional: suaviza la mancha de fondo para que no empuje visualmente */
  .hero-section::before {
    top: -65%;
    right: -20%;
    width: 420px;
    height: 420px;
    opacity: 0.35;
  }
}



/* ==== Invertir el orden y adaptar el hero en móviles ==== */
@media (max-width: 768px) {
  .hero-container {
    display: flex;
    flex-direction: column-reverse; /* invierte el orden */
    gap: 40px;
    align-items: center; /* centra el contenido */
    text-align: center; /* centra texto */
  }

  .hero-content {
    order: 2;
    width: 100%;
    margin-top: 20px;
  }

  .hero-visual {
    order: 1;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 10px;
  }

  .visual-card {
    position: relative; /* evita recortes */
    width: 90%;
    max-width: 320px;
    margin: 0 auto;
    animation: none; /* opcional: desactiva animación si se deforma */
  }

  .card-1, .card-2 {
    position: static;
    margin-bottom: 20px;
    width: 100%;
  }

  /* Ajustar el fondo radial */
  .hero-section::before {
    top: -40%;
    right: -30%;
    width: 400px;
    height: 400px;
    opacity: 0.25;
  }
}


/* ==== Beneficios: adaptación móvil y tablet ==== */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 40px;                 /* menos separación vertical */
  }
  .dashboard-preview {
    order: 2;                  /* la tarjeta va debajo del texto */
    width: 100%;
  }
}

/* Móvil */
@media (max-width: 768px) {
  .benefits-section .section-container {
    padding: 60px 16px;        /* menos padding lateral */
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Asegura orden: contenido (lista) arriba, tarjeta abajo */
  .dashboard-preview { 
    order: 2; 
  }

  /* Mejora legibilidad y compacta lista */
  .benefit-list {
    margin-top: 16px;
    gap: 16px;
  }
  .benefit-item { 
    align-items: center; 
  }
  .benefit-icon {
    width: 28px; 
    height: 28px;
  }
  .benefit-icon svg {
    width: 16px; 
    height: 16px; 
  }

  /* Tarjeta/preview más compacta en móvil */
  .preview-header { 
    padding: 12px 16px; 
  }
  .preview-content { 
    padding: 20px; 
  }
  .preview-stat .stat-value { 
    font-size: 36px; 
  }
  .preview-chart { 
    height: 100px; 
    gap: 8px; 
  }
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .benefits-section .section-container {
    padding: 48px 16px;
  }
  .benefit-title { 
    font-size: 16px; 
  }
  .benefit-text { 
    font-size: 14px; 
  }
  .preview-content { 
    padding: 16px; 
  }
}

/* ==== Ajuste de márgenes laterales en móviles ==== */
@media (max-width: 768px) {
  .benefits-section .section-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .benefit-list {
    padding-left: 4px;
    padding-right: 4px;
  }
}

.feature-card { animation: none !important; opacity: 1 !important; }
.feature-card:hover { transform: none; box-shadow: none; border-color: var(--border-color); }