* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Arial, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
}

/* Modern Header */
.cabecera {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #823aff5b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.txt-back {
    position: absolute;
    left: 15px;
    display: flex;
    align-items: center;
    color: #444;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.txt-back:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2px solid #444;
    border-bottom: 2px solid #444;
    transform: rotate(45deg);
    margin-right: 6px;
    transition: all 0.3s ease;
}

.txt-back:hover {
    color: #8d5edd;
}

.txt-back:hover:before {
    border-color: #8d5edd;
}

#img_logo {
    max-height: 40px;
}

.settings-icon {
    position: absolute;
    right: 15px;
}

.settings-icon img {
    width: 22px;
    height: auto;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.settings-icon:hover img {
    opacity: 1;
    transform: rotate(90deg);
}

/* Container and Page Title */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #8d5edd;
    border-radius: 3px;
}

/* Event Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* Event Card */
.event-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(141, 94, 221, 0.15);
}

/* Poster Container with Modern Effect */
.poster-container {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.poster-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(15px) brightness(0.7);
    transform: scale(1.1);
}

.poster {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

/* Card Content */
.card-content {
    padding: 15px;
}

.event-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /*height: 40px;*/
}

.event-descrip
{
    color: #63005a;
    font-size: 15px;
    font-weight: 400 !important;
    margin-bottom: 10px;
}

.event-location {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-date {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.event-date i {
    margin-right: 6px;
    color: #8d5edd;
}

/* Price Tag */
.price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff9be9, #c484ff);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    margin-top: 10px;
    width: 100px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(141, 94, 221, 0.2);
}

/* Buy Button */
.buy-button {
    background: linear-gradient(135deg, #8d5edd, #7646c7);
    color: white;
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(141, 94, 221, 0.25);
}

.buy-button:hover {
    background: linear-gradient(135deg, #7646c7, #6539b0);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(141, 94, 221, 0.35);
}

/* No Events Message */
.no-events {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px dashed #ddd;
}

.no-events p {
    color: #666;
    font-size: 16px;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    /* En móvil: una tarjeta por fila (ancho completo) con formato horizontal */
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Diseño horizontal de las tarjetas en móvil */
    .event-card {
        display: flex;
        flex-direction: row;
        height: auto;
        min-height: 140px;
    }
    
    /* Ajuste del contenedor de la imagen */
    .poster-container {
        width: 40%;
        aspect-ratio: 3/4;
        flex-shrink: 0;
    }
    
    /* Ajustes del contenido */
    .card-content {
        width: 60%;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    /* Ajustes de texto */
    .event-title {
        font-size: 16px;
        height: auto;
        -webkit-line-clamp: 2;
        margin-bottom: 5px;
    }
    
    .event-location {
        font-size: 12px;
        margin-bottom: 5px;
        margin-top: 0.5rem;
    }
    
    .event-date {
        font-size: 12px;
        margin-bottom: 5px;
        margin-top: 0.5rem;
    }
    
    /* Ajuste del precio */
    .price-tag {
        font-size: 11px;
        padding: 3px 8px;
        margin-top: 0.5rem;
    }
    
    /* Ajuste del botón */
    .buy-button {
        padding: 8px;
        font-size: 12px;
        margin-top: auto;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .card-content {
        padding: 14px;
    }
    
    .event-title {
        font-size: 15px;
    }
    
    .event-location, .event-date {
        font-size: 12px;
    }
    
    .buy-button {
        padding: 10px;
        font-size: 13px;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}