/* Index Page Specific Styles - Main Landing Page */

/* =====================================================
   HERO SECTION - Progressive Intelligence Theme
   ===================================================== */

.hero-progressive {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-50) 0%, #ecfdf5 50%, var(--gray-50) 100%);
    padding-top: 80px;
    padding-bottom: 2rem; /* Agregar padding bottom por defecto */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.energy-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(5, 150, 105, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 10%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
    animation: energy-flow 20s ease-in-out infinite;
}

@keyframes energy-flow {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.02) rotate(0.5deg); opacity: 1; }
}

.floating-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.floating-nodes::before,
.floating-nodes::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
    animation: float-nodes 25s ease-in-out infinite;
}

.floating-nodes::before {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.floating-nodes::after {
    bottom: 15%;
    right: 10%;
    animation-delay: 12s;
}

@keyframes float-nodes {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(15px, -15px) scale(1.05); opacity: 0.8; }
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 0; /* Prevent unnecessary stretching */
}

.hero-content {
    animation: fade-in-up 1s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    position: relative;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-trust-metrics {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.trust-metric {
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Hero Visual - AI Dashboard */
.hero-visual {
    animation: fade-in-left 1s ease-out 0.3s both;
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-dashboard {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
}

.status-dot.active {
    background: var(--primary);
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.live-clock {
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.intelligence-stages {
    margin-bottom: 2rem;
}

.stage {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
    opacity: 0.5;
}

.stage.active {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.2);
    opacity: 1;
}

.stage-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.stage-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.stage-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
}

.valuation-preview {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.price-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-min, .price-max {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-separator {
    color: var(--gray-400);
    font-size: 1.2rem;
}

.confidence-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.confidence-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 2s ease-out;
}

/* =====================================================
   SUSTAINABILITY SECTION
   ===================================================== */

.sustainability-section {
    background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
}

.sustainability-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sustainability-metrics {
    margin: 2rem 0;
}

.metric-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    transition: background var(--transition-normal);
}

.metric-row:hover {
    background: rgba(5, 150, 105, 0.05);
}

.metric-icon {
    font-size: 2rem;
    min-width: 60px;
    text-align: center;
    color: var(--primary);
}

.metric-info h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.metric-info p {
    margin: 0;
    color: var(--gray-600);
}

.sustainability-cta {
    margin-top: 2rem;
}

.eco-impact-chart {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-btn.active,
.chart-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.impact-visualization {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
}

.impact-icon {
    font-size: 2rem;
    min-width: 60px;
    text-align: center;
    color: var(--primary);
}

.impact-data {
    flex: 1;
}

.impact-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.impact-label {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* =====================================================
   VALORADOR SECTION
   ===================================================== */

.valorador-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: white;
    display: flex;
    flex-direction: column;
}

.valorador-header {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.valorador-header .section-subtitle {
    color: var(--primary-light);
}

.valorador-header h2 {
    color: white;
    margin-bottom: 1rem;
}

.valorador-header p {
    color: var(--gray-300);
}

.valorador-container {
    flex: 1;
    margin: 0 auto;
}

#app {
    width: 100%;
}

/* =====================================================
   USE CASES SECTION
   ===================================================== */

.use-cases-section {
    background: var(--gray-50);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.use-case-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.case-number {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.case-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.use-case-card h3 {
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.use-case-card p {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
}

.case-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* =====================================================
   INSIGHTS SECTION
   ===================================================== */

.insights-section {
    background: white;
}

.insights-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.insights-list {
    margin: 2rem 0;
}

.insight-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    transition: background var(--transition-normal);
}

.insight-item:hover {
    background: var(--gray-50);
}

.insight-icon {
    font-size: 2rem;
    min-width: 60px;
    text-align: center;
    color: var(--primary);
}

.insight-content h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.insight-content p {
    margin: 0;
    color: var(--gray-600);
}

.insights-visual {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.simple-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    min-width: 60px;
    text-align: center;
    color: var(--primary);
}

.stat-info h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-size: 1.1rem;
}

.stat-info p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* =====================================================
   TRUST SECTION
   ===================================================== */

.trust-section {
    background: var(--gray-50);
}

.trust-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.trust-metric-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
}

.trust-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trust-metric-card .metric-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.trust-metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.trust-metric-card .metric-label {
    color: var(--gray-600);
    font-weight: 500;
}

.testimonials-carousel {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    text-align: left;
}

.testimonial-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* =====================================================
   COUNTER ANIMATIONS
   ===================================================== */

.counter-animation {
    animation: count-up 2s ease-out;
}

@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RESPONSIVE DESIGN - INDEX SPECIFIC
   ===================================================== */

/* Tablet and larger mobile devices */
@media (max-width: 1024px) {
    .hero-container,
    .sustainability-content,
    .insights-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* En tablet, el contenido va primero */
    .hero-content {
        order: 1;
        text-align: center;
    }
    
    .hero-visual {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-description {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .insights-visual {
        order: -1;
    }
    
    /* Reduce animation intensity on smaller screens */
    .energy-grid {
        animation: energy-flow 30s ease-in-out infinite;
    }
    
    .floating-nodes::before,
    .floating-nodes::after {
        animation: float-nodes 35s ease-in-out infinite;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .hero-progressive {
        padding-top: 100px; /* Aumentado para evitar que tape la nav */
        min-height: auto;
        padding-bottom: 3rem;
    }
    
    .hero-container {
        gap: 3rem; /* Más espacio entre elementos */
        padding: 0 1rem;
        grid-template-columns: 1fr; /* Una sola columna en móvil */
    }
    
    /* El contenido de texto va primero en móvil */
    .hero-content {
        order: 1;
        text-align: center;
        padding-top: 1rem; /* Espacio adicional arriba */
    }
    
    /* El visual va segundo en móvil */
    .hero-visual {
        order: 2;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-trust-metrics {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .trust-metric {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
    
    /* AI Dashboard responsive adjustments */
    .ai-dashboard {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .status-indicator {
        justify-content: center;
    }
    
    .intelligence-stages {
        margin-bottom: 1.5rem;
    }
    
    .stage {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .stage-icon {
        font-size: 1.25rem;
        min-width: 35px;
    }
    
    .stage-content h4 {
        font-size: 0.9rem;
    }
    
    .stage-content p {
        font-size: 0.8rem;
    }
    
    .valuation-preview {
        padding: 1rem;
    }
    
    .price-range {
        gap: 0.5rem;
    }
    
    .price-min, .price-max {
        font-size: 1.3rem;
    }
    
    .confidence-score {
        gap: 0.5rem;
        text-align: center;
    }
    
    .confidence-bar {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    /* Reduce background animations on mobile */
    .floating-nodes::before,
    .floating-nodes::after {
        width: 100px;
        height: 100px;
        animation: float-nodes 40s ease-in-out infinite;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .valorador-section {
        min-height: 100vh;
    }
    
    .valorador-header {
        padding: 1rem;
    }

    .sustainability-text {
        max-width: 95vw;;
    }

    .sustainability-visual {
        max-width: 90vw;
    }

    .chart-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-progressive {
        padding-top: 80px; /* Padding suficiente para nav en móviles pequeños */
        padding-bottom: 2rem;
    }
    
    .hero-container {
        padding: 0 0.75rem;
        gap: 2rem; /* Espacio entre contenido y visual */
    }
    
    /* Orden específico para móviles pequeños */
    .hero-content {
        order: 1;
        padding-top: 0.5rem;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-trust-metrics {
        gap: 1rem;
    }
    
    .trust-metric {
        gap: 0.25rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
    
    .ai-dashboard {
        padding: 1rem;
        margin: 0 0.5rem;
        border-radius: 16px;
    }
    
    .dashboard-header {
        margin-bottom: 1rem;
    }
    
    .status-indicator {
        font-size: 0.9rem;
    }
    
    .live-clock {
        font-size: 0.8rem;
    }
    
    .stage {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .stage-icon {
        font-size: 1rem;
        min-width: 30px;
    }
    
    .stage-content h4 {
        font-size: 0.8rem;
        margin-bottom: 0.125rem;
    }
    
    .stage-content p {
        font-size: 0.75rem;
    }
    
    .valuation-preview {
        padding: 0.75rem;
    }
    
    .price-min, .price-max {
        font-size: 1.1rem;
    }
    
    .confidence-score {
        font-size: 0.8rem;
    }
    
    /* Disable complex animations on very small screens */
    .energy-grid {
        animation: none;
        opacity: 0.3;
    }
    
    .floating-nodes::before,
    .floating-nodes::after {
        animation: none;
        opacity: 0.2;
    }
    
    .use-case-card,
    .trust-metric-card {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .trust-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .hero-progressive {
        padding-top: 80px; /* Mantener padding suficiente */
    }
    
    .hero-container {
        gap: 1.5rem; /* Espacio entre elementos */
    }
    
    /* Asegurar orden correcto */
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }
    
    .ai-dashboard {
        padding: 0.75rem;
        margin: 0 0.25rem;
    }
    
    .stage {
        padding: 0.4rem;
        gap: 0.5rem;
    }
    
    .stage-icon {
        font-size: 0.9rem;
        min-width: 25px;
    }
    
    .valuation-preview {
        padding: 0.5rem;
    }
}

/* Print styles for index */
@media print {
    .hero-background,
    .floating-nodes,
    .energy-grid {
        display: none;
    }
    
    .hero-progressive {
        background: white;
    }
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .energy-grid,
    .floating-nodes::before,
    .floating-nodes::after,
    .badge-pulse,
    .status-dot.active,
    .confidence-fill {
        animation: none;
    }
    
    .hero-content,
    .hero-visual {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .energy-grid {
        opacity: 0.1;
    }
    
    .floating-nodes::before,
    .floating-nodes::after {
        opacity: 0.1;
    }
}
