/* Event Blog Styles - Siguiendo la paleta de colores de la aplicación */

/* Variables reutilizadas del CSS principal */
:root {
    --transition: all 0.3s ease;
}

.title-section {
    display: flex;
    justify-content: center;
    background-image: var(--gradient-primary);
    color: var(--light-text);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3vw), 0% 100%);
    position: relative;
    z-index: 1;
}

.participate-section {    
    display: flex;
    justify-content: center;
    color: var(--light-text);
    clip-path: polygon(0 0, 100% 2vw, 100% 100%, 0% 100%);
    margin-top: -4vw;
    position: relative;
    z-index: 1;
}

.title-section .event-studio-info a:visited, 
.title-section .event-studio-info a {
    color: var(--light-text);
    text-decoration: underline;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.title-section h1 {
    font-size: 3.5rem;
}

.title-section p {
    color: var(--light-text);
    text-wrap: balance;
}


.event-type-badge {
    width: fit-content;
    display: flex;
    padding: 0.375rem 0.875rem;
    background: var(--dark-bg);
    color: var(--light-text);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-type-actividad {
    background: linear-gradient(135deg, rgba(108, 74, 226, 0.9), rgba(142, 114, 255, 0.9));
}

.event-type-torneo {
    background: linear-gradient(135deg, rgba(255, 190, 11, 0.9), rgba(219, 157, 0, 0.9));
}

.event-type-sorteo {
    background: linear-gradient(135deg, rgba(255, 94, 91, 0.9), rgba(209, 63, 60, 0.9));
}

.event-type-premios {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(218, 165, 32, 0.9));
}

.event-type-challenge {
    background: linear-gradient(135deg, rgba(0, 225, 217, 0.9), rgba(0, 179, 172, 0.9));
}

/* ========================================
   LISTA DE EVENTOS
======================================== */


/* Grid de eventos */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Card de evento */
.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}


.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(108, 74, 226, 0.3);
}

.event-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gradient-dark);
    transition: var(--transition);
}

.event-card:hover .event-card-image { 
    transform: scale(1.1); 
}

.event-card {
    text-decoration: none;
    color: inherit;
}

.event-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

.event-card-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--dark-text);
    margin: 0;
    line-height: 1.3;
}


.event-card-description {
    color: var(--dark-text);
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.event-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.event-date {
    color: var(--muted-text);
    font-size: 0.85rem;
}

/* Mensaje cuando no hay eventos */
.no-events-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(108, 74, 226, 0.1) 0%, rgba(0, 225, 217, 0.1) 100%);
    border-radius: 12px;
    border: 2px dashed var(--primary-color);
}

.no-events-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-events-message p {
    color: var(--dark-text);
    font-size: 1.1rem;
}

/* ========================================
   DETALLE DE EVENTO
======================================== */

.event-detail-header {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}


.event-studio-info h1 {
    font-size: 2.5rem;
    color: var(--light-text);
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.event-meta .event-type-badge {
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
}

.event-publish-date {
    color: var(--light-text);
    font-size: 0.95rem;
}

.event-header-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}


.event-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark-text);
}

.event-content {
    line-height: 1.8;
    color: var(--dark-text);
}

.event-content p {
    margin-bottom: 1rem;
}

.event-participate-box {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.event-studio-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 3rem;
    border-top: 4px solid var(--secondary-color);
}

.event-studio-card h5 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.event-studio-card p {
    color: var(--dark-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Estilos para imágenes de CKEditor */
.event-content figure.image,
.event-participate-box figure.image {
    max-width: 100%;
    margin: 1.5rem 0;
}

.event-content figure.image img,
.event-participate-box figure.image img {
    max-width: 100%;
    height: auto !important;
    width: auto !important;
    display: block;
    border-radius: 8px;
}

/* ========================================
   FORMULARIO DE EVENTO
======================================== */
.event-form-header {
    margin-bottom: 2rem;
}

.event-form-header h1 {
    font-size: 2.5rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-form-header h1 i {
    color: var(--primary-color);
}

.event-form-description {
    color: var(--muted-text);
    font-size: 1.05rem;
}

.event-form-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary-color);
}

/* Grupo de formulario */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.required-mark {
    color: var(--accent-color);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
    color: var(--dark-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 74, 226, 0.1);
}

.form-control:hover {
    border-color: var(--primary-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-text);
}

.char-counter {
    float: right;
    font-weight: 500;
}

.char-counter.warning {
    color: var(--accent-color);
}

/* Preview de imagen */
.image-preview {
    margin-bottom: 1rem;
}

.image-preview img {
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.image-preview-text {
    color: var(--muted-text);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Botones del formulario */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

/* Alerta de información */
.info-box {
    background: linear-gradient(135deg, rgba(108, 74, 226, 0.1) 0%, rgba(0, 225, 217, 0.1) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.info-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.info-box-title i {
    color: var(--primary-color);
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dark-text);
    font-size: 0.95rem;
}

.info-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Errores del formulario */
.form-errors {
    background: linear-gradient(135deg, rgba(255, 94, 91, 0.1) 0%, rgba(209, 63, 60, 0.1) 100%);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-errors-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.form-errors-title i {
    font-size: 1.2rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-errors li {
    padding: 0.5rem 0;
    color: var(--dark-text);
}

.form-errors strong {
    color: var(--accent-color);
}

/* ========================================
   PAGINACIÓN
======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.pagination-item {
    display: inline-block;
}

.pagination-link {
    display: block;
    padding: 0.625rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination li span {
    margin-left: 0.5rem;
    margin-right: 0.5rem; 
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 992px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .event-form-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    
    .title-section h1 {
        font-size: 2rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .event-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-studio-info h1 {
        font-size: 2rem;
    }
    
    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .event-form-header h1 {
        font-size: 2rem;
    }
    
    .event-form-card {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {    
    .title-section h1 {
        font-size: 1.75rem;
    }
    
    .event-card-body {
        padding: 1.25rem;
    }
    
    .event-studio-info h1 {
        font-size: 1.75rem;
    }
        
    .event-form-card {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   ANIMACIONES
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: fadeInUp 0.5s ease-out;
}

.event-card:nth-child(1) { animation-delay: 0.1s; }
.event-card:nth-child(2) { animation-delay: 0.2s; }
.event-card:nth-child(3) { animation-delay: 0.3s; }
.event-card:nth-child(4) { animation-delay: 0.4s; }
.event-card:nth-child(5) { animation-delay: 0.5s; }
.event-card:nth-child(6) { animation-delay: 0.6s; }
