/* ========================================
   SMART EVENT DISCOVERY MODULE
   ======================================== */

/* Loading Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.smart-events-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, 
        #0B1A18 0%,
        #0e2220 30%,
        #0F2A2A 60%,
        #0e2220 85%,
        #0B1A18 100%
    );
    position: relative;
    overflow: hidden;
}

.smart-events-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Events Header - Hero Style */
.events-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(127, 255, 0, 0.08);
}

.events-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.events-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-hint span {
    color: rgba(127, 255, 0, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-hint svg {
    width: 24px;
    height: 24px;
    color: #7FFF00;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Events Header - Hero Style */
.events-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(127, 255, 0, 0.08);
}

.events-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.events-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.smart-events-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(127, 255, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(31, 85, 85, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Location & Date Bar */
.location-date-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(127, 255, 0, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Filters Row - Location/Date on left, Banner on right */
.filters-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.location-date-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(127, 255, 0, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.location-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-location,
.icon-calendar {
    width: 18px;
    height: 18px;
    color: #7FFF00;
    flex-shrink: 0;
}

#user-location {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
}

.btn-change-location {
    padding: 0.5rem 1rem;
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    color: #7FFF00;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-change-location:hover {
    background: rgba(127, 255, 0, 0.2);
    transform: translateY(-2px);
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-select:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Category Tabs - Removed (zone discovery replaces categories) */
.category-tabs-container {
    display: none;
}

.category-tabs {
    display: none;
}

.category-tab {
    display: none;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    max-width: 100%;
}

/* Prevent cards from being too wide when few items */
.events-grid .smart-event-card {
    max-width: 480px;
    justify-self: start;
}

/* Events Carousel - Hidden (using grid instead) */
.events-carousel-wrapper {
    display: none;
}

.events-carousel-header {
    display: none;
}

.carousel-controls,
.carousel-btn,
.carousel-counter,
.carousel-dots {
    display: none;
}

/* Old carousel styles - Hidden */
.btn-view-all {
    display: none;
}

.events-carousel {
    display: none;
}

/* Smart Event Card (Grid Version) */
.smart-event-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.smart-event-card:hover {
    transform: translateY(-8px);
    border-color: rgba(127, 255, 0, 0.6);
    box-shadow: 0 16px 48px rgba(127, 255, 0, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

/* Featured Card - Premium styling */
.smart-event-card.featured-card {
    border: 2px solid rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.05);
}

.smart-event-card.featured-card:hover {
    border-color: rgba(255, 107, 107, 0.8);
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.3);
    transform: translateY(-12px) scale(1.02);
}

.badge-featured {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%) !important;
    color: #000 !important;
    font-weight: 700 !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

.smart-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.1) 0%, rgba(0, 217, 255, 0.1) 100%);
}

.smart-card-image .placeholder-gradient {
    width: 100%;
    height: 100%;
}

.smart-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.5rem;
}

.smart-card-badges .badge {
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.smart-card-content {
    padding: 1.5rem;
}

.smart-card-title {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smart-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: #7FFF00;
}

.smart-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-price {
    font-size: 1.2rem;
    color: #7FFF00;
    font-weight: 600;
}

.card-price.free {
    color: #00D9FF;
}

.btn-card-action {
    padding: 0.6rem 1.2rem;
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    color: #7FFF00;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-card-action:hover {
    background: rgba(127, 255, 0, 0.2);
}

/* Carousel Dots - Hidden */
.carousel-dots {
    display: none;
}

.carousel-dot {
    display: none;
}

/* Nearby Events Section */
.nearby-events-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nearby-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-location-pin {
    width: 24px;
    height: 24px;
    color: #7FFF00;
}

.nearby-header h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

#nearby-distance {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.btn-adjust-radius {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    color: #7FFF00;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-adjust-radius:hover {
    background: rgba(127, 255, 0, 0.1);
}

.nearby-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Location Modal */
.location-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.location-modal.active {
    display: flex;
}

.modal-content-location {
    background: linear-gradient(135deg, #1A3A3A 0%, #0F2A2A 100%);
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header-location h3 {
    color: #7FFF00;
    font-size: 1.5rem;
    margin: 0;
}

.btn-close-modal {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 0, 0, 0.2);
}

.modal-body-location {
    padding: 2rem;
}

.btn-auto-detect {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.1), rgba(0, 217, 255, 0.1));
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 12px;
    color: #7FFF00;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-auto-detect svg {
    width: 24px;
    height: 24px;
}

.btn-auto-detect:hover {
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.2), rgba(0, 217, 255, 0.2));
    transform: translateY(-2px);
}

.divider-or {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.divider-or::before,
.divider-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-or::before {
    left: 0;
}

.divider-or::after {
    right: 0;
}

.divider-or span {
    background: #0F2A2A;
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.location-search {
    position: relative;
    margin-bottom: 2rem;
}

.form-control-location {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-location:focus {
    outline: none;
    border-color: #7FFF00;
    background: rgba(255, 255, 255, 0.08);
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1A3A3A;
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.location-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: rgba(127, 255, 0, 0.1);
}

.popular-cities h4 {
    color: #7FFF00;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.city-chip {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-chip:hover {
    background: rgba(127, 255, 0, 0.1);
    border-color: #7FFF00;
    transform: translateY(-2px);
}

.radius-control {
    margin-top: 2rem;
}

.radius-control label {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: block;
}

#radius-value {
    color: #7FFF00;
}

.radius-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.radius-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #7FFF00;
    border-radius: 50%;
    cursor: pointer;
}

.radius-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #7FFF00;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.modal-footer-location {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel,
.btn-apply {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-apply {
    background: linear-gradient(135deg, #7FFF00, #5ACC00);
    border: none;
    color: #0F2A2A;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 255, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .location-date-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-customize {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .events-carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .carousel-controls {
        width: 100%;
        justify-content: space-between;
    }

    .btn-view-all {
        width: 100%;
        justify-content: center;
    }

    .smart-event-card {
        min-width: 280px;
    }

    .nearby-events-grid {
        grid-template-columns: 1fr;
    }

    .modal-content-location {
        width: 95%;
    }

    .cities-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #1A3A3A, #0F2A2A);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast-notification.success {
    border-color: rgba(127, 255, 0, 0.5);
}

.toast-notification.error {
    border-color: rgba(255, 0, 0, 0.5);
}

.toast-notification.warning {
    border-color: rgba(255, 165, 0, 0.5);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
}

.toast-close {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
/* Responsive Grid Styles */
@media (max-width: 1400px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .events-grid .smart-event-card {
        max-width: none;
    }
}

@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nearby-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .smart-events-section .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .events-grid .smart-event-card {
        max-width: none;
    }
    
    .nearby-events-grid {
        grid-template-columns: 1fr;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-section-title {
        font-size: 1.5rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    /* FIXED: Filters Row Mobile Layout */
    .filters-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .location-date-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-location {
        width: 100%;
    }
    
    .date-filter {
        width: 100%;
    }
    
    .date-select {
        width: 100%;
    }
    
    .personalization-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem 1.5rem;
    }
    
    .banner-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .banner-text h4 {
        font-size: 1rem;
    }
    
    .banner-text p {
        font-size: 0.8rem;
    }
    
    .btn-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .btn-auth {
        flex: 1;
        justify-content: center;
    }
    
    .btn-customize {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    /* Events Section Spacing */
    .smart-events-section {
        padding: 3rem 0;
    }
    
    .events-header {
        margin-bottom: 2.5rem;
        padding-bottom: 1.5rem;
    }
    
    .events-categories-container {
        gap: 2.5rem;
    }
}

@media (max-width: 480px) {
    .btn-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-auth {
        width: 100%;
    }
    
    /* Smaller card grid gaps */
    .events-grid {
        gap: 1rem;
    }
    
    /* Smaller hero text */
    .events-title {
        font-size: 2rem;
    }
    
    .events-subtitle {
        font-size: 0.95rem;
    }
    
    /* Compact card styling */
    .smart-card-content {
        padding: 1.25rem;
    }
    
    .smart-card-title {
        font-size: 1.1rem;
    }
    
    .category-section-title {
        font-size: 1.3rem;
        gap: 0.75rem;
    }
    
    .category-icon {
        font-size: 1.3rem;
    }
    
    .smart-events-section .container {
        padding: 0 1rem;
    }
    
    /* Location/Date Bar */
    .user-location span:first-child,
    .date-filter svg {
        display: none; /* Hide icons on very small screens */
    }
    
    .location-text {
        font-size: 0.9rem;
    }
    
    .btn-change-location {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
}