/* ===================================
   ARCHIVO: assets/css/home.css
   Estilos específicos para la página de inicio
   =================================== */

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    min-height: 500px;
}

.hero-text {
    z-index: 3;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-xl);
    padding: 1.2rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.floating-card:hover {
    transform: scale(1.05);
}

.floating-card.card-1 {
    top: 15%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-2 {
    top: 45%;
    right: 5%;
    animation: float 6s ease-in-out infinite 2s;
}

.floating-card.card-3 {
    bottom: 15%;
    left: 15%;
    animation: float 6s ease-in-out infinite 4s;
}

.card-icon {
    font-size: 1.5rem;
}

.card-text {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-15px) rotate(1deg); 
    }
    66% { 
        transform: translateY(-10px) rotate(-1deg); 
    }
}

/* ===================================
   CATALOG PREVIEW
   =================================== */

.catalog-preview {
    padding: 4rem 0;
    background: 
        linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.9)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23f0f0f0" opacity="0.5"/><circle cx="75" cy="75" r="1" fill="%23f0f0f0" opacity="0.3"/><circle cx="50" cy="10" r="0.5" fill="%23f0f0f0" opacity="0.4"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.access-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.notice-icon {
    font-size: 1rem;
}

.products-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.preview-product-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.preview-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.preview-product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.preview-product-card:hover::before {
    opacity: 1;
}

.preview-product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.preview-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.preview-product-card:hover .preview-product-image img {
    transform: scale(1.1);
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    background: linear-gradient(135deg, #f1f3f4, #e0e0e0);
}

.no-image span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.preview-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.preview-product-info {
    padding: 1.5rem;
    position: relative;
}

.preview-product-info h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
    font-size: 1.1rem;
}

.preview-factory {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.preview-pricing {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success-color);
    display: block;
}

.price-hidden {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.95rem;
    text-align: center;
    padding: 0.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius-md);
}

.preview-footer {
    text-align: center;
    margin-top: 2rem;
}

/* ===================================
   FEATURES SECTION
   =================================== */

.features-section {
    padding: 4rem 0;
    background: var(--white);
}

.features-section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

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

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* ===================================
   PROCESS SECTION
   =================================== */

.process-section {
    padding: 4rem 0;
    background: 
        linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
}

.process-section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 700;
}

.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
    max-width: 200px;
    flex: 1;
    min-width: 180px;
}

.step-number {
    width: 70px;
    height: 70px;
    background: var(--gradient-secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    position: relative;
    z-index: 2;
}

.step-number::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.2;
    animation: pulse-step 2s infinite;
}

@keyframes pulse-step {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.process-arrow {
    font-size: 2rem;
    color: var(--secondary-color);
    margin: 0 1rem;
    opacity: 0.6;
    animation: arrow-bounce 2s infinite;
}

@keyframes arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    padding: 4rem 0;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px, 20px 20px;
    background-position: 0 0, 25px 25px;
    animation: bg-drift 20s linear infinite;
    pointer-events: none;
}

@keyframes bg-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cta-note {
    margin-top: 1.5rem;
    opacity: 0.8;
}

.cta-note small {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-visual {
        height: 300px;
        order: -1;
    }
    
    .floating-card {
        padding: 1rem 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        min-height: 60vh;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .products-preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .process-steps {
        flex-direction: column;
        gap: 2rem;
    }
    
    .process-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-note small {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-visual {
        height: 250px;
    }
    
    .floating-card {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }
    
    .floating-card.card-1 {
        top: 10%;
        left: 2%;
    }
    
    .floating-card.card-2 {
        top: 50%;
        right: 2%;
    }
    
    .floating-card.card-3 {
        bottom: 10%;
        left: 8%;
    }
    
    .catalog-preview,
    .features-section,
    .process-section,
    .cta-section {
        padding: 2rem 0;
    }
    
    .products-preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .preview-product-image {
        height: 180px;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .process-step {
        min-width: 150px;
        max-width: 180px;
    }
}

/* ===================================
   ANIMACIONES ADICIONALES
   =================================== */

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicar animaciones con delay progresivo */
.feature-card {
    animation: fadeInUp 0.6s ease-out 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; }

.preview-product-card {
    animation: fadeInScale 0.5s ease-out forwards;
    opacity: 0;
}

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

.process-step {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.process-step:nth-child(1) { animation-delay: 0.2s; }
.process-step:nth-child(2) { animation-delay: 0.4s; }
.process-step:nth-child(3) { animation-delay: 0.6s; }
.process-step:nth-child(4) { animation-delay: 0.8s; }

/* ===================================
   ESTADOS HOVER AVANZADOS
   =================================== */

.hero-actions .btn-large {
    position: relative;
    overflow: hidden;
}

.hero-actions .btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hero-actions .btn-large:hover::before {
    left: 100%;
}

/* Efecto de brillo en las tarjetas de features */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.feature-card:hover::after {
    transform: rotate(45deg) translate(100%, 100%);
}

/* ===================================
   MODO OSCURO ESPECÍFICO
   =================================== */

@media (prefers-color-scheme: dark) {
    .catalog-preview {
        background: 
            linear-gradient(135deg, rgba(18, 18, 18, 0.8), rgba(30, 30, 30, 0.9)),
            url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dark-grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23333" opacity="0.3"/><circle cx="75" cy="75" r="1" fill="%23333" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23dark-grain)"/></svg>');
    }
    
    .preview-product-card {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .feature-card {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .no-image {
        background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    }
}