/* ========================================
   EVENTS MAIN PAGE STYLES
   Kenya Events & Festivals Calendar
   ======================================== */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   EVENTS HERO SECTION
   ======================================== */
.events-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/events/pattern-overlay.png') repeat;
    opacity: 0.1;
    animation: slidePattern 60s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-content h1 span {
    color: #ffd700;
    display: inline-block;
    animation: pulse 2s infinite;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
    line-height: 1.8;
}

/* ========================================
   EVENT STATS
   ======================================== */
.event-stats {
    padding: 40px 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 30px;
}

.stat-card {
    text-align: center;
    position: relative;
}

.stat-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #667eea, transparent);
}

.stat-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   FILTER SECTION
   ======================================== */
.filter-section {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #f0f0f0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filter-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.view-toggles {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 10px;
}

.view-toggle {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-toggle i {
    font-size: 1.1rem;
}

.view-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-group {
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-clear {
    padding: 12px 25px;
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-clear:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* ========================================
   EVENTS DISPLAY SECTION
   ======================================== */
.events-display-section {
    padding: 40px 0 60px;
    background: #fafafa;
}

/* Grid View */
.events-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.events-grid.active {
    display: grid;
}

/* Event Card */
.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s;
    position: relative;
}

.event-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.event-card:hover .card-image img {
    transform: scale(1.1);
}

.event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    min-width: 60px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

.event-date-badge .month {
    display: block;
    font-size: 0.8rem;
    color: #667eea;
    text-transform: uppercase;
    font-weight: 600;
}

.event-date-badge .day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.status-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.status-badge.ongoing {
    background: #d4edda;
    color: #155724;
}

.status-badge.upcoming {
    background: #cce5ff;
    color: #004085;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.card-content h3 a:hover {
    color: #667eea;
}

.event-meta {
    margin-bottom: 15px;
}

.event-meta p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-meta i {
    color: #667eea;
    width: 16px;
}

.description {
    color: #777;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.event-dates {
    background: #f0f4ff;
    padding: 10px 15px;
    border-radius: 10px;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ticket-info {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 500;
}

.free-badge {
    background: #d4edda;
    color: #155724;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* List View */
.events-list {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.events-list.active {
    display: block;
}

.list-month-header {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: #333;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.list-month-header:first-of-type {
    margin-top: 0;
}

.list-event-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.list-event-item:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%);
}

.list-event-date {
    text-align: center;
    min-width: 80px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.list-day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.list-month {
    display: block;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
}

.list-event-details {
    flex: 1;
}

.list-event-details h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.list-event-details h4 a {
    color: #333;
    text-decoration: none;
}

.list-event-details h4 a:hover {
    color: #667eea;
}

.list-event-details p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.list-event-time {
    color: #667eea;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Calendar View */
.events-calendar {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.events-calendar.active {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #333;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #667eea;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header button:hover {
    background: #f0f4ff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: #667eea;
    padding: 10px;
    font-size: 0.9rem;
}

.calendar-day {
    aspect-ratio: 1;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-day:hover {
    background: #f0f4ff;
    transform: scale(1.05);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.empty:hover {
    background: transparent;
    transform: none;
}

.calendar-day.has-events {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.day-number {
    font-size: 1.2rem;
    font-weight: 500;
}

.event-dot {
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    margin-top: 5px;
}

.event-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 10;
    min-width: 150px;
    margin-top: 10px;
}

.calendar-day:hover .event-tooltip {
    display: block;
}

.tooltip-event {
    padding: 5px 10px;
    color: #333;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.tooltip-event:last-child {
    border-bottom: none;
}

/* ========================================
   MONTHLY HIGHLIGHTS
   ======================================== */
.monthly-highlights {
    padding: 60px 0;
    background: white;
}

.monthly-highlights h2 {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    color: #333;
    margin-bottom: 3rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.month-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.month-card.has-events {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.month-card.has-events:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.month-card:not(.has-events) {
    opacity: 0.5;
    cursor: default;
}

.month-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.month-card p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-view-month {
    display: inline-block;
    padding: 8px 20px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view-month:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slidePattern {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .month-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-card:not(:last-child)::after {
        display: none;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-day-header {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .view-toggles {
        width: 100%;
    }
    
    .view-toggle {
        flex: 1;
        justify-content: center;
    }
    
    .list-event-item {
        flex-direction: column;
        text-align: center;
    }
    
    .list-event-date {
        margin: 0 auto;
    }
    
    .month-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        overflow-x: auto;
    }
    
    .calendar-day-header {
        font-size: 0.7rem;
    }
    
    .month-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}