/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c6e49;
    --primary-light: #4c956c;
    --primary-dark: #1b4332;
    --secondary: #d4a373;
    --accent: #fefae0;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --success: #28a745;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.resources-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(rgba(44, 110, 73, 0.9), rgba(27, 67, 50, 0.9)), 
                url('https://images.unsplash.com/photo-1518834103328-922d6fcc01a1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    height: 300px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb .current {
    color: var(--gray);
    font-weight: 500;
}

.breadcrumb i {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* ===== INTRO SECTION ===== */
.intro-section {
    margin-bottom: 50px;
}

.intro-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 40px;
    border-left: 5px solid var(--secondary);
}

.intro-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.intro-icon i {
    font-size: 2.5rem;
    color: white;
}

.intro-text h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 15px;
    font-family: 'Merriweather', serif;
}

.intro-text p {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--secondary);
}

.stat-item span {
    font-weight: 500;
    font-size: 1rem;
}

/* ===== RESOURCES GRID ===== */
.resources-grid {
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--secondary);
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.books-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.book-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.book-cover {
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.2), rgba(0,0,0,0.1));
}

.vol1 { background: linear-gradient(135deg, #2c6e49, #4c956c); }
.vol2 { background: linear-gradient(135deg, #3a86ff, #4361ee); }
.vol3 { background: linear-gradient(135deg, #7209b7, #560bad); }
.vol4 { background: linear-gradient(135deg, #f8961e, #f3722c); }
.vol5 { background: linear-gradient(135deg, #43aa8b, #4d908e); }
.vol6 { background: linear-gradient(135deg, #577590, #4a4e69); }

.book-number {
    font-size: 3.5rem;
    font-weight: 800;
    opacity: 0.9;
    z-index: 1;
}

.book-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 1;
    margin-top: 10px;
}

.book-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    color: var(--primary-dark);
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: 'Merriweather', serif;
}

.book-description {
    color: var(--gray);
    margin-bottom: 20px;
    flex-grow: 1;
}

.book-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.book-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
}

.book-meta i {
    color: var(--secondary);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(44, 110, 73, 0.3);
}

/* ===== INSTRUCTIONS ===== */
.instructions {
    margin-bottom: 60px;
}

.instructions h2 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.instruction-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--secondary);
}

.instruction-card:hover {
    transform: translateY(-5px);
}

.instruction-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent), #fff8e1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.instruction-icon i {
    font-size: 1.8rem;
    color: var(--primary);
}

.instruction-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instruction-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* ===== DOWNLOAD ALL ===== */
.download-all {
    margin-bottom: 60px;
}

.download-all-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.download-all-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.download-all-content p {
    opacity: 0.9;
    margin-bottom: 20px;
    max-width: 600px;
}

.download-all-btn {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.download-all-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.small-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

.download-all-icon i {
    font-size: 5rem;
    opacity: 0.8;
}

/* ===== FOOTER ===== */
.resources-footer {
    background: var(--primary-dark);
    color: white;
    padding: 40px 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.footer-logo h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.footer-info i {
    color: var(--secondary);
    margin-right: 10px;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--secondary);
}

.modal-body {
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    margin: 20px auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#modalMessage {
    margin: 20px 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.progress-container {
    background: #e9ecef;
    border-radius: 50px;
    height: 10px;
    margin: 30px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .intro-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .books-container {
        grid-template-columns: 1fr;
    }
    
    .download-all-card {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .instructions h2 {
        font-size: 1.6rem;
    }
}