* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', 'Segoe UI', Arial, sans-serif; }
html { overflow-x: hidden; }
body { background: #f4f5f7; color: #333; overflow-x: hidden; }

/* =====================
   HEADER
   ===================== */
.header {
    background: #fff;
    border-bottom: 1px solid rgba(230,5,111,0.12);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    margin: 0 auto;
    padding: 10px 20px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
#img_logo { max-height: 38px; }
.settings-icon {
    position: absolute; right: 20px;
    opacity: 0.45;
    color: #bbb; font-size: 20px; transition: all 0.3s;
    text-decoration: none;
}
.settings-icon:hover { color: #e6056f; transform: rotate(90deg); }

/* =====================
   HERO
   ===================== */
.hero {
    background: 
        linear-gradient(135deg, rgba(230,5,111,0.85) 0%, rgba(255,150,35,0.85) 100%),
        url('/img/wallpaper1.png') center center / cover no-repeat;
    padding: 36px 20px 52px;
    text-align: center; position: relative;
}

.hero::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero h1 {
    color: #fff; font-size: 26px; font-weight: 800;
    margin-bottom: 6px; position: relative;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hero p {
    color: rgba(255,255,255,0.88); font-size: 14px;
    margin-bottom: 22px; position: relative;
}
/* =====================
   BUSCADOR
   ===================== */
.search-wrapper {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
    z-index: 500;
}
.search-box {
    display: flex; background: #fff;
    border-radius: 50px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.search-box input {
    flex: 1; border: none; outline: none;
    padding: 13px 20px; font-size: 14px;
    font-family: inherit; color: #333;
    min-width: 0;
}
.search-box input::placeholder { color: #bbb; }
.search-btn {
    background: linear-gradient(135deg, #e6056f, #ff9623);
    border: none; padding: 12px 22px;
    color: white; font-size: 15px; cursor: pointer;
    border-radius: 0 50px 50px 0; transition: opacity 0.2s;
    flex-shrink: 0;
}
.search-btn:hover { opacity: 0.88; }

.search-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none; z-index: 500;
    text-align: left;
}
.search-dropdown.visible { display: block; }
.dropdown-item {
    padding: 12px 18px; cursor: pointer; transition: background 0.2s;
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; color: #333;
    border-bottom: 1px solid #f5f5f5;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: #fef0f6; color: #e6056f; }
.dropdown-item i { color: #e6056f; width: 16px; flex-shrink: 0; }
.dropdown-empty { padding: 20px; text-align: center; color: #aaa; font-size: 14px; }

/* =====================
   FILTROS
   ===================== */
.filters {
    max-width: 1200px; margin: 0 auto;
    padding: 18px 16px 0;
    display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-label {
    font-size: 12px; color: #aaa; font-weight: 500;
    white-space: nowrap; flex-shrink: 0;
}
.filter-tag {
    background: #fff; border: 1.5px solid #e0e0e0;
    color: #666; padding: 6px 14px; border-radius: 50px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
    user-select: none;
}
.filter-tag:hover { border-color: #e6056f; color: #e6056f; background: #fef0f6; }
.filter-tag.active {
    border-color: #e6056f; color: #fff;
    background: linear-gradient(135deg, #e6056f, #ff9623);
    box-shadow: 0 3px 10px rgba(230,5,111,0.25);
}

/* =====================
   SECTION HEADER
   ===================== */
.section-header {
    max-width: 1200px; margin: 20px auto 12px;
    padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.section-title { font-size: 17px; font-weight: 700; color: #2d3748; }
.section-count {
    font-size: 12px; color: #bbb;
    background: #f0f0f0; padding: 3px 10px;
    border-radius: 50px;
}

/* =====================
   GRID + CARDS
   ===================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px 50px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

.event-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07); transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex; flex-direction: column; cursor: pointer;
}
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(230,5,111,0.15);
}

.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.65); transform: scale(1.1);
}
.poster {
    position: relative; width: 100%; height: 100%;
    object-fit: contain; z-index: 1;
}
.poster-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e6056f, #ff9623);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 48px;
}

.card-content { padding: 13px 14px; flex: 1; display: flex; flex-direction: column; }
.event-title {
    font-size: 15px; font-weight: 700; color: #1a202c;
    line-height: 1.35; margin-bottom: 5px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.event-descrip {
    color: #e6056f; font-size: 12px; font-weight: 500;
    margin-bottom: 8px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.event-meta { margin-top: 0; }
.event-location {
    color: #999; font-size: 11px; margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: flex; align-items: center; gap: 4px;
}
.event-location i { color: #e6056f; font-size: 10px; flex-shrink: 0; }
.event-date {
    font-size: 11px; font-weight: 600; color: #555;
    display: flex; align-items: center; gap: 5px; margin-bottom: 10px;
}
.event-date i { color: #e6056f; font-size: 10px; }
.card-footer {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px; margin-top: 8px;
}
.price-tag {
    background: #fef0f6; color: #c0195e;
    padding: 4px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700;
    border: 1px solid #f0c2d6; white-space: nowrap;
}
.buy-button {
    background: linear-gradient(135deg, #e6056f, #ff9623);
    color: white; border: none; border-radius: 8px;
    padding: 7px 13px; font-size: 11px; font-weight: 700;
    cursor: pointer; transition: all 0.25s; text-decoration: none;
    box-shadow: 0 3px 8px rgba(230,5,111,0.25);
    white-space: nowrap; letter-spacing: 0.3px;
}
.buy-button:hover { opacity: 0.88; transform: translateY(-1px); }

/* =====================
   NO EVENTOS
   ===================== */
.no-events { text-align: center; padding: 60px 20px; color: #ccc; }
.no-events i { font-size: 44px; margin-bottom: 14px; color: #e0e0e0; display: block; }
.no-events p { font-size: 15px; color: #aaa; }

/* =====================
   MOBILE (hasta 576px)
   ===================== */
@media (max-width: 576px) {

    .hero { padding: 28px 16px 44px; }
    .hero h1 { font-size: 21px; }
    .hero p { font-size: 13px; margin-bottom: 18px; }

    .search-box input { padding: 12px 16px; font-size: 14px; }
    .search-btn { padding: 11px 18px; font-size: 14px; }

    .grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .event-card {
        flex-direction: row;
        min-height: 110px;
        border-radius: 14px;
    }

    .poster-container {
        width: 32%;
        min-width: 100px;
        aspect-ratio: unset;
        border-radius: 14px 0 0 14px;
        align-self: stretch;
    }

    .poster { object-fit: cover; }

    .card-content {
        width: 68%;
        padding: 10px 12px;
        display: flex; flex-direction: column;
    }

    .event-title {
        font-size: 14px; font-weight: 700;
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }

    .event-descrip {
        font-size: 11px; margin-bottom: 15px;
        -webkit-line-clamp: 2;
    }

    .event-meta { margin-top: 0; }
    .event-location { font-size: 10px; margin-bottom: 2px; }
    .event-date { font-size: 10px; margin-top: 10px; }

    .card-footer { margin-top: 20px; gap: 6px; }

    .price-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    .buy-button {
        font-size: 10px;
        padding: 6px 10px;
        border-radius: 7px;
    }

    .section-header { margin: 14px auto 10px; }
    .section-title { font-size: 15px; }

    .filters { padding: 14px 12px 0; gap: 6px; }
    .filter-tag { padding: 5px 12px; font-size: 11px; }
}

/* =====================
   TABLET (577px - 768px)
   ===================== */
@media (min-width: 577px) and (max-width: 768px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .hero h1 { font-size: 23px; }
}

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