/* Event Page Styles */
.events-page {
    min-height: 100vh;
    background: #0f1419;
    margin-top: 0;
}

.events-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.events-hero {
    background: linear-gradient(135deg, #0f1419 0%, #16202b 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 153, 0, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.events-hero .container {
    position: relative;
    z-index: 2;
}

.events-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 800;
    color: #ffffff;
}

.events-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    color: #d1d5db;
}

/* Filters - Modern Compact Design */
.events-filters {
    background: rgba(22, 32, 43, 0.95);
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 153, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: stretch;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
}

/* Only the search magnifier — not icons inside the suggestions dropdown */
.search-box > i.fa-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff9900;
    z-index: 2;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-suggestions .suggestion-icon {
    position: static;
    transform: none;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    padding: 11px 45px 11px 42px;
    border: 1.5px solid rgba(255, 153, 0, 0.3);
    background: rgba(15, 20, 25, 0.8);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff9900;
    background: rgba(15, 20, 25, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#search-btn {
    padding: 11px 20px;
    background: #ff9900;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#search-btn:hover {
    background: #e68a00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

#clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 153, 0, 0.15);
    border: none;
    border-radius: 6px;
    color: #ff9900;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 8px;
    z-index: 10;
    transition: all 0.2s ease;
}

#clear-search:hover {
    background: #ff9900;
    color: white;
}

.filter-dropdowns {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.filter-dropdowns select {
    min-width: 140px;
    padding: 11px 14px;
    border: 1.5px solid rgba(255, 153, 0, 0.3);
    background: rgba(15, 20, 25, 0.8);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff9900' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.filter-dropdowns select:focus {
    outline: none;
    border-color: #ff9900;
    background-color: rgba(15, 20, 25, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.filter-dropdowns select option {
    background: #16202b;
    color: #ffffff;
    padding: 10px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 153, 0, 0.3) transparent;
    padding-bottom: 2px;
}

.filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 153, 0, 0.3);
    border-radius: 2px;
}

.filter-btn {
    padding: 8px 18px;
    border: 1.5px solid rgba(255, 153, 0, 0.3);
    background: rgba(15, 20, 25, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: rgba(255, 153, 0, 0.15);
    color: #ff9900;
    border-color: #ff9900;
}

.filter-btn.active {
    background: #ff9900;
    color: #ffffff;
    border-color: #ff9900;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

/* Events Grid */
.events-grid {
    padding: 40px 0;
    display: block;
    visibility: visible;
    margin-top: 20px;
    scroll-margin-top: 200px;
}

.events-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.event-card.skeleton {
    pointer-events: none;
}

.skeleton-line {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    flex-direction: column;
    visibility: visible;
    scroll-margin-top: 150px;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 153, 0, 0.15);
    border-color: #ff9900;
}

.event-card.past-event {
    opacity: 0.7;
}

.event-card.past-event::after {
    content: 'Past Event';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

.event-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-content {
    padding: 2rem;
    flex: 1;
}

.event-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.3;
}

.event-meta {
    display: none;
}

.event-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.info-tag {
    background: rgba(255, 153, 0, 0.1);
    color: #ff9900;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 153, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.info-tag i {
    font-size: 0.85rem;
}

a.info-tag.community-tag {
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

a.info-tag.community-tag:hover {
    background: rgba(255, 153, 0, 0.2);
    color: #ff9900;
}

.event-description {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.event-footer {
    padding: 1rem 1.5rem;
    background: #0a0e13;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-rating .stars {
    display: flex;
    gap: 1px;
}

.event-rating .stars i {
    color: #666;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.event-rating .stars i.active {
    color: #ffc107;
}

.event-rating .rating-value {
    color: #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

.event-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
}

.event-views i {
    color: #ff9900;
    font-size: 0.75rem;
}

.event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}



.register-btn {
    background: #ff9900;
    color: white;
}

.register-btn:hover {
    background: #e88b00;
    color: white;
}

.details-btn {
    background: transparent;
    color: #ff9900;
    border: 1px solid #ff9900;
}

.details-btn:hover {
    background: #ff9900;
    color: white;
}

/* No Events */
.no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #d1d5db;
}

.no-events i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: #ff9900;
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.no-events-filtered {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    margin: 20px 0;
}

.no-events-filtered i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff9900;
    opacity: 0.7;
}

.no-events-filtered h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.no-events-filtered p {
    margin-bottom: 25px;
    color: #d1d5db;
}

.btn-clear-filters {
    background: #ff9900;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-filters:hover {
    background: #e88b00;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover {
    color: #000;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Pagination - Hidden for infinite scroll */
.pagination-container {
    display: none;
}

/* Loading indicator for infinite scroll */
.loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #ff9900;
}

.loading-more i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .events-page {
        overflow-x: hidden;
    }
    
    .events-page .container {
        padding: 0;
        max-width: 100%;
    }
    
    .events-hero {
        padding: 30px 16px 20px;
    }
    
    .events-hero h1 {
        font-size: 1.75rem;
        margin-bottom: 8px;
    }
    
    .events-hero p {
        font-size: 0.9rem;
    }
    
    .events-filters {
        padding: 14px 0;
        position: sticky;
        top: 0;
        background: rgba(22, 32, 43, 0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        overflow: visible;
    }
    
    .events-filters .container {
        padding: 0 16px;
    }
    
    .search-section {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
        padding: 0;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
        position: relative;
        order: 1;
    }
    
    .search-box input {
        width: 100%;
        padding: 18px 55px 18px 50px;
        font-size: 17px;
        line-height: 1.4;
        border-radius: 14px;
        border: 2px solid #ff9900;
        background: #ffffff !important;
        color: #000000 !important;
        box-sizing: border-box;
        height: 56px;
        font-weight: 400;
        -webkit-appearance: none;
        -webkit-text-fill-color: #000000 !important;
    }
    
    .search-box input:focus {
        background: #ffffff !important;
        color: #000000 !important;
        border-color: #ff9900 !important;
        box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2) !important;
    }
    
    .search-box input::placeholder {
        color: #666666 !important;
        opacity: 1 !important;
    }
    
    .search-box > i.fa-search {
        left: 18px;
        font-size: 1.2rem;
        color: #ff9900;
    }
    
    #clear-search {
        right: 16px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #search-btn {
        width: 100%;
        padding: 18px;
        font-size: 17px;
        border-radius: 14px;
        font-weight: 700;
        box-sizing: border-box;
        height: 56px;
        order: 2;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .filter-dropdowns {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding: 0;
        margin-bottom: 12px;
    }
    
    .filter-dropdowns select {
        width: 100%;
        padding: 12px 28px 12px 10px;
        font-size: 13px;
        min-width: 0;
        border-radius: 10px;
        background-position: right 8px center;
        background-size: 10px;
        border: 1.5px solid rgba(255, 153, 0, 0.3);
        box-sizing: border-box;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .filter-tabs {
        display: flex;
        gap: 6px;
        padding: 0;
        margin-top: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .events-grid {
        padding: 16px 0;
    }
    
    .events-grid .container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    
    .event-card {
        margin: 0;
        border-radius: 12px;
    }
    
    .event-image {
        height: 180px;
    }
    
    .event-content {
        padding: 1.15rem;
    }
    
    .event-title {
        font-size: 1.1rem;
    }
    
    .event-footer {
        padding: 0.85rem;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .event-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .event-actions {
        width: 100%;
    }
    
    .event-actions a {
        width: 100%;
        text-align: center;
        display: block;
    }
    
    .loading-more {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .events-hero {
        padding: 25px 12px 18px;
    }
    
    .events-hero h1 {
        font-size: 1.5rem;
    }
    
    .events-hero p {
        font-size: 0.85rem;
    }
    
    .events-filters .container {
        padding: 0 12px;
    }
    
    .search-box input {
        padding: 17px 55px 17px 48px;
        font-size: 17px;
        line-height: 1.4;
        height: 54px;
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #ff9900;
        border-radius: 14px;
        font-weight: 400;
        -webkit-text-fill-color: #000000 !important;
    }
    
    .search-box input:focus {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2) !important;
    }
    
    .search-box input::placeholder {
        color: #666666 !important;
        opacity: 1 !important;
    }
    
    .search-box > i.fa-search {
        left: 17px;
        font-size: 1.15rem;
    }
    
    #search-btn {
        padding: 17px;
        font-size: 17px;
        height: 54px;
        font-weight: 700;
        border-radius: 14px;
    }
    
    .filter-dropdowns {
        gap: 6px;
    }
    
    .filter-dropdowns select {
        padding: 11px 26px 11px 8px;
        font-size: 12px;
        background-position: right 6px center;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .events-grid .container {
        padding: 0 12px;
        gap: 14px;
    }
    
    .event-image {
        height: 170px;
    }
    
    .event-content {
        padding: 1rem;
    }
    
    .event-title {
        font-size: 1.05rem;
        line-height: 1.35;
    }
    
    .event-description {
        font-size: 0.88rem;
        line-height: 1.5;
    }
    
    .event-footer {
        padding: 0.75rem;
    }
    
    .event-stats {
        font-size: 0.82rem;
    }
}