body {
    background: #f6f6f6;
    margin: 0;
}
.events-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(to right, #ffffffdd, #f6f6f6dd);
    backdrop-filter: blur(8px);
    border-radius: 12px;

    text-align: center;
    width: 100%;
}
.share-btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn.fb { background: #3b5998; color: white; }
.share-btn.wa { background: #25d366; color: white; }
.share-btn.tw { background: #1da1f2; color: white; }
.share-btn.copy { background: #e0e0e0; color: #333; }

.share-btn:hover {
    opacity: 0.85;
}
.event-content a {
    color: #0056b3;             /* Subtle, deep blue */
    text-decoration: underline; /* Keep underline for clarity */
    font-weight: 500;           /* Slight emphasis */
    transition: color 0.2s ease;
}

.event-content a:hover {
    color: #d60039;             /* Match your pink-red theme on hover */
    text-decoration: none;      /* Optional: cleaner hover */
}


.events-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: bold;
    color: #222;
}

.events-title h1 {
    font-size: 2.5rem;
    margin: 0;
}

.calendar-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

/* Search bar wrapper with icon */
.search-wrapper {
    position: relative;
    width: 90%;
    max-width: 500px;
}

#event-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}


#event-search:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}



.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #999;
    pointer-events: none;
}


.events-header {
    background: linear-gradient(to right, #ffffffcc, #f8f8f8cc);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 1.5rem 0;
}

/* Grid for events – using flex for clean centering */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    margin-top: 1.5rem;
    justify-items: center;
}


.events-section {
    margin-top: 1.5rem;
    padding: 15px;
}

.events-section.hidden {
    display: none;
}

/* Event card */
.event-card {
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
    position: relative;
    width: 96%;
    max-width: 380px;
}


.event-card:hover {
    transform: scale(1.015);
}

.event-thumb {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}


/* Tabs */
.tab-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

.tab-filters button {
    padding: 0.6rem 1.2rem;
    border: none;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

.tab-filters button:hover {
    background: #ddd;
}

.tab-filters .active {
    background: #c0392b;
    color: white;
}

/* Detail button */
a.btn-detail {
    background-color: #c0392b;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

a.btn-detail:hover {
    background-color: #a93226;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Date ribbon */
.event-date-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c0392b;
    color: white;
    font-size: 0.8rem;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    font-weight: bold;
}

/* Optional badge */
.badge {
    background: #eee;
    color: #555;
    padding: 0.25em 0.6em;
    border-radius: 5px;
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 0.5em;
}

/* Empty message */
.empty-msg {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 2rem;
}

/* Text formatting */
.event-card h2 {
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

.event-card p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
    color: #333;

    /* Optional clamp for long text */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.event-detail-wrapper {
    max-width: 820px;
    margin: 2rem auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);

    line-height: 1.6;
}

.event-title-block h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #c0392b;
    border-left: 4px solid #c0392b;
    padding-left: 0.8rem;
    margin-bottom: 1.5rem;
}

.event-image-wrapper {
    margin: 1.5rem 0;
    text-align: center;
}

.event-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.event-meta-block p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
    color: #444;
}

.meta-icon {
    margin-right: 0.5rem;
}

.event-description-block {
    margin-top: 2rem;
    font-size: 1rem;
    color: #333;
}

.event-description-block a {
    color: #c0392b;
    font-weight: 500;
    text-decoration: underline;
}

.event-back-button {
    margin-top: 3rem;
    text-align: center;
}
.tab-filters button { color:black; }

.btn-back {
    background: #c0392b;
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-back:hover {
    background: #a93226;
    color:white;
}

.share-btn i {
    margin-right: 6px;
}
.share-btn:hover {
    opacity: 0.85;
    transition: 0.3s ease;
}

.badge-past {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #999;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.past-event {
    opacity: 0.5;
    filter: grayscale(70%);
    /*pointer-events: none;*/
}
/* 🌙 Cool Night Theme for TopRestaurant Events */
.dark-theme {
    background: radial-gradient(circle at top left, #1a1a1a, #0d0d0d);
    color: #eaeaea;
    transition: all 0.3s ease;
}

.dark-theme body {
    background: inherit;
    color: inherit;
}

/* Header */
.dark-theme .events-header {
    background: linear-gradient(90deg, #1f1f1f, #2a2a2a);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
    color: #f5f5f5;
}

/* Logo & Calendar Icon */
.dark-theme .calendar-icon {
    filter: brightness(0.85) sepia(0.5) hue-rotate(180deg);
}

/* Search Bar */
.dark-theme #event-search {
    background: #1e1e1e;
    color: #fff;
    border: 1px solid #444;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.dark-theme .search-icon {
    color: #aaa;
}

/* Tabs */
.dark-theme .tab-filters button {
    background: #2a2a2a;
    color: #ddd;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.dark-theme .tab-filters .active {
    background: linear-gradient(to right, #ff5f6d, #ffc371);
    color: white;
    box-shadow: 0 0 12px rgba(255, 95, 109, 0.5);
    border: none;
}

/* Cards */
.dark-theme .event-card {
    background: #1b1b1b;
    color: #f0f0f0;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.05), 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.dark-theme .event-card:hover {
    background: #222;
    transform: scale(1.015);
    box-shadow: 0 0 24px rgba(255, 71, 87, 0.1), 0 4px 16px rgba(255, 255, 255, 0.08);
}

.dark-theme .event-thumb {
    filter: brightness(0.9) contrast(1.1);
}

.dark-theme .event-card h2 {
    color: #ff6b81;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Meta & Summary */
.dark-theme .event-card p,
.dark-theme .event-meta-block p {
    color: #ccc;
}

/* Link Styling */
.dark-theme .event-content a,
.dark-theme .event-description-block a {
    color: #ff6b81;
    text-decoration: underline;
    font-weight: 500;
}

.dark-theme .event-content a:hover,
.dark-theme .event-description-block a:hover {
    color: #ffa07a;
    text-decoration: none;
}

/* Buttons */
.dark-theme a.btn-detail,
.dark-theme .btn-back {
    background: #ff4757;
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.4);
    transition: all 0.2s ease;
}

.dark-theme a.btn-detail:hover,
.dark-theme .btn-back:hover {
    background: #e84148;
}

/* Date Ribbon */
.dark-theme .event-date-ribbon {
    background: #ff4757;
    color: white;
}

/* Badge */
.dark-theme .badge-past {
    background: #555;
    color: #ccc;
}

/* Empty Message */
.dark-theme .empty-msg {
    color: #777;
    font-style: italic;
}

/* Toggle Theme Button */
.theme-toggle {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.theme-toggle button {
    background: #eaeaea;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-theme .theme-toggle button {
    background: #2c2c2c;
    color: #eee;
    border: 1px solid #444;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

.dark-theme .theme-toggle button:hover {
    background: #444;
    color: white;
}
/* 🌙 Fix header/title colors in dark mode */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme .events-title h1,
.dark-theme .event-title-block h1 {
    color: #ff5f6d;
}

/* 🌙 Invert the logo in dark mode */
.dark-theme img.edgtf-normal-logo {
    filter: brightness(0) invert(1) contrast(1.2);
    transition: filter 0.3s ease;
}


.theme-toggle {
    margin-top: 1rem;
    position: absolute;
    top: 0px;
    left: 8px;
}


/* 🌐 Mobile Optimizations */
@media (max-width: 768px) {
    body {
        padding:0;
    }

    .events-header { padding:25px 0; }
    #event-header {
        text-align: center;
        margin-bottom: 1.5rem;
        padding: 0;
    }
    #event-search {
        width: 87%;
    }
    #event-searchbar {
        width: 90%;
        margin: 0 auto 1rem;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .event-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1rem;
        justify-content: center;
    }

    .event-card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
    }

    .event-card img {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .event-card-body {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .event-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .event-card .btn-details {
        align-self: flex-start;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
        background: #d73d32;
        color: white;
        text-decoration: none;
        transition: background 0.3s ease;
    }

    .event-card .btn-details:hover {
        background: #c02c24;
    }


}

@media (max-width: 500px) {
    img.edgtf-normal-logo {
        position: absolute;
        left: 145px;
    }
}
