/* ESTILOS COMUNES DE SECCIÓN */
.section-pad { padding: 80px 0; }
.bg-light { background-color: var(--background-light); }
.section-title { text-align: center; max-width: 800px; margin: 0 auto 60px; }
.section-title h2 { font-size: 2.2rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1rem; }
.section-title p { color: var(--text-light); font-size: 1.1rem; }

/* STATS BAR */
.stats-bar { background-color: var(--primary-color); padding: 40px 0; color: white; margin-top: 2rem; }
.stats-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--accent-color); }
.stat-item p { font-size: 1rem; opacity: 0.9; font-weight: 500; }

/* FEATURES GRID (Tarjetas blancas) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; }
.feature-card { background: white; padding: 2.5rem; border-radius: 16px; transition: 0.3s; border: 1px solid transparent; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--border-color); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1.5rem; background: #eff6ff; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--primary-color); }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }

/* COURSES GRID (Tarjetas de cursos) */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.course-card { background: white; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--border-color); transition: 0.3s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.course-thumb { height: 180px; background-color: #1e293b; position: relative; overflow: hidden; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.course-badge { background: #dbeafe; color: var(--primary-color); padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; align-self: flex-start; margin-bottom: 10px; }
.course-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.course-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    
    /* BLOQUE PARA CORTAR TEXTO */
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* Versión para Chrome/Safari */
    line-clamp: 2;          /* Versión Estándar (La que pide VS Code) */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* RESPONSIVE ADICIONAL */
@media (max-width: 968px) {
    .stats-grid { flex-direction: column; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* --- ICONOS SVG --- */
/* Esto asegura que los iconos nuevos tomen el color correcto */
.feature-icon svg {
    stroke: var(--primary-color);
    width: 32px;
    height: 32px;
}

/* --- CTA SECTION (Newsletter) --- */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    padding: 60px 0;
    color: white;
    margin-top: 4rem;
    border-radius: 20px; /* Un toque moderno: bordes redondeados */
    margin-left: 24px;   /* Truco de diseño: hacerlo flotante dentro del container */
    margin-right: 24px;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cta-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.input-group input {
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
    width: 250px;
    border-radius: 4px;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--text-dark);
    border: none;
}
.btn-accent:hover {
    background-color: #fbbf24;
    transform: translateY(0);
}

/* Responsive CTA */
@media (max-width: 768px) {
    .cta-content { flex-direction: column; text-align: center; }
    .cta-section { margin-left: 0; margin-right: 0; border-radius: 0; }
    .input-group { flex-direction: column; width: 100%; }
    .input-group input { width: 100%; }
    .input-group button { width: 100%; }
}

/* --- TESTIMONIOS --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    border: 1px solid var(--border-color);
}
.quote-icon {
    font-size: 4rem;
    color: var(--accent-color);
    font-family: serif;
    position: absolute;
    top: 10px;
    left: 20px;
    opacity: 0.3;
}
.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.user-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}
.user-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}