/*
 Theme Name:   Campus AIO - Tema Hijo
 Theme URI:    https://gruporascacielos.com/
 Description:  Tema hijo personalizado para el desarrollo UI/UX y funciones lógicas del Campus AIO.
 Author:       Equipo Tech Grupo Rascacielos
 Author URI:   https://gruporascacielos.com/
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  campus-aio-child
*/

/* --- Aquí abajo añadiremos el CSS de tu nuevo diseño del Escritorio AIO --- */

/* ==========================================================================
   CARRUSEL Y TARJETAS DE CURSOS AIO
   ========================================================================== */

/* Contenedor del Carrusel (Desplazamiento horizontal sin JS) */
.aio-carousel-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px; /* Espacio para la barra de scroll */
}

/* Estilo de la barra de scroll para navegadores webkit (Chrome, Safari) */
.aio-carousel-wrapper::-webkit-scrollbar {
    height: 8px;
}
.aio-carousel-wrapper::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}
.aio-carousel-wrapper::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 10px;
}
.aio-carousel-wrapper:hover::-webkit-scrollbar-thumb {
    background: #ff3b4a; /* Rojo corporativo al pasar el ratón */
}

/* Tarjeta Individual */
.aio-course-card {
    scroll-snap-align: start;
    flex: 0 0 340px; /* Ancho fijo de la tarjeta para el carrusel */
    background-color: #282828;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    transition: transform 0.3s ease;
}

.aio-course-card:hover {
    transform: translateY(-5px);
    border-color: #ff3b4a;
}

/* Imagen y Badge */
.aio-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.aio-card-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 6px; /* Bordes un poco más rectos para ese toque premium/elegante */
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 12px; /* Separación con el título */
    text-transform: uppercase;
}

/* Contenido de la tarjeta */
.aio-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.aio-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.aio-card-title a {
    color: #ffffff;
    text-decoration: none;
}

/* Tiempo restante */
.aio-card-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaaaaa;
    font-size: 13px;
    margin-bottom: 25px;
}

/* Barra de progreso */
.aio-progress-track {
    width: 100%;
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.aio-progress-fill {
    height: 100%;
    background-color: #ff0000; /* Rojo brillante del diseño */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); /* Efecto neón sutil */
}

/* Estadísticas (Textos inferiores) */
.aio-progress-stats {
    display: flex;
    justify-content: space-between;
    color: #dddddd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   GRID DE FORMACIONES SECCIONES INTERNAS
   ========================================================================== */
.aio-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    width: 100%;
    padding: 10px 0;
}

/* Forzamos a que las tarjetas dentro del grid ocupen el 100% de su celda */
.aio-grid-wrapper .aio-course-card {
    flex: unset; 
    width: 100%;
}

/* ==========================================================================
   WIDGET DE EVENTOS AIO
   ========================================================================== */
.aio-events-widget {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
}

.aio-events-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5b6ab; /* Tono salmón de tu diseño */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.aio-event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.aio-event-item:hover {
    transform: translateX(5px);
}
.aio-event-item:last-child {
    margin-bottom: 0;
}

/* Cajita de Fecha */
.aio-event-datebox {
    background-color: #282828;
    border-radius: 10px;
    width: 55px;
    height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
    flex-shrink: 0;
}
.aio-event-month {
    color: #ff877b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}
.aio-event-day {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

/* Detalles del evento */
.aio-event-details {
    flex-grow: 1;
}
.aio-event-details h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0;
}
.aio-event-details p {
    color: #aaaaaa;
    font-size: 13px;
    margin: 0;
}

/* Botón + */
.aio-event-action .aio-event-btn {
    background-color: #333333;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.aio-event-item:hover .aio-event-btn {
    background-color: #ff3b4a;
}

/* ==========================================================================
   POPUP NATIVO (MODAL)
   ========================================================================== */
.aio-modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.aio-modal-content {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: aio-modal-fade 0.3s ease-out;
}

.aio-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.aio-modal-close:hover { color: #ff3b4a; }

.aio-modal-content h3 {
    margin-top: 0;
    font-size: 22px;
    color: #ff877b;
}
.aio-modal-meta {
    background-color: #282828;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #ddd;
    margin-bottom: 20px;
}
.aio-modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: #ccc;
}
.aio-modal-body a { color: #33d6b0; text-decoration: underline; }

@keyframes aio-modal-fade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FORMULARIO FRONTEND DE EVENTOS (PANEL MASTER)
   ========================================================================== */
.aio-frontend-form-wrapper {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.aio-form-title {
    color: #ff877b;
    font-size: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

/* Estilizar los campos de entrada y el editor */
.aio-frontend-form-wrapper .acf-field input[type="text"],
.aio-frontend-form-wrapper .acf-field input[type="date"],
.aio-frontend-form-wrapper .acf-field textarea {
    background-color: #111111 !important;
    border: 1px solid #333 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
}

.aio-frontend-form-wrapper .acf-field input[type="text"]:focus,
.aio-frontend-form-wrapper .acf-field textarea:focus {
    border-color: #ff877b !important;
    outline: none !important;
}

/* Etiquetas de los campos */
.aio-frontend-form-wrapper .acf-label label {
    color: #dddddd !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

/* Botón de publicar */
.aio-btn-publish {
    background-color: #ff3b4a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 25px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    width: 100% !important; /* Botón ancho para móvil/desktop */
    margin-top: 20px !important;
}

.aio-btn-publish:hover {
    background-color: #d12e3b !important;
}

/* Mensaje de éxito */
.acf-notice.-success {
    background-color: rgba(51, 214, 176, 0.1) !important;
    border: 1px solid #33d6b0 !important;
    color: #33d6b0 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
}