/* =====================================================================
    DASHBOARD CSS (Reorganized)
    Order:
    1. Dark Mode Overrides (all .dark-mode at top for easy editing)
    2. Keyframes / Utilities
    3. Component Base Styles (light mode defaults)
   ===================================================================== */

/* =====================================================================
   1. DARK MODE OVERRIDES
   NOTE: All dark mode selectors use higher specificity (.dark-mode .x)
   so ordering above base styles does NOT break override behavior.
   ===================================================================== */

/* Global */
body.dark-mode { background: #181a20; color: #e0e6f0; }
/* Vendor Menu */
/* Gallery Card Styles */
/* Gallery Card Styles (polished) */
.gallery-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 3px 14px -3px rgba(0,0,0,.08), 0 1.5px 4px rgba(0,0,0,.05);
    border: 1px solid #eef1f5;
    transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -6px rgba(0,43,127,.20), 0 4px 10px -2px rgba(0,0,0,.12);
    border-color: #dbe4ef;
}
.gallery-card-header {
    display: flex;
    align-items: center;
    padding: 0.95rem 1.15rem 0.55rem 1.15rem;
    gap: .75rem;
}
.gallery-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg,#eff3f8,#e3eaf2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: #556270;
    box-shadow: inset 0 0 0 1px #dfe5ec, 0 2px 4px rgba(0,0,0,.04);
    flex: 0 0 auto;
}
.gallery-card-title {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: .2px;
    color: #1b2430;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
.gallery-card-meta {
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 500;
    color: #6b7785;
    margin-top: .1rem;
}
.gallery-carousel {
    position: relative;
    width: 100%;
    background: #f4f6fa;
    aspect-ratio: 16 / 9; /* helps layout while images load */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.carousel-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg,#f0f4f9,#e6edf5);
}
.carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    opacity: 0;
    transition: opacity .5s ease;
}
.carousel-img.active { display: block; opacity: 1; }
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.18rem;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px -2px rgba(0,0,0,.35);
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-prev:hover,
.carousel-next:hover { background: rgba(15,23,42,.7); }

.carousel-prev:active,
.carousel-next:active { transform: translateY(-50%) scale(.9); }

.carousel-prev:focus-visible,
.carousel-next:focus-visible { outline: 2px solid #7ca7ff; outline-offset: 2px; }
.gallery-card-caption {
    padding: .85rem 1.15rem 1.15rem 1.15rem;
    color: #374151;
    font-size: .95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    min-height: 3.9em; /* reserve space for 3 lines to reduce reflow */
}

/* Image count badge (optional, shown if element added in DOM) */
.gallery-card-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg,#1d4ed8,#2563eb);
    color: #fff;
    font-size: .7rem;
    letter-spacing: .5px;
    padding: .35rem .55rem .32rem .55rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 4px 14px -2px rgba(0,43,127,.4), 0 1px 3px rgba(0,0,0,.25);
    z-index: 3;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.gallery-card-count-badge svg, .gallery-card-count-badge i { font-size: .95em; }

/* Facebook‑style multi‑photo mosaic ------------------------------------- */
.gallery-mosaic { position: relative; width:100%; display:grid; gap:2px; background:#f3f5f8; }
.gallery-mosaic img { width:100%; height:100%; object-fit:cover; display:block; background:#e5e9ef; opacity:0; transition:opacity .45s ease; }
.gallery-mosaic img.loaded { opacity:1; }
.gallery-mosaic .mosaic-item { position:relative; overflow:hidden; }
.gallery-mosaic .mosaic-item::after { content:''; position:absolute; inset:0; background:transparent; transition:background .25s ease; }
.gallery-mosaic .mosaic-item:hover::after { background:rgba(0,0,0,.10); }
.gallery-mosaic.aspect-1 { aspect-ratio: 16/9; }
.gallery-mosaic.aspect-1 > .mosaic-item { grid-area: 1 / 1 / 2 / 2; }

/* 2 images: side by side */
.gallery-mosaic.layout-2 { grid-template-columns:1fr 1fr; aspect-ratio: 16/9; }
.gallery-mosaic.layout-2 .mosaic-item { aspect-ratio: 1 / 1; }

/* 3 images: left tall, two stacked right */
.gallery-mosaic.layout-3 { grid-template-columns: 2fr 1.2fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/9; }
.gallery-mosaic.layout-3 .mosaic-item:nth-child(1) { grid-row: 1 / span 2; }

/* 4 images: 2x2 grid */
.gallery-mosaic.layout-4 { grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; aspect-ratio: 16/9; }

/* Removed layout-5; we now cap at 4 thumbnails + overlay on 4th if overflow */

/* 3+ stacked right (layout-3) ensure right column split */
.gallery-mosaic.layout-3 .mosaic-item { position:relative; }

/* Overflow (+n) overlay */
.gallery-mosaic .mosaic-overflow { position:relative; }
.gallery-mosaic .mosaic-overflow::after {
    content: attr(data-more);
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    background:rgba(0,0,0,.55);
    color:#fff; font-size:1.85rem; font-weight:600;
    letter-spacing:.5px;
    backdrop-filter: blur(2px);
}

/* Fallback single image styling */
.gallery-mosaic.single img { border-radius: 0; }

/* Dark mode tweaks */
.dark-mode .gallery-mosaic { background:#1f2131; }
.dark-mode .gallery-mosaic img { background:#2a2d42; }
.dark-mode .gallery-mosaic .mosaic-overflow::after { background:rgba(0,0,0,.55); }

/* Dark mode tweaks for polished gallery */
.dark-mode .gallery-card { background: #23243a; border-color: #2d3048; box-shadow: 0 4px 18px -4px rgba(0,0,0,.55), 0 2px 6px -1px rgba(0,0,0,.4); }
.dark-mode .gallery-card:hover { border-color: #3a3d56; }
.dark-mode .gallery-card-avatar { background: linear-gradient(135deg,#2d3048,#24263b); color: #b5bed2; box-shadow: inset 0 0 0 1px #353a57, 0 2px 4px rgba(0,0,0,.4); }
.dark-mode .gallery-carousel { background: #1d1f30; }
.dark-mode .carousel-inner { background: linear-gradient(135deg,#1e2133,#262a40); }
.dark-mode .gallery-card-caption { color: #c7d0e6; }
.dark-mode .gallery-card-meta { color: #8892a7; }
.dark-mode .gallery-card-count-badge { background: linear-gradient(135deg,#2f5bbd,#3d6be0); box-shadow: 0 4px 16px -4px rgba(0,43,127,.55), 0 2px 6px -2px rgba(0,0,0,.55); }
/* Gallery cards no longer show avatar; tighten layout */
.gallery-youtube-card .youtube-card-avatar { display:none !important; }
.gallery-youtube-card .youtube-card-content.no-avatar { margin-left:0; }
/* =====================================================================
   DASHBOARD CSS (Reorganized)
   Order:
   1. Dark Mode Overrides (all .dark-mode at top for easy editing)
   2. Keyframes / Utilities
   3. Component Base Styles (light mode defaults)
   ===================================================================== */

/* =====================================================================
   1. DARK MODE OVERRIDES
   NOTE: All dark mode selectors use higher specificity (.dark-mode .x)
   so ordering above base styles does NOT break override behavior.
   ===================================================================== */

/* Global */
body.dark-mode { background: #181a20; color: #e0e6f0; }
.dark-mode #dashboard-loading svg circle { stroke: #7ca7ff; }
.dark-mode #dashboard-loading svg path { stroke: #7ca7ff; }

/* Vendor Menu */
.dark-mode .vendor-items-title { color: #e0e6f0; }
.dark-mode .vendor-menu-card { background: #23243a; border: 1px solid #2d3250; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.dark-mode .vendor-menu-title { color: #e0e6f0; }
.dark-mode .vendor-menu-desc { color: #b0b8d1; }
.dark-mode .vendor-menu-price { color: #7ca7ff; }
.dark-mode .vendor-menu-add-btn { background: #7ca7ff; color:#23243a; }
.dark-mode .vendor-menu-add-btn:hover { background:#002b7f; color:#fff; }
.dark-mode .vendor-menu-img-wrap { background:#23243a; }
.dark-mode .vendor-menu-empty { color:#b0b8d1; }

/* Detail Views */
.dark-mode .news-detail,
.dark-mode .event-detail,
.dark-mode .gallery-detail,
.dark-mode .video-detail { background:#23243a; color:#e0e6f0; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.dark-mode .news-detail-title,
.dark-mode .event-detail-title,
.dark-mode .gallery-detail-title,
.dark-mode .video-detail-title { color:#7ca7ff; }
.dark-mode .news-detail-meta,
.dark-mode .event-detail-meta,
.dark-mode .gallery-detail-meta,
.dark-mode .video-detail-meta { color:#b0b8d1; }
.dark-mode .news-detail-body,
.dark-mode .event-detail-desc,
.dark-mode .gallery-detail-caption,
.dark-mode .video-detail-caption { color:#c7d0e6; }
.dark-mode .event-detail-location { color:#7ca7ff; }
.dark-mode .gallery-detail-img { background:#23243a; }
.dark-mode .back-btn {
    background: linear-gradient(90deg,#405888 0%,#2f476b 100%);
    color: #eef3ff;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.dark-mode .back-btn:hover {
    background: linear-gradient(90deg,#002b7f 0%,#0d3d9e 100%);
    color:#fff;
    box-shadow:0 4px 14px -2px rgba(0,0,0,.55),0 0 0 1px #0d3d9e inset;
}
.dark-mode .back-btn:active { transform: translateY(1px); }
.dark-mode .back-btn:focus-visible { outline:2px solid #7ca7ff; outline-offset:2px; }

/* Vendor Detail */
.dark-mode .vendor-detail { background:#23243a; color:#e0e6f0; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.dark-mode .vendor-detail-title { color:#7ca7ff; }
.dark-mode .vendor-detail-meta { color:#b0b8d1; }
.dark-mode .vendor-detail-body { color:#c7d0e6; }
.dark-mode .vendor-detail-discount { background:#1b2a1b; color:#a5d6a7; }

/* Vendor Card */
.dark-mode .vendor-card { background:#232634; border:1px solid #2d3250; box-shadow:0 2px 12px rgba(0,0,0,.18); }
.dark-mode .vendor-card-title { color:#e0e6f0; }
.dark-mode .vendor-card-meta { color:#b0b8d1; }
.dark-mode .vendor-card-desc { color:#c7d0e6; }
.dark-mode .vendor-card-discount { background:#1b2a1b; color:#a5d6a7; }

/* Gallery as YouTube */
.dark-mode .gallery-youtube-card .youtube-card-desc { color:#c7d0e6; }

/* YouTube Card */
.dark-mode .youtube-card { background:#232634; border:1px solid #2d3250; box-shadow:0 2px 12px rgba(0,0,0,.18); }
.dark-mode .youtube-card-title { color:#e0e6f0; }
.dark-mode .youtube-card-meta { color:#b0b8d1; }
.dark-mode .youtube-card-avatar { background:#232634; color:#b0b8d1; }
.dark-mode .youtube-card-thumb-wrap { background:#181a20; }

/* Eventbrite Card */
.dark-mode .eventbrite-card { background:#232634; border:1px solid #2d3250; box-shadow:0 2px 12px rgba(0,0,0,.18); }
.dark-mode .eventbrite-card-title { color:#e0e6f0; }
.dark-mode .eventbrite-card-meta,
.dark-mode .eventbrite-card-location { color:#7ca7ff; }
.dark-mode .eventbrite-card-created { color:#b0b8d1; }
.dark-mode .eventbrite-card-desc { color:#c7d0e6; }
.dark-mode .eventbrite-card-date-badge { background:#232634; color:#7ca7ff; border:1px solid #2d3250; }
.dark-mode .eventbrite-card-date-month { color:#7ca7ff; }
.dark-mode .eventbrite-card-date-day { color:#e0e6f0; }
.dark-mode .eventbrite-card-banner-wrap { background:#232634; }

/* Yahoo News Card */
.dark-mode .news-card-yahoo { background:#232634; border:1px solid #2d3250; box-shadow:0 2px 12px rgba(0,0,0,.18); }
.dark-mode .news-card-yahoo-title { color:#e0e6f0; }
.dark-mode .news-card-yahoo-meta { color:#b0b8d1; }
.dark-mode .news-card-yahoo-desc { color:#c7d0e6; }
.dark-mode .news-card-yahoo-img-wrap { background:#232634; }

/* News Row */
.dark-mode .news-card-title { color:#e0e6f0; }
.dark-mode .news-card-meta { color:#b0b8d1; }
.dark-mode .news-card-desc { color:#c7d0e6; }

/* Gallery / Video / Event shared text overrides */
.dark-mode .gallery-card-title,
.dark-mode .video-card-title,
.dark-mode .event-card-title { color:#e0e6f0; }
.dark-mode .gallery-card-meta,
.dark-mode .video-card-meta,
.dark-mode .event-card-meta,
.dark-mode .event-card-created { color:#b0b8d1; }
.dark-mode .gallery-card-caption,
.dark-mode .event-card-desc { color:#c7d0e6; }
.dark-mode .event-card-location { color:#7ca7ff; }
.dark-mode .gallery-card-avatar,
.dark-mode .video-card-avatar { background:#23243a; color:#b0b8d1; }
.dark-mode .gallery-card img,
.dark-mode .gallery-grid img { background:#23243a; }
.dark-mode .carousel-prev,
.dark-mode .carousel-next { background:rgba(99,115,255,0.18); color:#e0e6f0; }

/* Tab Bar / Generic Cards */
.dark-mode .tab-bar { background:#23243a; border-bottom:1.5px solid #23243a; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.dark-mode .tab-bar button { color:#b0b8d1; }
.dark-mode .tab-bar button.active { color:#fff; }
.dark-mode .tab-bar button.active::after { background:#002b7f; }
.dark-mode .tab-content { color:#e0e6f0; }
.dark-mode .card { background:#23243a; color:#e0e6f0; border:1.5px solid #23243a; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.dark-mode .card h3,
.dark-mode .card .vendor-title { color:#7ca7ff; }
.dark-mode .card .meta,
.dark-mode .card .vendor-meta { color:#b0b8d1; }
.dark-mode .card .desc { color:#c7d0e6; }

/* Attribute-based event card tweaks */
.dark-mode .event-card .meta { color:#b0b8d1; }
.dark-mode .event-card [style*='background:#e6eaff'] { background:#23243a !important; }
.dark-mode .event-card [style*='color:#002b7f'] { color:#7ca7ff !important; }

/* Gallery detail description */
.dark-mode .gallery-detail-description { color:#e0e6f0; }

/* =====================================================================
   2. KEYFRAMES / UTILITIES
   ===================================================================== */
@keyframes fadeIn { from { opacity:0; transform:translateY(30px);} to { opacity:1; transform:translateY(0);} }

/* =====================================================================
   3. BASE (LIGHT MODE) STYLES
   ===================================================================== */
/* Vendor Card Logo Thumbnail */
.vendor-logo-thumb-wrap { width:100%; height:auto; border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.vendor-logo-thumb { width:100%; height:100%; object-fit:contain; border-radius:10px; display:block; }
.vendor-logo-thumb-placeholder { width:100%; height:100%; background:#e0e0e0 url('data:image/svg+xml;utf8,<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><rect width="32" height="32" rx="8" fill="%23e0e0e0"/><text x="50%" y="50%" text-anchor="middle" dy=".3em" font-size="14" fill="%23999">No Logo</text></svg>') center center no-repeat; border-radius:10px; }

/* Vendor Menu Card Styles (Food Delivery Look) */
.vendor-items-section {
    margin-top: 2.2rem;
}

.vendor-items-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #23243a;
    margin-bottom: 1.1rem;
}

.vendor-items-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.vendor-menu-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(99, 115, 255, 0.07);
    border: 1px solid #f0f1f3;
    padding: 1rem 1.2rem;
    gap: 1.1rem;
    transition: box-shadow 0.18s;
    position: relative;
}

.vendor-menu-card:hover {
    box-shadow: 0 4px 18px rgba(99, 115, 255, 0.13);
}

.vendor-menu-img-wrap {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-menu-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.vendor-menu-img-placeholder {
    background: #f4f4f4 url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" rx="8" fill="%23e0e0e0"/><text x="50%" y="50%" text-anchor="middle" dy=".3em" font-size="16" fill="%23999">No Image</text></svg>') center center no-repeat;
}

.vendor-menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vendor-menu-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #23243a;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-menu-desc {
    font-size: 0.98rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vendor-menu-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.vendor-menu-price {
    font-size: 1.08rem;
    font-weight: 700;
    color: #002b7f;
}

.vendor-menu-add-btn {
    background: #002b7f;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s;
    box-shadow: 0 2px 8px rgba(99, 115, 255, 0.10);
}

.vendor-menu-add-btn:hover {
    background: #4b5ed7;
}

.vendor-menu-empty {
    color: #888;
    text-align: center;
    padding: 1.5em 0;
    font-size: 1.08rem;
}

@media (max-width: 600px) {
    .vendor-menu-card {
        flex-direction: column;
        align-items: stretch;
        padding: 0.7rem 0.5rem;
        gap: 0.7rem;
    }

    .vendor-menu-img-wrap {
        width: 100%;
        height: 120px;
        border-radius: 8px;
    }

    .vendor-menu-img {
        border-radius: 8px;
    }

    .vendor-menu-title {
        font-size: 1rem;
    }

    .vendor-menu-desc {
        font-size: 0.93rem;
    }

    .vendor-menu-price {
        font-size: 1rem;
    }

    .vendor-menu-add-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

/* Fullscreen Modal for Details View */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 34, 65, 0.82);
    transition: opacity 0.2s;
}

.detail-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.detail-modal-content {
    position: relative;
    z-index: 2;
    width: 100vw;
    max-width: 600px;
    min-height: 60vh;
    max-height: 95vh;
    overflow-y: auto;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

@media (max-width: 700px) {
    .detail-modal-content {
        max-width: 99vw;
        min-height: 80vh;
        padding: 0;
    }
}

.detail-modal[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

/* News, Event, Gallery, Video Detail View Modern Styles */
.news-detail,
.event-detail,
.gallery-detail,
.video-detail {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(99, 115, 255, 0.10), 0 1.5px 8px rgba(0, 0, 0, 0.06);
    /* max-width: 540px; */
    margin: 2.5rem auto 1.5rem auto;
    padding: 2.2rem 2.2rem 1.7rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    animation: fadeIn 0.4s;
}

.news-detail-header,
.event-detail-header,
.gallery-detail-header,
.video-detail-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.news-detail-title,
.event-detail-title,
.gallery-detail-title,
.video-detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: #002b7f;
    margin-bottom: 0.1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.news-detail-meta,
.event-detail-meta,
.gallery-detail-meta,
.video-detail-meta {
    font-size: 1.08rem;
    color: #7a7e8a;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.news-detail-img-wrap img,
.event-detail-banner-wrap img,
.gallery-detail-carousel img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 0.7rem;
    object-fit: cover;
    background: #f4f4f4;
}

/* Video iframe: keep full width, maintain 16:9, no cropping */
.video-detail-frame iframe {
    width:100%;
    aspect-ratio:16/9;
    height:auto;
    border:0;
    border-radius:12px;
    margin-bottom:0.7rem;
    background:#000; /* letterbox background */
    display:block;
}

.news-detail-body,
.event-detail-desc,
.gallery-detail-caption,
.video-detail-caption {
    font-size: 1.13rem;
    color: #23243a;
    line-height: 1.6;
    margin-bottom: 0.2rem;
    white-space: pre-line; /* preserve user-entered new lines */
}

.event-detail-location {
    font-size: 1.08rem;
    color: #002b7f;
    font-weight: 600;
    margin-top: 0.2rem;
}

.gallery-detail-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.7rem;
    padding-bottom: 0.5rem;
    /* Google Images style for desktop */
}

.gallery-detail-img {
    width: 100%;
    max-width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    background: #f4f4f4;
    transition: box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(99, 115, 255, 0.07);
    cursor: pointer;
}

@media (max-width: 700px) {
    .gallery-detail-carousel {
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
        overflow-x: unset;
        padding-bottom: 0;
    }

    .gallery-detail-img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-width: 0;
        border-radius: 10px;
        margin-bottom: 0.7rem;
        box-shadow: 0 1.5px 8px rgba(99, 115, 255, 0.10);
    }
}

/* Unified Back Button Style (single class) */
.back-btn {
    --btn-bg-start: #002b7f;
    --btn-bg-end: #0046c7;
    --btn-text: #ffffff;
    --btn-shadow: 0 2px 5px -1px rgba(0,43,127,.4), 0 1px 2px rgba(0,0,0,.25);
    background: linear-gradient(90deg,var(--btn-bg-start) 0%,var(--btn-bg-end) 100%);
    color: var(--btn-text);
    border: none;
    border-radius: 9999px; /* pill shape */
    padding: 0.65em 1.55em;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.2rem;
    line-height: 1.1;
    display: inline-flex;
    width: auto;
    max-width: max-content;
    flex: 0 0 auto;
    align-items: center;
    gap: .55em;
    position: relative;
    text-decoration: none;
    box-shadow: var(--btn-shadow);
    transition: background .28s ease, box-shadow .28s ease, transform .18s ease;
}
/* Optional utility if a full-width variant is ever needed */
.back-btn-block { display:flex !important; width:100% !important; justify-content:center; }
.back-btn i, .back-btn svg { font-size: 1.05em; line-height: 1; }

.back-btn:hover {
    --btn-bg-start:#0046c7;
    --btn-bg-end:#1e55da;
    box-shadow: 0 6px 18px -4px rgba(0,43,127,.55), 0 3px 6px rgba(0,0,0,.25);
}

.back-btn:active { transform: translateY(1px) scale(.98); }

.back-btn:focus-visible { outline: 2px solid #7ca7ff; outline-offset: 2px; }

/* Auto arrow if no explicit icon element present (simplified) */
.back-btn:not([data-no-auto-arrow]):not(:has(i,svg))::before {
    content: '\2039';
    font-size: 1.15em;
    line-height: 1;
    display: inline-block;
    margin-right: .35em;
    font-weight: 400;
    transform: translateY(-1px);
}

/* Small variant if needed */
.back-btn.small { padding: 0.45em 0.9em; font-size: 0.87rem; }

/* Disabled state */
.back-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .back-btn { transition: none; }
}

/* Legacy alias: .detail-back-btn kept in markup. We don't unset (to avoid stripping .back-btn styles); class now inert. */
/* (No separate rule needed; remove later from HTML/JS when safe.) */

@media (max-width: 600px) {

    .news-detail,
    .event-detail,
    .gallery-detail,
    .video-detail {
        max-width: 98vw;
        padding: 1.1rem 0.7rem 1.1rem 0.7rem;
        border-radius: 10px;
    }

    .news-detail-title,
    .event-detail-title,
    .gallery-detail-title,
    .video-detail-title {
        font-size: 1.25rem;
    }

    .news-detail-body,
    .event-detail-desc,
    .gallery-detail-caption,
    .video-detail-caption {
        font-size: 1.01rem;
    }

    .gallery-detail-img {
        max-width: 110px;
    }
}

/* Dark mode for detail views */
.dark-mode .news-detail,
.dark-mode .event-detail,
.dark-mode .gallery-detail,
.dark-mode .video-detail {
    background: #23243a;
    color: #e0e6f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dark-mode .news-detail-title,
.dark-mode .event-detail-title,
.dark-mode .gallery-detail-title,
.dark-mode .video-detail-title {
    color: #7ca7ff;
}

.dark-mode .news-detail-meta,
.dark-mode .event-detail-meta,
.dark-mode .gallery-detail-meta,
.dark-mode .video-detail-meta {
    color: #b0b8d1;
}

.dark-mode .news-detail-body,
.dark-mode .event-detail-desc,
.dark-mode .gallery-detail-caption,
.dark-mode .video-detail-caption {
    color: #c7d0e6;
}

.dark-mode .event-detail-location {
    color: #7ca7ff;
}

.dark-mode .gallery-detail-img {
    background: #23243a;
}


/* Removed redundant dark-mode .back-btn overrides (now inherit primary gradient & states) */

/* Vendor Detail View Modern Styles */
.vendor-detail {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(99, 115, 255, 0.10), 0 1.5px 8px rgba(0, 0, 0, 0.06);
    margin: 2.5rem auto 1.5rem auto;
    padding: 2.2rem 2.2rem 1.7rem 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    animation: fadeIn 0.4s;
}

.vendor-map-btn, .vendor-map-btn.a {
    text-decoration: none !important;
    display: none;
    margin-bottom: 1.2em;
    padding: 0.55em 1.4em;
    background: linear-gradient(90deg, #2563eb 60%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    box-shadow: 0 2px 12px #2563eb22, 0 1.5px 4px #0001;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    gap: 0.6em;
    display: flex;
    align-items: center;
    letter-spacing: 0.01em;
    font-size: 1.04em;
    outline: none;
    min-width: 180px;
}
.vendor-map-btn.a:hover, .vendor-map-btn:hover {
    background: linear-gradient(90deg, #1d4ed8 60%, #2563eb 100%);
    box-shadow: 0 4px 18px #2563eb33, 0 2px 8px #0002;
    color: #FFF;
}

.vendor-detail-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.vendor-detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: #002b7f;
    margin-bottom: 0.1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.vendor-detail-meta {
    font-size: 1.08rem;
    color: #7a7e8a;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.vendor-detail-body {
    font-size: 1.13rem;
    color: #23243a;
    line-height: 1.6;
    margin-bottom: 0.2rem;
}

.vendor-detail-discount {
    font-size: 1.08rem;
    color: #2e7d32;
    font-weight: 700;
    background: #e8f5e9;
    border-radius: 7px;
    padding: 0.25em 1em;
    display: inline-block;
    margin-top: 0.2rem;
}

@media (max-width: 600px) {
    .vendor-detail {
        max-width: 98vw;
        padding: 1.1rem 0.7rem 1.1rem 0.7rem;
        border-radius: 10px;
    }

    .vendor-detail-title {
        font-size: 1.25rem;
    }

    .vendor-detail-body {
        font-size: 1.01rem;
    }
}

/* Dark mode for vendor detail */
.dark-mode .vendor-detail {
    background: #23243a;
    color: #e0e6f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dark-mode .vendor-detail-title {
    color: #7ca7ff;
}

.dark-mode .vendor-detail-meta {
    color: #b0b8d1;
}

.dark-mode .vendor-detail-body {
    color: #c7d0e6;
}

.dark-mode .vendor-detail-discount {
    background: #1b2a1b;
    color: #a5d6a7;
}

/* Duplicate @keyframes fadeIn removed; single definition kept near top for consistency */

/* Vendor Card Style */
.vendor-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid #f0f1f3;
    margin-bottom: 1.3rem;
    padding: 1.1rem 1.2rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: box-shadow 0.18s;
}

.vendor-card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vendor-card-title {
    font-size: 1.13rem;
    font-weight: 700;
    color: #002b7f;
    margin-bottom: 0.1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-card-meta {
    font-size: 0.98rem;
    color: #7a7e8a;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.vendor-card-desc {
    font-size: 1.04rem;
    color: #444;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vendor-card-discount {
    font-size: 0.99rem;
    color: #2e7d32;
    font-weight: 600;
    background: #e8f5e9;
    border-radius: 6px;
    padding: 0.18em 0.7em;
    display: inline-block;
    margin-top: 0.2rem;
}

.vendor-card:hover {
    box-shadow: 0 4px 18px rgba(99, 115, 255, 0.13);
}

@media (max-width: 900px) {
    .vendor-card {
        border-radius: 10px;
        padding: 0.9rem 0.8rem 0.9rem 0.8rem;
        margin-bottom: 1.1rem;
        height: auto;
    }

    .vendor-card-title {
        font-size: 1.01rem;
    }

    .vendor-card-desc {
        font-size: 0.97rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    }
}

/* Vendor Card Dark Mode */
.dark-mode .vendor-card {
    background: #232634;
    border: 1px solid #2d3250;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.dark-mode .vendor-card-title {
    color: #e0e6f0;
}

.dark-mode .vendor-card-meta {
    color: #b0b8d1;
}

.dark-mode .vendor-card-desc {
    color: #c7d0e6;
}

.dark-mode .vendor-card-discount {
    background: #1b2a1b;
    color: #a5d6a7;
}

/* Youtube/Gallery shared description */
.youtube-card-desc, .gallery-youtube-card .youtube-card-desc {
    color: #444;
    font-size: 1.01rem;
    margin-top: 0.2rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.dark-mode .youtube-card-desc, .dark-mode .gallery-youtube-card .youtube-card-desc {
    color: #c7d0e6;
}

/* YouTube Video Card Style */
.youtube-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid #f0f1f3;
    margin-bottom: 1.3rem;
    overflow: hidden;
    transition: box-shadow 0.18s;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.youtube-card-thumb-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    position: relative;
}

.youtube-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    background: #000;
    border: none;
}

.youtube-card-thumb-placeholder {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    height: 100%;
}

.youtube-card-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.2rem 1.1rem 1.2rem;
}

.youtube-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #888;
    margin-right: 0.7rem;
    flex-shrink: 0;
}

.youtube-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.youtube-card-title {
    font-size: 1.13rem;
    font-weight: 700;
    color: #002b7f;
    margin-bottom: 0.3rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.youtube-card-meta {
    font-size: 0.98rem;
    color: #7a7e8a;
}

@media (max-width: 900px) {
    .youtube-card {
        border-radius: 10px;
        margin-bottom: 1.1rem;
    }

    .youtube-card-thumb-wrap {
        aspect-ratio: 16/9;
        min-height: 120px;
        border-radius: 10px 10px 0 0;
    }

    .youtube-card-thumb {
        border-radius: 10px 10px 0 0;
    }

    .youtube-card-body {
        padding: 0.9rem 0.8rem 0.8rem 0.8rem;
        gap: 0.7rem;
    }

    .youtube-card-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: 0.5rem;
    }

    .youtube-card-title {
        font-size: 1.01rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    }
}

/* YouTube Card Dark Mode */
.dark-mode .youtube-card {
    background: #232634;
    border: 1px solid #2d3250;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.dark-mode .youtube-card-title {
    color: #e0e6f0;
}

.dark-mode .youtube-card-meta {
    color: #b0b8d1;
}

.dark-mode .youtube-card-avatar {
    background: #232634;
    color: #b0b8d1;
}

.dark-mode .youtube-card-thumb-wrap {
    background: #181a20;
}

/* Eventbrite Event Card Dark Mode */
.dark-mode .eventbrite-card {
    background: #232634;
    border: 1px solid #2d3250;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.dark-mode .eventbrite-card-title {
    color: #e0e6f0;
}

.dark-mode .eventbrite-card-meta,
.dark-mode .eventbrite-card-location {
    color: #7ca7ff;
}

.dark-mode .eventbrite-card-created {
    color: #b0b8d1;
}

.dark-mode .eventbrite-card-desc {
    color: #c7d0e6;
}

.dark-mode .eventbrite-card-date-badge {
    background: #232634;
    color: #7ca7ff;
    border: 1px solid #2d3250;
}

.dark-mode .eventbrite-card-date-month {
    color: #7ca7ff;
}

.dark-mode .eventbrite-card-date-day {
    color: #e0e6f0;
}

.dark-mode .eventbrite-card-banner-wrap {
    background: #232634;
}

/* Eventbrite Event Card Style */
.eventbrite-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f1f3;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.18s;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.eventbrite-card-banner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    background: #f4f4f4;
    overflow: hidden;
}

.eventbrite-card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.2s;
}

.eventbrite-card-banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #bfc8ff;
}

.eventbrite-card-date-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #fff;
    color: #002b7f;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(99, 115, 255, 0.10);
    padding: 0.3em 0.9em 0.2em 0.9em;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
}

.eventbrite-card-date-month {
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #002b7f;
    text-transform: uppercase;
}

.eventbrite-card-date-day {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a2341;
    line-height: 1.1;
}

.eventbrite-card-body {
    padding: 1.2rem 1.4rem 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eventbrite-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #1a2341;
    margin-bottom: 0.2rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.eventbrite-card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.01rem;
    color: #002b7f;
    font-weight: 600;
}

.eventbrite-card-location {
    color: #002b7f;
}

.eventbrite-card-created {
    color: #888;
    font-size: 0.98rem;
    font-weight: 400;
}

.eventbrite-card-desc {
    color: #444;
    font-size: 1.04rem;
    margin-top: 0.2rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media (max-width: 900px) {
    .eventbrite-card {
        border-radius: 12px;
        margin-bottom: 1.1rem;
    }

    .eventbrite-card-banner-wrap {
        aspect-ratio: 16/10;
        min-height: 120px;
        border-radius: 12px 12px 0 0;
    }

    .eventbrite-card-banner-img {
        border-radius: 12px 12px 0 0;
    }

    .eventbrite-card-date-badge {
        top: 10px;
        left: 10px;
        min-width: 38px;
        border-radius: 8px;
        padding: 0.2em 0.7em 0.1em 0.7em;
    }

    .eventbrite-card-body {
        padding: 0.9rem 0.8rem 0.8rem 0.8rem;
    }

    .eventbrite-card-title {
        font-size: 1.05rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    }

    .eventbrite-card-desc {
        font-size: 0.97rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    }
}

/* Yahoo News Card Dark Mode */
.dark-mode .news-card-yahoo {
    background: #232634;
    border: 1px solid #2d3250;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.dark-mode .news-card-yahoo-title {
    color: #e0e6f0;
}

.dark-mode .news-card-yahoo-meta {
    color: #b0b8d1;
}

.dark-mode .news-card-yahoo-desc {
    color: #c7d0e6;
}

.dark-mode .news-card-yahoo-img-wrap {
    background: #232634;
}

/* Yahoo News Card Style */
.news-card-yahoo {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid #f0f1f3;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.3rem;
    gap: 1.2rem;
    transition: box-shadow 0.18s;
}

.news-card-yahoo:hover {
    box-shadow: 0 4px 18px rgba(99, 115, 255, 0.13);
}

.news-card-yahoo-img-wrap {
    flex: 0 0 160px;
    max-width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-yahoo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.news-card-yahoo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.news-card-yahoo-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #1a2341;
    margin: 0 0 0.45rem 0;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-card-yahoo-meta {
    font-size: 0.98rem;
    color: #7a7e8a;
    margin-bottom: 0.5rem;
}

.news-card-yahoo-desc {
    font-size: 1.04rem;
    color: #444;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}



/* News Card Row Layout */
.news-card-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-height: 100px;
}

.news-card-img-wrap {
    flex: 0 0 110px;
    max-width: 110px;
}

.news-card-img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.news-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.news-card-title {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-card-meta {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.news-card-desc {
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Dark mode for news card row */
.dark-mode .news-card-title {
    color: #e0e6f0;
}

.dark-mode .news-card-meta {
    color: #b0b8d1;
}

.dark-mode .news-card-desc {
    color: #c7d0e6;
}

/* (Removed duplicate .news-card-desc block; original definition retained earlier) */

/* ===================== Vendor Gallery Grid (Google Images Style) ===================== */
.vendor-gallery-section {
    margin-top: 2.2rem;
}

.vendor-gallery-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #23243a;
    margin-bottom: 1.1rem;
}

.vendor-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 18px;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.vendor-gallery-thumb-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f4f4f4;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(99, 115, 255, 0.07);
    transition: box-shadow 0.18s;
    cursor: pointer;
    position: relative;
}

.vendor-gallery-thumb-wrap:hover {
    box-shadow: 0 4px 18px rgba(99, 115, 255, 0.13);
}

.vendor-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #f4f4f4;
    transition: transform 0.18s;
}

.vendor-gallery-thumb-wrap:hover .vendor-gallery-thumb {
    transform: scale(1.08);
}

@media (max-width: 600px) {
    .vendor-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 12px;
    }
}

/* Fullscreen Modal for Vendor Gallery Image */
.vendor-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(30, 34, 65, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.vendor-gallery-modal[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.vendor-gallery-modal-img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    background: #fff;
    object-fit: contain;
    display: block;
}

.vendor-gallery-modal-close {
    position: absolute;
    top: 32px;
    right: 48px;
    font-size: 2.5rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.18s;
}

.vendor-gallery-modal-close:hover {
    background: rgba(99, 115, 255, 0.38);
}

/* Remove any old/large vendor gallery thumb styles below (if present) */

.tab-bar {
    max-width: 900px;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    border-bottom: 1.5px solid #eee;
    width: 100%;
    padding: 0;
}

.tab-bar button {
    flex: 1;
    padding: 1.1rem 0 1.1rem 0;
    background: none;
    border: none;
    font-size: 1.13rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    outline: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.tab-bar button.active {
    color: #222;
    font-weight: bold;
}

.tab-bar button::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 0px;
    height: 5px;
    border-radius: 5px 5px 0 0;
    background: #002b7f;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1.5px;
    transition: 0.3s cubic-bezier(0.49, 0.55, 0, 1.04);

}

.tab-bar button.active::after {
    width: 38px;
}


.tab-content {
    max-width: 900px;
    margin: auto;
    /* background: #fff; */
    /* border-radius: 12px; */
    /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); */
    padding: 2rem;
    min-height: 300px;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(.4, 0, .2, 1);
}

.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.card {
    background: #f9fafb;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(99, 115, 255, 0.08);
    border: 1.5px solid #e6eaff;
    padding: 1.2rem;
    flex: 1 1 250px;
    min-width: 220px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #002b7f;
}

.card .meta {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.card .desc {
    color: #333;
    font-size: 1rem;
    flex: 1;
}

.card .vendor-title {
    color: #4CAF50;
    font-weight: 600;
    font-size: 1.1rem;
}

.card .vendor-meta {
    color: #888;
    font-size: 0.95rem;
}


/* (Removed legacy gallery card block — superseded by polished Gallery Card Styles above) */

/* Video Card Styles */
.video-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-card-header {
    padding: 1rem 1.2rem 0.5rem 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.video-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #888;
}

.video-card-title {
    font-weight: 600;
    font-size: 1.08rem;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-meta {
    font-size: 0.97rem;
    color: #888;
}

.video-card-frame {
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Event Card Styles */
.event-card {
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(99, 115, 255, 0.08);
    border: 1.5px solid #e6eaff;
}

.event-card-banner {
    width: 100%;
    height: 170px;
    background: #e6eaff;
    position: relative;
    overflow: hidden;
}

.event-card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-card-banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #bfc8ff;
}

.event-card-date-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #fff;
    color: #002b7f;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.32em 0.9em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 115, 255, 0.08);
    letter-spacing: 0.5px;
}

.event-card-body {
    padding: 1.1rem 1.3rem 0.7rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #222;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.event-card-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.event-card-location {
    font-size: 1.01rem;
    color: #002b7f;
    font-weight: 600;
}

.event-card-created {
    font-size: 0.98rem;
    color: #888;
}

.event-card-desc {
    color: #444;
    font-size: 1.04rem;
    margin-top: 0.2rem;
}




body.dark-mode {
    background: #181a20;
    color: #e0e6f0;
}

.dark-mode .tab-bar {
    background: #23243a;
    border-bottom: 1.5px solid #23243a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dark-mode .tab-bar button {
    color: #b0b8d1;
}

.dark-mode .tab-bar button.active {
    color: #fff;
}

.dark-mode .tab-bar button.active::after {
    background: #002b7f;
}

.dark-mode .tab-content {
    /* background: #23243a; */
    color: #e0e6f0;
    /* box-shadow: 0 2px 12px rgba(0,0,0,0.18); */
}

.dark-mode .card {
    background: #23243a;
    color: #e0e6f0;
    border: 1.5px solid #23243a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dark-mode .card h3,
.dark-mode .card .vendor-title {
    color: #7ca7ff;
}

.dark-mode .card .meta,
.dark-mode .card .vendor-meta {
    color: #b0b8d1;
}

.dark-mode .card .desc {
    color: #c7d0e6;
}

.dark-mode .gallery-grid,
.dark-mode .gallery-carousel {
    background: #23243a;
}

.dark-mode .event-card .meta {
    color: #b0b8d1;
}

.dark-mode .event-card [style*='background:#e6eaff'] {
    background: #23243a !important;
}

.dark-mode .event-card [style*='color:#002b7f'] {
    color: #7ca7ff !important;
}

.dark-mode .gallery-card img,
.dark-mode .gallery-grid img {
    background: #23243a;
}

.dark-mode #dashboard-loading svg circle {
    stroke: #7ca7ff;
}

.dark-mode #dashboard-loading svg path {
    stroke: #7ca7ff;
}

/* Dark mode text overrides for dashboard cards */
.dark-mode .gallery-card-title,
.dark-mode .video-card-title,

.dark-mode .gallery-detail-description,
.dark-mode .event-card-title {
    color: #e0e6f0;
}

.dark-mode .gallery-card-meta,
.dark-mode .video-card-meta,
.dark-mode .event-card-meta,
.dark-mode .event-card-created {
    color: #b0b8d1;
}

.gallery-detail-description,
.detail-description {
    white-space: pre-line;
    margin: 0.7em 0 0.5em 0;
    color: #374151;
    font-size: 1.09em;
}

.dark-mode .gallery-card-caption,
.dark-mode .event-card-desc {
    color: #c7d0e6;
}

.dark-mode .event-card-location {
    color: #7ca7ff;
}

.dark-mode .gallery-card-avatar,
.dark-mode .video-card-avatar {
    background: #23243a;
    color: #b0b8d1;
}

.dark-mode .carousel-prev,
.dark-mode .carousel-next {
    background: rgba(99, 115, 255, 0.18);
    color: #e0e6f0;
}

@media (max-width: 900px) {
    .news-card-yahoo {
        flex-direction: column;
        padding: 0.9rem 0.5rem 1.1rem 0.5rem;
        gap: 0.7rem;
    }

    .news-card-yahoo-img-wrap {
        display: block;
        max-width: 100%;
        width: 100%;
        aspect-ratio: auto;
        min-height: 120px;
        border-radius: 10px 10px 0px 0px;
    }

    .news-card-yahoo-img {
        width: 100%;
        height: auto;
        border-radius: 10px 10px 0px 0px;
    }

    .news-card-yahoo-content {
        padding: 0.8rem 0.7rem 0.9rem 0.7rem;
    }

    .news-card-yahoo-title {
        font-size: 1.08rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    }

    .news-card-yahoo-desc {
        font-size: 0.97rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    }

    .tab-bar {
        max-width: 100vw;
        border-radius: 0;
        margin: 0 0 0.7rem 0;
        font-size: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .tab-bar button {
        min-width: 90px;
        padding: 1rem 0.5rem;
        font-size: 1.08rem;
        border-radius: 0;
    }

    .tab-content {
        padding: 0.7rem 0.2rem 0.2rem 0.2rem;
    }

    .card-list {
        gap: 0.7rem;
    }

    .card {
        min-width: 0;
        max-width: 100%;
        margin-bottom: 0.7rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(99, 115, 255, 0.07);
    }

    .news-card-yahoo {
        display: block;
        padding: 0;
    }

    .news-card-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-card-img-wrap {
        max-width: 100%;
        width: 100%;
    }

    .news-card-img {
        width: 100%;
        height: 32vw;
        min-height: 100px;
        max-height: 160px;
        object-fit: cover;
        border-radius: 7px;
    }

    .news-card-title {
        font-size: 1.01rem;
    }

    .news-card-meta {
        font-size: 0.93rem;
    }

    .news-card-desc {
        font-size: 0.97rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .gallery-card-header,
    .video-card-header {
        flex-direction: row;
        padding: 0.6rem 0.6rem 0.2rem 0.6rem;
    }

    .gallery-card-avatar,
    .video-card-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.97rem;
        margin-right: 0.4rem;
    }

    .gallery-card-title,
    .video-card-title,
    .event-card-title {
        font-size: 0.97rem;
    }

    .gallery-card-caption,
    .event-card-desc {
        font-size: 0.93rem;
    }

    .carousel-img {
        min-height: 100px;
        max-width: 100vw;
        border-radius: 7px;
    }

    .event-card-banner {
        height: 28vw;
        min-height: 90px;
        max-height: 150px;
        border-radius: 7px 7px 0 0;
    }

    .event-card-body {
        padding: 0.7rem 0.7rem 0.5rem 0.7rem;
    }
}