/* Estilos personalizados para FactoriaTextil Landing Page */

/* Variables CSS para colores de marca */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
}

/* Fuentes y tipografía */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Gradientes personalizados */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animaciones personalizadas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Clases de animación */
.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

.animate-bounce-custom {
    animation: bounce 2s infinite;
}

/* Botón de WhatsApp flotante mejorado */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #25d366, #128c7e);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-float:hover::before {
    opacity: 1;
    animation: pulse 1s ease-out;
}

/* Efectos de hover para cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Efectos para botones CTA */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Indicador de scroll */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 100;
    transition: width 0.1s ease;
}

/* Efectos de hover para navegación */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mejoras para el formulario */
.form-field {
    position: relative;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.form-field .error-message {
    animation: fadeInUp 0.3s ease-out;
}

/* Loading spinner personalizado */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Efectos para testimonials */
.testimonial-card {
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
}

.testimonial-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Efectos para galería */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item .gallery-icon {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-icon {
    transform: scale(1.2);
    color: white;
}

/* Banner de urgencia parpadeante */
.urgency-banner {
    animation: urgencyPulse 2s ease-in-out infinite;
}

@keyframes urgencyPulse {
    0%, 100% { 
        background-color: #dc2626; 
    }
    50% { 
        background-color: #ef4444; 
    }
}

/* Efectos para secciones */
.section-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos para contadores y números */
.counter-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2.5em;
    line-height: 1;
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .gradient-text {
        font-size: 2.5rem;
    }
}

/* Mejoras para accesibilidad */
.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Efectos para botones secundarios */
.btn-secondary {
    position: relative;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Toast notifications */
.toast-notification {
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--success-color);
}

.toast-notification.error {
    border-left-color: var(--error-color);
}

/* Mejoras para el footer */
.footer-link {
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

/* Efectos de typing para texto dinámico */
.typing-effect {
    border-right: 2px solid var(--accent-color);
    animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-color); }
}

/* ============================================
   MOBILE-FIRST OPTIMIZATIONS
   ============================================ */

/* Base Mobile Styles (320px+) */
@media (max-width: 640px) {
    /* Layout and Spacing */
    .mobile-container {
        padding: 0 1rem;
    }
    
    .mobile-section {
        padding: 2rem 0;
    }
    
    .mobile-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    /* Typography */
    .mobile-hero-title {
        font-size: 1.875rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .mobile-section-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .mobile-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .mobile-small-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Buttons */
    .mobile-cta {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
        width: 100%;
        text-align: center;
        margin-bottom: 0.75rem;
    }
    
    .mobile-btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Navigation */
    .mobile-nav {
        padding: 0.5rem 0;
    }
    
    .mobile-nav-item {
        padding: 0.75rem 0;
        font-size: 0.95rem;
    }
    
    /* WhatsApp Float */
    .mobile-whatsapp {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
    }
    
    /* Tables */
    .mobile-table {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    .mobile-table-cell {
        padding: 0.5rem 0.25rem;
        text-align: center;
    }
    
    .mobile-table-header {
        padding: 0.625rem 0.375rem;
        font-size: 0.7rem;
    }
    
    /* Colors Section */
    .mobile-color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .mobile-color-item {
        text-align: center;
    }
    
    .mobile-color-circle {
        width: 2.5rem;
        height: 2.5rem;
        margin: 0 auto 0.5rem;
    }
    
    .mobile-color-name {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    /* Forms */
    .mobile-form-input {
        padding: 0.875rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 0.5rem;
    }
    
    .mobile-form-button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        min-height: 52px;
    }
    
    /* FAQ */
    .mobile-faq-item {
        margin-bottom: 0.75rem;
    }
    
    .mobile-faq-question {
        padding: 1rem;
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .mobile-faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Pricing Notes */
    .mobile-pricing-note {
        padding: 1rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .mobile-pricing-icon {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-pricing-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-pricing-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    /* Services Cards */
    .mobile-service-card {
        padding: 1.25rem;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .mobile-service-icon {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-service-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-service-text {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
}

/* Small Mobile (320px-480px) */
@media (max-width: 480px) {
    .xs-mobile-title {
        font-size: 1.5rem;
    }
    
    .xs-mobile-padding {
        padding: 0.75rem;
    }
    
    .xs-mobile-text {
        font-size: 0.9rem;
    }
}

/* Large Mobile / Small Tablet (641px-768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .tablet-small-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .tablet-small-padding {
        padding: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .card-hover:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .btn-secondary:hover {
        background-color: transparent;
        transform: none;
    }
    
    /* Increase touch targets */
    button, 
    .cta-button, 
    .btn-secondary,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Better focus states for accessibility */
    button:focus,
    .cta-button:focus,
    .btn-secondary:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
}

/* ============================================
   ENHANCED NAVIGATION STYLES
   ============================================ */

/* Navigation Link Hover Effects */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

/* Enhanced Navigation Logo */
.nav-logo-hover {
    transition: all 0.3s ease;
}

.nav-logo-hover:hover {
    transform: scale(1.05);
}

/* Mobile Menu Animation */
.mobile-nav-item {
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInFromLeft 0.3s ease forwards;
}

.mobile-nav-item:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-item:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-item:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-item:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-item:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFromLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(8px)) {
    .nav-backdrop-blur {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Progress Bar Animation */
.progress-bar {
    background: linear-gradient(90deg, 
        var(--primary-color) 0%, 
        var(--accent-color) 50%, 
        var(--secondary-color) 100%);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Enhanced Mobile Menu Button */
.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Active Section Indicator */
.nav-active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Smooth Scroll Enhancement */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Navigation Scroll Effects */
.nav-scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-scrolled .nav-link {
    font-size: 0.875rem;
}

/* Enhanced CTA Button in Navigation */
.nav-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav-cta:hover::before {
    left: 100%;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Icon Enhancements */
.nav-icon {
    transition: all 0.3s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* Focus States for Accessibility */
.nav-link:focus,
.mobile-nav-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Loading State for Navigation */
.nav-loading {
    position: relative;
}

.nav-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Navigation Adjustments */
@media (max-width: 1024px) {
    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-cta {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .mobile-nav-item {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }
    
    .mobile-menu-cta {
        margin: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

/* Enhanced Hover Effects */
.nav-hover-effect {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-hover-effect::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-hover-effect:hover::after {
    width: 100%;
}

/* Section Intersection Animations */
.section-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
} 