/* =============================================
   CLASES DE WORD - ESTILOS GLOBALES
   Diseño amigable para niños de 10-12 años
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Fredoka+One&display=swap');

/* Variables CSS - Paleta de colores cálida */
:root {
    /* Colores principales */
    --color-primary: #FF6B35;
    --color-primary-light: #FF8F66;
    --color-primary-dark: #E55A2B;
    
    --color-secondary: #00B4D8;
    --color-secondary-light: #48CAE4;
    --color-secondary-dark: #0096B4;
    
    --color-accent: #7B2CBF;
    --color-accent-light: #9D4EDD;
    --color-accent-dark: #5A189A;
    
    /* Colores de estado */
    --color-success: #2EC4B6;
    --color-success-light: #5DD9CD;
    --color-warning: #FFB703;
    --color-warning-light: #FFC733;
    --color-error: #E63946;
    --color-error-light: #FF6B6B;
    
    /* Fondos */
    --bg-main: #FFF8F0;
    --bg-card: #FFFFFF;
    --bg-dark: #2D3436;
    
    /* Textos */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --text-white: #FFFFFF;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 52, 54, 0.12);
    --shadow-lg: 0 8px 32px rgba(45, 52, 54, 0.16);
    --shadow-colored: 0 8px 24px rgba(255, 107, 53, 0.25);
    
    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 50%;
    
    /* Tipografía */
    --font-main: 'Nunito', sans-serif;
    --font-display: 'Fredoka One', cursive;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Patrón de fondo tipo cuaderno */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(45, 52, 54, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: -1;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

/* Header principal */
.main-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-white);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

/* Sección Hero */
.hero {
    padding: 3rem 0 4rem;
    text-align: center;
    position: relative;
}

.hero-title {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.hero-title span {
    color: var(--color-secondary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Barra de progreso general */
.progress-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    border: 3px solid var(--color-secondary-light);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.progress-stats {
    font-weight: 700;
    color: var(--color-primary);
}

.progress-bar-wrapper {
    height: 20px;
    background: #E8E8E8;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success) 0%, var(--color-secondary) 100%);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Grid de clases */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

/* Footer */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-text {
    font-weight: 600;
    color: var(--text-light);
}

.footer-hearts {
    color: var(--color-error);
    font-size: 1.25rem;
}

/* Utilidades */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .progress-container {
        padding: 1rem 1.25rem;
    }
}
