/* ==========================================
   PAGES/HOME - Estilos específicos de Home
   ========================================== */

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: var(--space-2xl) 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-lg);
}

.hero-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.availability-badge {
    position: absolute;
    bottom: -8px;
    right: -12px;
    background: var(--success);
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-weight: 600;
    white-space: nowrap;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    width: 100%;
}

.highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    list-style: none;
}

.hero-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-benefits i {
    color: var(--accent);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
}

/* Problem Section */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition);
}

.problem-card:hover {
    border-color: var(--accent-soft);
}

.problem-card i {
    font-size: 2rem;
    color: var(--warning);
    margin-bottom: var(--space-sm);
}

.problem-card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.problem-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Solution Section */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.solution-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition);
}

.solution-card:hover {
    border-color: var(--accent);
}

.solution-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.solution-icon i {
    font-size: 1.5rem;
    color: var(--accent);
}

.solution-card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.solution-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Methodology Section */
.methodology-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    text-align: center;
}

.step {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.step:hover {
    border-color: var(--accent);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Credentials Section */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    text-align: center;
}

.credential {
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.credential:hover {
    border-color: var(--accent);
}

.credential i {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.cred-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin: var(--space-xs) 0;
}

.cred-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    padding: var(--space-2xl) 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--accent-soft), rgba(0, 0, 0, 0.3));
    border: 1px solid var(--accent);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
}

.cta-card h2 {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.cta-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.cta-card small {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

/* Responsive Home */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-benefits {
        gap: var(--space-md);
    }
    
    .hero-benefits li {
        font-size: 0.85rem;
    }
    
    .problem-grid,
    .solution-grid,
    .methodology-steps,
    .credentials-grid {
        gap: var(--space-sm);
    }
    
    .cta-card {
        padding: var(--space-lg);
    }
    
    .cta-card h2 {
        font-size: 1.4rem;
    }
}

/* ==========================================
   COMPONENTS/CASE-STUDY - Slider + Results + Accordion
   ========================================== */

.case-component {
    margin-top: var(--space-xl);
    width: 100%;
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
    margin: 0 0 var(--space-lg) 0;
    cursor: ew-resize;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.compare-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--bg-deep);
    overflow: hidden;
}

.compare-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;  /* ← Centrado horizontal y vertical */
    display: block;
    pointer-events: none;
    background: var(--bg-deep); /* Fondo oscuro para bandas */
}

.img-before {
    z-index: 1;
    filter: brightness(0.85) contrast(0.95) saturate(0.9);
}

.img-after {
    z-index: 2;
    filter: brightness(1.05) contrast(1.08) saturate(1.05);
    clip-path: inset(0 0 0 50%);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--text-primary);
    z-index: 10;
    transform: translateX(-50%);
    cursor: ew-resize;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    pointer-events: auto;
}

.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    background: var(--text-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    background: radial-gradient(circle at 35% 35%, #fff, #ececec);
}

.slider-handle:hover::after,
.slider-handle:active::after {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2);
}

.image-label {
    position: absolute;
    top: 1rem;
    z-index: 12;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.25rem 1rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    pointer-events: none;
}

.label-before {
    left: 1rem;
    border-left: 2px solid #ff5e5e;
}

.label-after {
    right: 1rem;
    border-right: 2px solid #2ecc71;
}

.drag-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 0.25rem 1rem;
    border-radius: 40px;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 15;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.4s ease;
}

.drag-hint.fade-out {
    opacity: 0;
}

/* Results Compact */
.results-compact {
    background: linear-gradient(135deg, rgba(26, 31, 42, 0.8), rgba(17, 21, 28, 0.9));
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.results-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b3e4cf;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metrics-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-sm);
}

.metric-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
    margin-left: auto;
}

/* Accordion */
.tech-accordion {
    margin-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-md);
}

.accordion-btn {
    background: transparent;
    border: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
}

.accordion-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.accordion-icon {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.accordion-content.open {
    max-height: 800px;
}

.accordion-inner {
    padding: var(--space-md) 0 0 0;
}

.comparison-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.column-before {
    background: linear-gradient(135deg, rgba(255, 80, 80, 0.08), rgba(255, 50, 50, 0.02));
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border-left: 3px solid #ff5e5e;
}

.column-after {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(46, 204, 113, 0.02));
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border-left: 3px solid #2ecc71;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.before-header .column-title {
    color: #ff8a8a;
}

.after-header .column-title {
    color: #6fe7b0;
}

.issue-list,
.improvement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.issue-item,
.improvement-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.issue-icon {
    color: #ff6b6b;
    font-size: 0.8rem;
    min-width: 20px;
}

.improvement-icon {
    color: #2ecc71;
    font-size: 0.8rem;
    min-width: 20px;
}

/* Responsive */
@media (min-width: 1024px) {
    .compare-wrapper {
        padding-bottom: 0;
       height: 393px; /* Aumentado de 360px a 520px */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .compare-wrapper {
        padding-bottom: 0;
        height: 420px; /* Altura para tablets */
    
    }


}


@media (max-width: 767px) {
    .compare-wrapper {
        padding-bottom: 56.25%; /* 16:9 en móvil */
    }
}

@media (max-width: 680px) {
    .slider-handle::after {
        width: 32px;
        height: 32px;
    }
    
    .drag-hint {
        font-size: 0.6rem;
        bottom: 8px;
    }
    
    .metrics-row {
        flex-direction: column;
    }
    
    .metric-item {
        width: 100%;
    }
    
    .metric-value {
        margin-left: 0;
    }
    
    .comparison-dual {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .slider-handle::after {
        width: 32px;
        height: 32px;
    }
    
    .drag-hint {
        font-size: 0.6rem;
        bottom: 8px;
    }
    
    .metrics-row {
        flex-direction: column;
    }
    
    .metric-item {
        width: 100%;
    }
    
    .metric-value {
        margin-left: 0;
    }
    
    .comparison-dual {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   RESPONSIVE: Slider desktop / Imagen móvil
   ========================================== */

/* Por defecto (mobile first) - mostrar imagen móvil, ocultar slider */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

/* Imagen estática para móvil */
.comparativa-mobile-img {
    margin-bottom: 12px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

/* Tablet y desktop (min-width: 769px) - mostrar slider, ocultar imagen */
@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}