/*
 * style-home.css
 * v5 - Añadido título "Destacados" y ajustado espacio con Hero.
*/

/* =========================================
   AJUSTE PRECISO DE ESPACIO Y TÍTULO DEL SLIDER
   ========================================= */

/* 1. Anulamos los espacios por defecto */
.hero {
    margin-bottom: 0 !important; /* Anula el margen inferior del Hero */
}
.featured-slider {
    padding-top: 0; /* Anula el relleno superior del slider */
}

/* 2. Controlamos TODO el espacio desde el título */
.slider-title {
    text-align: center;
    padding-top: 0; /* Quitamos el relleno superior que tenía antes */
    margin-top: 2.5rem;  /* AÑADIDO: Este es el espacio entre el Hero y el título */
    margin-bottom: 1.5rem; /* Este es el espacio entre el título y el slider */
}

/* =========================================
   ESTILOS EXCLUSIVOS PARA EL SLIDER
   ========================================= */
.featured-slider {
    padding-top: 0; /* Eliminamos el padding superior del slider para acercarlo al título */
}

.featured-slide {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: clamp(280px, 30vw, 360px);
    margin-right: 20px;
    background-color: #000;
}

.featured-slide .card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.featured-slide .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-slide:hover .card-thumb img {
    transform: scale(1.05);
}

.featured-slide .card-body {
    position: absolute;
    z-index: 2;
    padding: 1.25rem;
    background: rgba(22, 22, 22, 0.90);
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    bottom: 0;
    left: 0;
    right: 0;
}

.featured-slide .card-title {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}
.featured-slide .card-title a {
    color: #fff;
    text-decoration: none;
}
.featured-slide .card-title a:hover { text-decoration: underline; }

.featured-slide .card-body p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-slide .card-category {
    margin-bottom: 0.75rem;
}


/* =========================================
   SECCIÓN CTA CATEGORÍAS (v4 - Con Canvas Moderno Atrevido)
   ========================================= */
.cta-cursos {
    padding: 4rem 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 12px;
}
.cta-cursos::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    background-color: #11151c;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 30px 30px;
}
.cta-cursos::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    background: radial-gradient(circle at 20% 25%, var(--clr-accent) 0%, rgba(215, 41, 36, 0) 25%),
                radial-gradient(circle at 80% 75%, #4a90e2 0%, rgba(74, 144, 226, 0) 25%);
    background-size: 200% 200%;
    animation: moveGradient 15s ease infinite alternate;
}
@keyframes moveGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}
.cta-cursos .container {
    position: relative;
    z-index: 3;
}
.cta-cursos-titulo {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #f5f5f5; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.cta-cursos-subtitulo {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(245, 245, 245, 0.8);
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.cta-curso-card {
    background-color: rgba(34, 34, 34, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.cta-curso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}
.cta-curso-link { display: block; text-decoration: none; color: inherit; }
.cta-curso-thumb img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cta-curso-body { padding: 1.25rem; }
.cta-curso-titulo { font-size: 1.2rem; margin: 0 0 1rem 0; font-family: var(--ff-heading); color: #fff; }
.cta-curso-boton { display: inline-block; background-color: var(--clr-accent); color: #fff; padding: 0.5rem 1rem; border-radius: 6px; font-weight: bold; font-size: 0.9rem; transition: background-color 0.2s ease; }
.cta-curso-card:hover .cta-curso-boton { background-color: #b4221f; }


/* =========================================
   BENTO GRID DE ARTÍCULOS
   ========================================= */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--clr-text);
}
.bento-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 1.5rem;
}
.bento-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.bento-item-1 {
    grid-column: span 2;
    grid-row: span 2;
}
.bento-item-4, .bento-item-5 {
    grid-column: span 2;
}
.bento-thumb {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}
.bento-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.bento-item:hover .bento-thumb img {
    transform: scale(1.05);
}
.bento-content {
    position: relative;
    z-index: 3;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 80%);
}
.bento-category {
    color: var(--clr-accent);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}
.bento-title {
    font-size: 1.25rem;
    line-height: 1.3;
    color: #fff;
    margin: 0.25rem 0 0 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.bento-item-1 .bento-title {
    font-size: 1.8rem;
}
.bento-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

@media (max-width: 768px) {
    .bento-grid-container {
        grid-template-columns: 1fr;
    }
    .bento-item-1, .bento-item-4, .bento-item-5 {
        grid-column: span 1;
        grid-row: span 1;
    }
    .bento-item {
        min-height: 300px;
    }
}

/* =========================================
   HEADLINES BAR
   ========================================= */
.headlines-bar {
    background: var(--hdr-bg);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.55rem 0;
    overflow: hidden;
}
.scheme-light .headlines-bar {
    border-bottom-color: rgba(0,0,0,0.08);
}
.headlines-inner {
    display: flex;
    align-items: center;
    gap: 0;
}
.headlines-label {
    background: var(--clr-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 1rem;
    border-radius: 3px;
}
.headlines-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    gap: 0;
}
.headlines-list::-webkit-scrollbar { display: none; }
.headline-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1rem;
    border-right: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.scheme-light .headline-item {
    border-right-color: rgba(0,0,0,0.07);
}
.headline-item:hover { opacity: 0.75; }
.headline-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--clr-accent);
    letter-spacing: 0.04em;
}
.headline-title {
    font-size: 0.82rem;
    color: var(--clr-text);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 640px) {
    .headlines-label { display: none; }
    .headline-title  { max-width: 150px; }
}

/* =========================================
   CATEGORÍAS PILLS
   ========================================= */
.cat-pills-section {
    margin: 2rem auto 1.5rem;
}
.cat-pills-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.45;
    margin-bottom: 0.85rem;
    color: var(--clr-text);
}
.cat-pills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.82rem;
    color: var(--clr-text);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.scheme-light .cat-pill {
    border-color: rgba(0,0,0,0.14);
}
.cat-pill:hover {
    background: var(--clr-accent);
    border-color: var(--clr-accent);
    color: #fff;
    text-decoration: none;
}
.cat-pill-name { font-weight: 500; }
.cat-pill-count {
    font-size: 0.7rem;
    opacity: 0.55;
    font-weight: 700;
}

/* =========================================
   EEP-STYLE LISTING (fp-card)
   ========================================= */
.eep-listing-section {
    padding: 2rem 0 3rem;
}
.eep-listing-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}
.fp-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.25rem;
}
.fp-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.scheme-light .fp-card {
    border-color: rgba(0,0,0,0.08);
}
.fp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.fp-card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.fp-card-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.fp-card-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-accent);
    text-decoration: none;
    margin-bottom: 0.4rem;
    display: block;
}
.fp-card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 0.55rem;
}
.fp-card-title a {
    color: var(--clr-text);
    text-decoration: none;
}
.fp-card-title a:hover { color: var(--clr-accent); }
.fp-card-excerpt {
    font-size: 0.86rem;
    color: var(--clr-text);
    opacity: 0.72;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.fp-card-meta time {
    font-size: 0.75rem;
    color: var(--clr-text);
    opacity: 0.45;
}

/* EEP Sidebar */
.eep-sidebar {
    position: sticky;
    top: 76px;
}
.eep-widget {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.07);
}
.scheme-light .eep-widget {
    border-color: rgba(0,0,0,0.08);
}
.eep-widget-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--clr-accent);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(215,41,36,0.2);
}
.eep-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.eep-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.38rem 0;
    color: var(--clr-text);
    text-decoration: none;
    font-size: 0.86rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: color 0.15s;
}
.scheme-light .eep-cat-list li a { border-bottom-color: rgba(0,0,0,0.06); }
.eep-cat-list li:last-child a { border-bottom: none; }
.eep-cat-list li a:hover { color: var(--clr-accent); }
.eep-cat-count {
    font-size: 0.72rem;
    opacity: 0.45;
    background: rgba(255,255,255,0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-weight: 700;
}
.scheme-light .eep-cat-count { background: rgba(0,0,0,0.06); }
.eep-recent-item {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    align-items: flex-start;
}
.eep-recent-item:last-child { margin-bottom: 0; }
.eep-recent-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}
.eep-recent-text { flex: 1; min-width: 0; }
.eep-recent-text a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.84rem;
    color: var(--clr-text);
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}
.eep-recent-text a:hover { color: var(--clr-accent); }
.eep-recent-text time {
    font-size: 0.72rem;
    opacity: 0.45;
    display: block;
}

/* EEP Responsive */
@media (max-width: 960px) {
    .eep-listing-wrapper {
        grid-template-columns: 1fr;
    }
    .eep-sidebar { position: static; }
}
@media (max-width: 640px) {
    .fp-cards-grid { grid-template-columns: 1fr; }
}

/* =========================================
   HERO — MEJORAS v6
   ========================================= */
.hero {
    min-height: 60vh;
    padding: 5rem 0 !important;
}

/* Parallax CSS — solo desktop (iOS no soporta background-attachment:fixed) */
@media (min-width: 769px) {
    .hero::before {
        background-attachment: fixed;
    }
}

/* Animación de entrada del texto hero */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-inner h2       { animation: heroFadeUp 0.8s ease 0.20s both; }
.hero-inner p        { animation: heroFadeUp 0.8s ease 0.45s both; }
.hero-inner .btn-cta { animation: heroFadeUp 0.8s ease 0.65s both; }

/* =========================================
   STATS SECTION
   ========================================= */
.stats-section {
    background: var(--hdr-bg);
    border-bottom: 1px solid rgba(215, 41, 36, 0.3);
    padding: 2.5rem 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}
.stat-item {
    padding: 0.5rem 0;
}
.stat-value-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
}
.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    font-family: var(--ff-heading);
    color: var(--clr-accent);
    line-height: 1;
}
.stat-suffix {
    font-size: 2rem;
    font-weight: 900;
    color: var(--clr-accent);
}
.stat-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text);
    opacity: 0.6;
    margin-top: 0.5rem;
}
@media (max-width: 640px) {
    .stats-grid  { grid-template-columns: repeat(2, 1fr); }
    .stat-number { font-size: 2rem; }
    .stat-suffix { font-size: 1.5rem; }
}

/* =========================================
   DECORADORES DE SECCIÓN
   ========================================= */
.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--clr-accent);
    margin: 0.5rem 0 0;
    border-radius: 2px;
}
.slider-title::after {
    margin: 0.5rem auto 0;
}

/* =========================================
   BENTO — TABLET BREAKPOINT
   ========================================= */
@media (min-width: 769px) and (max-width: 1100px) {
    .bento-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-item-1,
    .bento-item-4,
    .bento-item-5 {
        grid-column: span 1;
        grid-row: span 1;
    }
    .bento-item { min-height: 260px; }
}

/* ========== NEWSLETTER SECTION ========== */
.newsletter-section {
    padding: 4.5rem 1.5rem;
    background: linear-gradient(135deg, var(--clr-accent, #c00) 0%, #8B0000 100%);
    text-align: center;
}
.newsletter-inner {
    max-width: 580px;
    margin: 0 auto;
}
.newsletter-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}
.newsletter-title {
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    color: #fff;
    margin: 0 0 0.5rem;
    font-weight: 700;
}
.newsletter-desc {
    color: rgba(255,255,255,0.85);
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
    margin: 0 auto 0.75rem;
}
.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    background: #fff;
    color: #111;
}
.newsletter-input:focus { outline: 2px solid rgba(255,255,255,0.6); }
.newsletter-btn {
    padding: 0.75rem 1.25rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-size: 0.9rem;
}
.newsletter-btn:hover { background: #333; }
.newsletter-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}
@media (max-width: 480px) {
    .newsletter-form { flex-direction: column; }
    .newsletter-btn { width: 100%; }
}