/* ===================================
   HORIZON Preview - Reading Styles
   Sistema de Educacion Financiera Familiar
   =================================== */

:root {
    --azul-profundo: #1A365D;
    --azul-claro: #2D4A7C;
    --verde: #059669;
    --amarillo: #F59E0B;
    --rojo: #DC2626;
    --blanco: #FFFFFF;
    --gris-claro: #F8FAFC;
    --gris: #64748B;
    --texto: #1E293B;
    --texto-suave: #475569;

    /* Reading specific */
    --reading-bg: #FFFEF9;
    --reading-text: #2D3748;
    --chapter-accent: #1A365D;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--texto);
    line-height: 1.6;
    background: var(--gris-claro);
}

/* ===================================
   Navigation
   =================================== */

.preview-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 54, 93, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.logo-circles {
    display: flex;
    gap: 4px;
}

.logo-circles span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.circle-red { background: var(--rojo); }
.circle-yellow { background: var(--amarillo); }
.circle-green { background: var(--verde); }

.nav-brand span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #047857;
    transform: translateY(-2px);
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--azul-profundo);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===================================
   Preview Index Page
   =================================== */

.preview-hero {
    background: linear-gradient(135deg, var(--azul-profundo) 0%, var(--azul-claro) 100%);
    padding: 8rem 2rem 4rem;
    color: white;
    text-align: center;
}

.preview-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.preview-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.preview-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Books Grid */
.books-preview-grid {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.books-preview-grid h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--azul-profundo);
    margin-bottom: 2.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.book-preview-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-align: center;
    border: 2px solid transparent;
}

.book-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--verde);
}

.book-cover-placeholder {
    width: 120px;
    height: 170px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-claro));
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.book-cover-placeholder::after {
    content: 'HORIZON';
    position: absolute;
    bottom: 10px;
    font-size: 0.65rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.book-preview-card h3 {
    font-size: 1.25rem;
    color: var(--azul-profundo);
    margin-bottom: 0.5rem;
}

.book-preview-card .age-tag {
    display: inline-block;
    background: var(--gris-claro);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--gris);
    margin-bottom: 0.75rem;
}

.book-preview-card .description {
    color: var(--texto-suave);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.book-preview-card .btn {
    width: 100%;
}

.coming-soon-label {
    background: var(--amarillo);
    color: var(--texto);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===================================
   Chapter Reading Page
   =================================== */

.reading-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

/* Book Header */
.book-header {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.book-header .book-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.book-header h1 {
    font-size: 2rem;
    color: var(--azul-profundo);
    margin-bottom: 0.5rem;
}

.book-header .book-subtitle {
    color: var(--gris);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.book-header .preview-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--verde), #10B981);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Chapter Content */
.chapter-content {
    background: var(--reading-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.chapter-number {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: var(--verde);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-size: 1.75rem;
    color: var(--chapter-accent);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E2E8F0;
}

/* Reading Typography */
.chapter-content p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--reading-text);
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
}

.chapter-content h2 {
    font-size: 1.4rem;
    color: var(--azul-profundo);
    margin: 2.5rem 0 1rem;
}

.chapter-content h3 {
    font-size: 1.2rem;
    color: var(--azul-claro);
    margin: 2rem 0 1rem;
}

/* Special Elements */
.intro-box {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.05), rgba(45, 74, 124, 0.08));
    border-left: 4px solid var(--azul-profundo);
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
}

.intro-box p {
    font-style: italic;
    color: var(--azul-profundo);
    margin-bottom: 0;
}

.key-concept {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.12));
    border: 2px solid var(--verde);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.key-concept h4 {
    color: var(--verde);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.exercise-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.12));
    border: 2px dashed var(--amarillo);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.exercise-box h4 {
    color: #B45309;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-box ul, .exercise-box ol {
    margin-left: 1.5rem;
    color: var(--texto-suave);
}

.exercise-box li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Content Placeholder */
.content-placeholder {
    background: #F1F5F9;
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: var(--gris);
    margin: 1.5rem 0;
}

.content-placeholder code {
    display: block;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--rojo);
}

/* Blockquotes */
.chapter-content blockquote {
    border-left: 4px solid var(--verde);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--texto-suave);
}

/* Lists */
.chapter-content ul, .chapter-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.chapter-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Continue Reading CTA */
.continue-cta {
    background: linear-gradient(135deg, var(--azul-profundo) 0%, var(--azul-claro) 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.continue-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.continue-cta p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.continue-cta .btn-primary {
    background: white;
    color: var(--azul-profundo);
    margin-right: 1rem;
}

.continue-cta .btn-primary:hover {
    background: var(--gris-claro);
}

/* Chapter End */
.chapter-end {
    text-align: center;
    padding: 2rem;
    color: var(--gris);
}

.chapter-end .dots {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
}

/* ===================================
   Footer
   =================================== */

.preview-footer {
    background: var(--azul-profundo);
    color: white;
    padding: 2rem;
    text-align: center;
}

.preview-footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.preview-footer a {
    color: var(--verde);
    text-decoration: none;
}

.preview-footer a:hover {
    text-decoration: underline;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
    .preview-nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .preview-hero h1 {
        font-size: 1.8rem;
    }

    .preview-hero p {
        font-size: 1rem;
    }

    .books-preview-grid {
        padding: 2rem 1rem;
    }

    .reading-container {
        padding: 5rem 1rem 2rem;
    }

    .book-header {
        padding: 2rem 1.5rem;
    }

    .book-header h1 {
        font-size: 1.5rem;
    }

    .chapter-content {
        padding: 2rem 1.5rem;
    }

    .chapter-content p {
        font-size: 1rem;
        text-align: left;
    }

    .chapter-title {
        font-size: 1.4rem;
    }

    .continue-cta {
        padding: 2rem 1.5rem;
    }

    .continue-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .book-cover-placeholder {
        width: 100px;
        height: 140px;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .preview-nav,
    .continue-cta,
    .preview-footer {
        display: none;
    }

    .reading-container {
        padding: 0;
        max-width: 100%;
    }

    .book-header,
    .chapter-content {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .chapter-content p {
        font-size: 11pt;
        line-height: 1.6;
    }

    .chapter-title {
        page-break-after: avoid;
    }

    .exercise-box {
        page-break-inside: avoid;
    }
}
