/* ============================================
   EVENT FINDER PAGE - BEAUTIFUL RESPONSIVE DESIGN
   ============================================ */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    line-height: 1.6;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.event-finder-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 60px);
    padding: clamp(30px, 5vw, 50px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.page-header .subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 8px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.page-header .description {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    background: white;
    border-radius: 16px;
    padding: clamp(25px, 4vw, 40px);
    margin-bottom: clamp(40px, 5vw, 60px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input {
    padding: clamp(12px, 2vw, 14px);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: clamp(0.95rem, 2vw, 1rem);
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* Search Button */
.btn-search {
    padding: clamp(14px, 2.5vw, 16px) clamp(28px, 4vw, 40px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: center;
    min-width: 200px;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.btn-search:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2em;
}

/* ============================================
   EVENTS SECTION
   ============================================ */
.events-section {
    margin-bottom: clamp(40px, 5vw, 60px);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(24px, 4vw, 32px);
    padding-bottom: 16px;
    border-bottom: 3px solid #e2e8f0;
}

.results-header h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    color: #1e293b;
}

.results-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

/* ============================================
   EVENT GRID
   ============================================ */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: clamp(24px, 3vw, 32px);
}

/* ============================================
   EVENT CARDS
   ============================================ */
.event-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

/* Event Image */
.event-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

.sold-out-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

/* Event Content */
.event-content {
    padding: clamp(20px, 3vw, 24px);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-title {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Details */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    flex: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.9rem, 2vw, 0.95rem);
    color: #475569;
}

.detail-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.detail-text {
    line-height: 1.4;
}

/* Tickets Button */
.btn-tickets {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0066cc 0%, #003d99 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    margin-top: auto;
}

.btn-tickets:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
    text-decoration: none;
    color: white;
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.no-results-icon {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 20px;
    opacity: 0.4;
}

.no-results h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.no-results p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: clamp(40px, 5vw, 60px);
}

.pagination-btn {
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 0.95rem);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.page-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Tablets and Desktops (1024px+) */
@media (min-width: 1024px) {
    .event-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
    .event-finder-page {
        padding: 50px 24px;
    }

    .event-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Mobile Landscape & Large Phones (481px - 767px) */
@media (max-width: 767px) {
    .event-finder-page {
        padding: 30px 16px;
    }

    .page-header {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .search-section {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-search {
        width: 100%;
        min-width: unset;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

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

    .event-image {
        height: 200px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .page-number {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Small Mobile Phones (320px - 480px) */
@media (max-width: 480px) {
    .event-finder-page {
        padding: 24px 12px;
    }

    .page-header {
        padding: 24px 16px;
        margin-bottom: 30px;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .search-section {
        padding: 20px 16px;
        margin-bottom: 30px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input {
        padding: 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .btn-search {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .results-header h2 {
        font-size: 1.35rem;
    }

    .results-count {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .event-grid {
        gap: 16px;
    }

    .event-image {
        height: 180px;
    }

    .event-content {
        padding: 18px;
    }

    .event-title {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    .detail-item {
        font-size: 0.85rem;
        gap: 8px;
    }

    .btn-tickets {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .no-results {
        padding: 50px 20px;
    }

    .pagination {
        gap: 6px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .page-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Very Small Devices (< 320px) */
@media (max-width: 319px) {
    .event-finder-page {
        padding: 20px 10px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .event-title {
        font-size: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Visible for Keyboard Navigation */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .pagination {
        display: none;
    }

    .event-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }

    .btn-tickets {
        display: none;
    }
}
