/* ============================================
   AUTOFLOW - MAIN STYLESHEET
   Optimizado para performance y Netlify
   ============================================ */

/* RESET Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

/* ============================================
   DESIGN TOKENS - VARIABLES CSS
   ============================================ */
:root {
    /* Color Palette */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background-light: #f8fafc;
    --background-white: white;

    /* Shadows - Elevation System */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);

    /* Border Radius */
    --border-radius: 15px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #06b6d4 100%);
}

.light-bg {
    background: var(--background-light);
}

.white-bg {
    background: var(--background-white);
}

.hidden {
    display: none;
}

.show {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   CARD SYSTEM
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #059669 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

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

.btn-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-orange:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--background-white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo img {
    max-height: 45px;
    min-height: 25px;
    height: auto;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ============================================
   STEP CARDS (¿Cómo funciona?)
   ============================================ */
.step-card {
    position: relative;
}

.step-number {
    font-size: 2.2rem;
    color: #06b6d4;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.12rem;
}

.step-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ============================================
   PRICING CARDS
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
}

.pricing-card.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.pricing-card.featured .price {
    color: white;
}

.price-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.plan-features li:last-child {
    border-bottom: none;
}

.pricing-card.featured .plan-features li {
    border-bottom-color: rgba(255,255,255,0.2);
}

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

/* ============================================
   PRODUCT SECTION
   ============================================ */
.product-content {
    background: linear-gradient(135deg, #e0f2fe 0%, #f3e5f5 100%);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 3rem;
}

.product-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* ============================================
   SNEAK PEAK
   ============================================ */
.sneak-peak-container {
    text-align: center;
    margin: 2rem 0 0.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: var(--border-radius);
    border: 2px dashed #f59e0b;
}

.sneak-peak-title {
    font-size: 1.3rem;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.sneak-peak-subtitle {
    color: #b45309;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ============================================
   FORM STYLES
   ============================================ */
.formulario-section {
    background: var(--background-light);
}

.propuesta-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.otro-input {
    margin-top: 0.5rem;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.agendamiento-section {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 2rem;
    text-align: center;
}

.calendario-container {
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 1000;
    transition: width 0.3s;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    .pricing-card.featured {
        transform: none;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .propuesta-form {
        padding: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
