/* ======================================================
   HOME - Estilos Mejorados
   ====================================================== */

/* ======================================================
   TÍTULOS GENERALES
   ====================================================== */

.section-title {
    text-align: center;
    font-size: 2.4rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title .highlight-text {
    color: #3498db;
    position: relative;
}

.section-title .highlight-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #5dade2);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ======================================================
   1. ÁREAS DE ATENCIÓN
   ====================================================== */

.areas-section {
    padding: 70px 0;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.areas-header {
    margin-bottom: 40px;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.area-card {
    background: white;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--area-color, #3498db);
}

.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--area-color, #3498db);
}

.area-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.area-card .area-icon {
    font-size: 3.2rem;
    display: block;
    margin-bottom: 12px;
}

.area-card .area-badge {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--area-color, #3498db);
    margin-bottom: 10px;
}

.area-card h3 {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.area-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.area-card .area-link {
    color: var(--area-color, #3498db);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.area-card .area-link:hover {
    gap: 12px;
}

.area-card .area-link i {
    transition: transform 0.3s;
}

.area-card .area-link:hover i {
    transform: translateX(4px);
}

/* ======================================================
   2. CÓMO FUNCIONA
   ====================================================== */

.how-it-works-section {
    padding: 70px 0;
    background: white;
}

.how-header {
    margin-bottom: 50px;
}

.steps-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    background: #f8fafc;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    flex: 1;
    min-width: 200px;
    border: 2px solid transparent;
}

.step-card:hover {
    transform: translateY(-5px);
    background: #e8f4fd;
    border-color: #3498db;
}

.step-card .step-number {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3498db, #5dade2);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.step-card .step-icon {
    font-size: 3rem;
    display: block;
    margin-top: 8px;
    margin-bottom: 10px;
}

.step-card h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.step-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.step-card .step-line {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, transparent);
    margin: 15px auto 0;
    border-radius: 2px;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ddd;
    padding: 0 10px;
    flex-shrink: 0;
}

/* ======================================================
   3. PREGUNTAS FRECUENTES
   ====================================================== */

.faq-section {
    padding: 70px 0;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.faq-header {
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #f0f2f5;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.faq-item .faq-question {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.3s;
    gap: 10px;
}

.faq-item .faq-question:hover {
    background: #f8fafc;
}

.faq-item .faq-question .faq-icon {
    color: #3498db;
    margin-right: 10px;
    width: 18px;
}

.faq-item .faq-question .faq-arrow {
    transition: transform 0.3s;
    color: #3498db;
    flex-shrink: 0;
}

.faq-item.active .faq-question .faq-arrow {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    background: #f0f7ff;
}

.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-item .faq-answer p {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 0.95rem;
}

/* ======================================================
   4. RESPONSIVE
   ====================================================== */

@media (max-width: 992px) {
    .steps-container {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
        padding: 0;
    }
    
    .step-card {
        max-width: 400px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .area-card {
        padding: 25px 20px;
    }
    
    .faq-item .faq-question {
        font-size: 0.9rem;
        padding: 14px 18px;
    }
    
    .faq-item .faq-question .faq-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .areas-section,
    .how-it-works-section,
    .faq-section {
        padding: 40px 0;
    }
    
    .step-card {
        padding: 25px 18px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}


/* ======================================================
   5. RECURSOS PSICOEDUCATIVOS (HOME)
   ====================================================== */

.recursos-section-home {
    padding: 50px 0;
    background: white;
}

.recursos-header-home {
    margin-bottom: 40px;
}

.recursos-header-home .section-subtitle {
    margin-bottom: 0;
}

.recursos-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.recurso-card-home {
    background: white;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid #f0f2f5;
    display: flex;
    flex-direction: column;
}

.recurso-card-home:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
    border-color: #3498db;
}

.recurso-card-home .recurso-icon-home {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 10px;
    display: block;
}

.recurso-card-home .recurso-badge-home {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #ebf5fb;
    color: #3498db;
    margin-bottom: 10px;
    align-self: flex-start;
}

.recurso-card-home h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.4;
}

.recurso-card-home p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.recurso-card-home .recurso-footer-home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    margin-top: auto;
}

.recurso-card-home .recurso-autor-home {
    font-size: 0.75rem;
    color: #999;
}

.recurso-card-home .recurso-autor-home i {
    color: #3498db;
}

.recurso-card-home .btn-recurso-home {
    background: transparent;
    color: #3498db;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.recurso-card-home .btn-recurso-home:hover {
    background: #ebf5fb;
    gap: 8px;
}

.recurso-card-home .btn-recurso-home i {
    transition: transform 0.3s;
}

.recurso-card-home .btn-recurso-home:hover i {
    transform: translateX(3px);
}

/* Botón Ver todos los recursos */
.recursos-ver-todos {
    text-align: center;
    margin-top: 40px;
}

.btn-ver-todos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.btn-ver-todos:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.4);
}

.btn-ver-todos i {
    transition: transform 0.3s;
}

.btn-ver-todos:hover i {
    transform: translateX(5px);
}

/* ======================================================
   ANIMACIONES
   ====================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.visible {
    animation: fadeInUp 0.6s ease forwards;
}

/* ======================================================
   RESPONSIVE - RECURSOS HOME
   ====================================================== */

@media (max-width: 768px) {
    .recursos-grid-home {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recurso-card-home {
        padding: 20px 18px;
    }
    
    .btn-ver-todos {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
}


/* ======================================================
   6. CTA SECTION (HOME)
   ====================================================== */

.cta-section-home {
    padding: 60px 0;
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    border-radius: 16px;
    margin-top: 20px;
}

.cta-content-home {
    text-align: center;
    color: white;
    padding: 20px;
}

.cta-content-home h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.cta-content-home h2 .highlight-light {
    color: #f39c12;
}

.cta-content-home p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.cta-content-home .btn-cta-home {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 25px rgba(231, 76, 60, 0.4);
}

.cta-content-home .btn-cta-home:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(231, 76, 60, 0.5);
}

.cta-content-home .btn-cta-home i {
    transition: transform 0.3s;
}

.cta-content-home .btn-cta-home:hover i:last-child {
    transform: translateX(5px);
}

.cta-content-home .pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 25px rgba(231, 76, 60, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 8px 40px rgba(231, 76, 60, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 25px rgba(231, 76, 60, 0.4); }
}

@media (max-width: 768px) {
    .cta-content-home h2 {
        font-size: 1.6rem;
    }
    
    .cta-content-home .btn-cta-home {
        padding: 14px 25px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }
}

.bienvenido {
    color: #fff; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 4px 10px; 
    border-radius: 10px; 
    margin-bottom: 2%; 
    font-size: 16px
}