/* ====================================================
   AHRA Cursos Archive Styles
   ==================================================== */

/* === HERO DESTACADO === */
.ahra-cursos-hero {
    margin-bottom: 5rem;
}

.ahra-hero-featured {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 0.75rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.ahra-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 30, 80, 0.92), transparent);
    z-index: 1;
}

.ahra-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 5rem;
    max-width: 700px;
}

.ahra-badge-destacado {
    background: #bfdbfe;
    color: #1e3a8a;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
    width: fit-content;
}

.ahra-hero-content h1 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.ahra-hero-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.ahra-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ahra-btn-hero-primary {
    padding: 1rem 2rem;
    background: #ffffff;
    color: #1A66FF;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
}

.ahra-btn-hero-primary:hover {
    background: #f1f5f9;
}

.ahra-btn-hero-secondary {
    padding: 1rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.ahra-btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === FILTROS === */
.ahra-filtros {
    background: #f3f3f3;
    padding: 2rem;
    border-radius: 0.75rem;
}

.ahra-filtros-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.ahra-filtro-busqueda {
    flex: 1;
    min-width: 200px;
}

.ahra-filtro-select {
    width: 180px;
}

.ahra-filtros label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #74777f;
    margin-bottom: 0.5rem;
}

.ahra-input-icon {
    position: relative;
}

.ahra-input-icon .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #74777f;
    pointer-events: none;
}

.ahra-filtros input,
.ahra-filtros select {
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 0.95rem;
    color: #1a1c1c;
    box-shadow: 0 0 0 1px #e2e8f0;
    transition: box-shadow 0.2s;
}

.ahra-filtros select {
    padding-left: 1rem;
}

.ahra-filtros input:focus,
.ahra-filtros select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #1A66FF;
}

.ahra-btn-filtrar {
    background: #1A66FF;
    color: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.ahra-btn-filtrar:hover {
    background: #1450cc;
}

/* === GRID HEADER === */
.ahra-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ahra-grid-header h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1c1c;
}

.ahra-grid-header p {
    color: #74777f;
    font-size: 0.95rem;
}

#ahra-resultados-count {
    font-size: 0.85rem;
    color: #74777f;
    font-weight: 500;
}

/* === GRID DE CURSOS === */
.ahra-cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 2rem;
}

/* === CARD === */
.ahra-curso-card {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ahra-curso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.ahra-card-img {
    position: relative;
    height: 224px;
    overflow: hidden;
}

.ahra-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.ahra-curso-card:hover .ahra-card-img img {
    transform: scale(1.08);
}

.ahra-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.ahra-badge {
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-nuevo {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-abierto {
    background: #1A66FF;
    color: #ffffff;
}

.badge-pronto {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-fin {
    background: #f1f5f9;
    color: #64748b;
}

.badge-modalidad {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #1a1c1c;
}

.ahra-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ahra-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ahra-card-header h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.ahra-card-header h3 a {
    color: #1a1c1c;
    text-decoration: none;
    transition: color 0.2s;
}

.ahra-card-header h3 a:hover {
    color: #1A66FF;
}

.ahra-precio {
    color: #1A66FF;
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
}

.ahra-card-excerpt {
    color: #74777f;
    font-size: 0.875rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.5rem;
}

.ahra-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ahra-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #74777f;
}

.ahra-meta-item .material-symbols-outlined {
    font-size: 1rem;
}

.ahra-btn-card {
    display: block;
    text-align: center;
    padding: 0.875rem;
    background: #e8e8e8;
    color: #1a1c1c;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ahra-btn-card:hover {
    background: #1A66FF;
    color: #ffffff;
}

/* === EMPTY STATE === */
.ahra-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #74777f;
}

.ahra-empty-state .material-symbols-outlined {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* === PAGINACIÓN === */
.ahra-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.ahra-paginacion .page-numbers {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    color: #1a1c1c;
    transition: background 0.2s;
}

.ahra-paginacion .page-numbers:hover {
    background: #e8e8e8;
}

.ahra-paginacion .page-numbers.current {
    background: #1A66FF;
    color: #ffffff;
}

.ahra-paginacion .prev,
.ahra-paginacion .next {
    color: #1a1c1c;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .ahra-hero-content {
        padding: 1.5rem;
    }

    .ahra-hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.08;
        margin-bottom: 0.9rem;
    }

    .ahra-hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .ahra-hero-featured {
        height: 360px;
    }

    /* Badge destacado - mejor legibilidad en mobile */
    .ahra-badge-destacado {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
        letter-spacing: 0.08em;
    }

    /* Fuente en cards - ajustar para mobile */
    .ahra-card-header h3 {
        font-size: 0.95rem;
    }

    .ahra-precio {
        font-size: 0.95rem;
    }

    .ahra-card-excerpt {
        font-size: 0.78rem;
    }

    .ahra-card-body {
        padding: 1.25rem;
    }

    .ahra-card-img {
        height: 196px;
    }

    .ahra-card-meta {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .ahra-filtros-grid {
        flex-direction: column;
    }

    .ahra-filtro-select {
        width: 100%;
    }

    .ahra-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ahra-grid-header h2 {
        font-size: 1.5rem;
    }

    .ahra-grid-header p {
        font-size: 0.88rem;
    }

    /* Ajustar meta items en mobile */
    .ahra-meta-item {
        font-size: 0.7rem;
    }
}

/* === BADGE DESTACADO - NARANJA EN LUGAR DE AZUL === */
.ahra-badge-destacado {
    background: #ffedd5;
    color: #c2410c;
}

/* Precio en naranja para destacar */
.ahra-precio {
    color: #ea580c;
}

/* ====================================================
   SINGLE CURSO PAGE STYLES
   ==================================================== */

/* === FAQ Accordion === */
.ahra-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.ahra-faq-icon.rotate-180 {
    transform: rotate(180deg);
}

/* === Sticky CTA Bar === */
#ahra-sticky-cta {
    transition: transform 0.3s ease;
}

/* === Bento Grid Module Cards === */
.ahra-bento-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ahra-bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* === Instructor Card Hover === */
.ahra-instructor-card .ahra-instructor-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ahra-instructor-card:hover .ahra-instructor-overlay {
    opacity: 1;
}

/* === Related Course Cards === */
.ahra-related-card {
    transition: box-shadow 0.3s ease;
}

.ahra-related-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* === Mobile Responsive for Single Page === */
@media (max-width: 375px) {

    /* Hero section mobile */
    .md\:py-32 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .md\:text-6xl {
        font-size: 2.5rem !important;
    }

    .md\:grid-cols-2,
    .md\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    /* Hide hero image on mobile */
    .md\:block {
        display: block !important;
    }

    /* Sticky CTA mobile */
    #ahra-sticky-cta {
        padding: 0.75rem !important;
    }

    #ahra-sticky-cta .sm\:block {
        display: none !important;
    }

    #ahra-sticky-cta .sm\:w-auto {
        width: auto !important;
    }

    #ahra-sticky-cta .sm\:flex-initial {
        flex-initial: initial !important;
        width: 100%;
    }
}
