/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   PORTADA PREMIUM
   ============================================ */
.cover {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    position: relative;
    overflow: hidden;
}

.cover::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(180deg); }
}

.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
}

.icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.cover-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.cover-subtitle {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 60px;
    letter-spacing: 0.5px;
}

.transformation {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 50px 40px;
    margin-top: 50px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.transformation-item {
    margin: 20px 0;
}

.transformation-item .emoji {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
}

.transformation-item p {
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 600;
    line-height: 1.4;
}

.transformation-arrow {
    font-size: 48px;
    margin: 30px 0;
    opacity: 0.8;
}

/* ============================================
   SECCIONES Y PÁGINAS
   ============================================ */
.page {
    padding: 80px 40px;
}

h2 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 10px;
}

h3 {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    color: var(--dark);
    margin-top: 50px;
    margin-bottom: 25px;
}

h4 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
}

h5 {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

p {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 20px;
}

strong {
    color: var(--dark);
    font-weight: 600;
}

/* ============================================
   CAJAS DE CONTENIDO
   ============================================ */
.highlight-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-left: 5px solid var(--primary);
    padding: 35px;
    margin: 40px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding: 12px 0 12px 40px;
    position: relative;
    font-size: clamp(15px, 2vw, 17px);
    color: var(--dark);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* ============================================
   TARJETAS DE ESTRATEGIA
   ============================================ */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.strategy-card {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 35px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.strategy-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.strategy-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
}

.strategy-card h3 {
    margin-top: 0;
    color: var(--primary);
}

/* ============================================
   CAJAS DE EJEMPLO
   ============================================ */
.example-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
    border-left: 5px solid var(--warning);
    padding: 30px;
    margin: 30px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.example-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.example-icon {
    font-size: 32px;
}

.example-box strong {
    font-size: 20px;
    color: var(--dark);
}

.example-box p {
    margin: 0;
    color: var(--gray);
}

.example-box.apple {
    border-left-color: #333;
}

.example-box.nike {
    border-left-color: var(--dark);
}

/* ============================================
   CAJAS DE RESULTADOS
   ============================================ */
.results-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 5px solid var(--success);
    padding: 35px;
    margin: 40px 0;
    border-radius: var(--border-radius);
}

.results-box h4 {
    color: var(--dark);
    margin-bottom: 20px;
}

.results-box ul {
    list-style: none;
    padding: 0;
}

.results-box li {
    padding: 10px 0 10px 35px;
    position: relative;
    color: var(--gray);
}

.results-box li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 24px;
    font-weight: bold;
}

/* ============================================
   TRES COLUMNAS
   ============================================ */
.three-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.column-item {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.column-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.column-number {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 20px;
}

/* ============================================
   FRAMEWORK BOX
   ============================================ */
.framework-box {
    background: var(--white);
    border: 3px solid var(--primary);
    padding: 40px;
    margin: 50px 0;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.framework-box h4 {
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 24px;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.process-step {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    padding: 18px 30px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary);
    font-size: clamp(14px, 2vw, 18px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.process-step:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.flow-arrow {
    color: var(--primary);
    font-size: 28px;
    font-weight: bold;
}

/* ============================================
   PASOS DE FÓRMULA
   ============================================ */
.formula-steps {
    margin: 40px 0;
}

.formula-step {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    padding: 25px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.formula-step:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.step-number {
    min-width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark);
}

.step-content p {
    margin: 0;
    font-size: 16px;
}

/* ============================================
   KEY INSIGHT
   ============================================ */
.key-insight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid var(--warning);
    padding: 30px;
    margin: 40px 0;
    border-radius: var(--border-radius);
    font-size: 18px;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}

.key-insight strong {
    color: var(--dark);
    font-size: 20px;
}

/* ============================================
   SECCIÓN DE ERRORES
   ============================================ */
.errors-section {
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}

.error-card {
    background: var(--white);
    border-radius: var(--border-radius);
    margin: 40px 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid #fee2e2;
}

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

.error-header {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    padding: 25px 35px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.error-icon {
    font-size: 36px;
}

.error-header h3 {
    margin: 0;
    color: var(--error);
    font-size: clamp(20px, 3vw, 28px);
}

.error-content {
    padding: 35px;
}

.error-item {
    margin-bottom: 25px;
}

.error-item strong {
    display: block;
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 10px;
}

.error-item p {
    color: var(--gray);
    margin: 0;
}

.error-item.solution {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success);
}

.error-item.solution strong {
    color: var(--success);
}

.example-inline {
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    border-left: 4px solid var(--warning);
}

.badge {
    display: inline-block;
    background: var(--warning);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.example-inline p {
    margin: 0;
    font-size: 16px;
    color: var(--dark);
}

.truth-box {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-left: 5px solid var(--secondary);
    padding: 35px;
    margin: 50px 0;
    border-radius: var(--border-radius);
    font-size: 17px;
    line-height: 1.8;
    box-shadow: var(--shadow-md);
}

.truth-box strong {
    color: var(--secondary);
    font-size: 20px;
}

/* ============================================
   CONTENT BLOCKS
   ============================================ */
.content-block {
    margin: 60px 0;
}

.question-block {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.question-block h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (max-width: 768px) {
    .page {
        padding: 60px 25px;
    }

    .cover {
        padding: 40px 25px;
    }

    .transformation {
        padding: 35px 25px;
    }

    .icon {
        font-size: 60px;
    }

    h2::after {
        width: 60px;
        height: 4px;
    }

    .strategy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .three-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .process-flow {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .formula-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto 15px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .page {
        padding: 40px 20px;
    }

    .cover {
        padding: 30px 20px;
        min-height: 100svh;
    }

    .transformation {
        padding: 25px 20px;
    }

    .highlight-box,
    .example-box,
    .results-box,
    .key-insight,
    .truth-box {
        padding: 25px 20px;
    }

    .strategy-card,
    .column-item {
        padding: 25px 20px;
    }

    .framework-box {
        padding: 25px 20px;
    }

    .error-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .error-content {
        padding: 25px 20px;
    }

    .check-list li {
        padding-left: 35px;
        font-size: 15px;
    }

    .check-list li::before {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* ============================================
   ANIMACIONES Y EFECTOS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page > * {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   SCROLL SUAVE Y ACCESIBILIDAD
   ============================================ */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   OPTIMIZACIÓN DE IMPRESIÓN
   ============================================ */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
        max-width: 100%;
    }

    .page {
        page-break-inside: avoid;
        padding: 40px 30px;
    }

    .cover {
        page-break-after: always;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    .strategy-card,
    .error-card,
    .highlight-box,
    .example-box {
        page-break-inside: avoid;
    }
}

/* ============================================
   DARK MODE SUPPORT (Opcional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --dark: #f8fafc;
        --dark-light: #e2e8f0;
        --gray: #cbd5e1;
        --white: #0f172a;
        --gray-light: #1e293b;
    }

    body {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }

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

    .strategy-card,
    .column-item,
    .formula-step,
    .question-block {
        background: #1e293b;
        border-color: #334155;
    }

    .process-step {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

    .error-card {
        background: #1e293b;
        border-color: #991b1b;
    }

    .error-header {
        background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    }

    .highlight-box {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    }

    .example-box {
        background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    }

    .results-box {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    }

    .example-inline {
        background: #1e293b;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-large {
    margin-top: 60px;
}

.mb-large {
    margin-bottom: 60px;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none;
    }
}