/* Header Logo Title Styling */
.header__logo-title {
    font-size: 1.5em !important;
    font-weight: bold !important;
    color: #333 !important;
    white-space: nowrap !important;
    min-width: 200px !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* Month Header Styling */
.month-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
}

/* Event Link Styling */
.event-link {
    color: #3273dc;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    text-decoration: underline;
}

/* Event Meta Styling */
.event-meta {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Mobile Responsive Filter Container */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-container > div {
        width: 100%;
    }
}

/* Column Width Adjustments */
@media only screen and (min-width: 1040px) {
    .posts__topic {
        width: 55% !important;
        min-width: 55% !important;
    }
    .posts__category {
        width: 15% !important;
        min-width: 15% !important;
    }
    .posts__replies {
        width: 15% !important;
        min-width: 15% !important;
    }
    .posts__views {
        width: 15% !important;
        min-width: 15% !important;
    }
    .posts__section-left .posts__topic {
        width: 78.57% !important;
        min-width: 78.57% !important;
    }
    .posts__section-left .posts__category {
        width: 21.43% !important;
        min-width: 21.43% !important;
    }
    .posts__section-right .posts__replies {
        width: 50% !important;
        min-width: 50% !important;
    }
    .posts__section-right .posts__views {
        width: 50% !important;
        min-width: 50% !important;
    }
}

/* Header Table Styling */
.posts__head {
    text-align: center !important;
}

.posts .posts__head .posts__topic,
.posts .posts__head .posts__category,
.posts .posts__head .posts__replies,
.posts .posts__head .posts__views {
    text-align: center !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

/* Event Name Styling - Reduced Size */
.posts__topic h3 {
    font-weight: bold !important;
    font-size: 1.1em !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.3 !important;
}

/* Data Column Alignment */
.posts__item .posts__category {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

.posts__item .posts__replies {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

.posts__item .posts__views {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

/* Center Links in Data Columns */
.posts__item .posts__category a,
.posts__item .posts__replies a,
.posts__item .posts__views a {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}

/* Remove Header Vertical Lines */
@media only screen and (min-width: 1040px) {
    .header__logo {
        border-right: none !important;
    }
    .header__search {
        border-right: none !important;
    }
}

/* Header Logo H1 Styling */
.header__logo h1 {
    font-size: 2.5rem !important;
    font-weight: bold !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

@media only screen and (max-width: 768px) {
    .header__logo h1 {
        font-size: 2rem !important;
    }
}

/* Road and Trail Tag Styling */
.tags a[href*="road"], .tags a.bg-4f80b0 {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.tags a[href*="trail"], .tags a.bg-424ee8 {
    background-color: #2d4a22 !important; /* Dark green untuk kontras yang lebih baik */
    color: #ffffff !important;
}

/* Distance Tag Styling with Pastel Colors */
.tags a.distance-5km {
    background-color: #228b22 !important; /* Forest green - 5 km untuk kontras lebih baik */
    color: #ffffff !important;
}

.tags a.distance-10km {
    background-color: #b8860b !important; /* Dark goldenrod - 10 km untuk kontras lebih baik */
    color: #ffffff !important;
}

.tags a.distance-21km {
    background-color: #d2691e !important; /* Chocolate orange - 21-22 km untuk kontras lebih baik */
    color: #ffffff !important;
}

.tags a.distance-42km {
    background-color: #8b008b !important; /* Dark magenta - 41-43 km untuk kontras lebih baik */
    color: #ffffff !important;
}

.tags a.distance-ultra {
    background-color: #483D8B !important; /* Dark purple - >43 km (Ultra Marathon) */
    color: #ffffff !important;
}

/* Topic Avatar Calendar Emoji Styling */
.topic__avatar {
    font-size: 2.5em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #ff6b6b, #ffa500) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

.topic__avatar:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Event Date Box Styling - Simple Style */
.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.event-date-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    border-color: #999;
}

.event-date-day {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    margin: 0 0 2px 0;
    color: #333;
    font-family: 'Arial', sans-serif;
}

.event-date-month-year {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    margin: 0;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* CSS untuk memastikan emoji bendera negara ditampilkan dengan benar */
.posts__views a {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', 'EmojiOne Mozilla', 'Twemoji Mozilla', 'Segoe UI Symbol', sans-serif !important;
}

/* Fallback untuk semua emoji */
* {
    font-family: inherit, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols';
}

/* Perbaikan kontras warna untuk aksesibilitas */
.bg-348aa7 {
    background-color: #1e5f73 !important; /* Warna lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-f2f4f6 {
    background-color: #e8ecf0 !important; /* Warna background yang lebih kontras */
}

/* Perbaikan kontras untuk link navigasi */
.nav__menu a, .footer a {
    color: #1a1a1a !important; /* Warna text yang lebih gelap */
}

.nav__menu a:hover, .footer a:hover {
    color: #000000 !important;
}

/* Perbaikan kontras untuk posts item text */
.posts__item {
    color: #1a1a1a !important;
}

.posts__item h3, .posts__item h3 a {
    color: #1a1a1a !important;
}

.posts__item a {
    color: #1a1a1a !important;
}

/* Perbaikan kontras untuk tag dengan background terang */
.tags a {
    font-weight: 600 !important; /* Font lebih tebal untuk readability */
}

/* Override untuk kelas warna yang bermasalah - Perbaikan kontras aksesibilitas */
.bg-4f80b0 {
    background-color: #2d4a66 !important; /* Warna lebih gelap */
    color: #ffffff !important;
}

.bg-525252 {
    background-color: #2a2a2a !important; /* Warna lebih gelap */
    color: #ffffff !important;
}

/* Perbaikan kontras untuk bg-424ee8 (sudah ada override di atas untuk trail tags) */
.bg-424ee8:not(.tags a) {
    background-color: #2d3a9f !important; /* Warna biru lebih gelap untuk kontras 4.5:1 */
    color: #ffffff !important;
}

/* Perbaikan kontras untuk bg-348aa7 (sudah ada override di atas) */
.bg-348aa7:not(.tags a) {
    background-color: #1e5f73 !important; /* Warna teal lebih gelap untuk kontras 4.5:1 */
    color: #ffffff !important;
}

/* Perbaikan kontras untuk semua tag dengan background gelap */
.tags a.bg-424ee8,
.tags span.bg-424ee8 {
    background-color: #2d4a22 !important; /* Dark green untuk trail tags */
    color: #ffffff !important;
}

.tags a.bg-348aa7,
.tags span.bg-348aa7 {
    background-color: #1e5f73 !important; /* Dark teal untuk distance tags */
    color: #ffffff !important;
}

/* Perbaikan kontras untuk footer dan copyright text */
.footer, .footer * {
    color: #1a1a1a !important;
}

.footer .js-dropdown {
    color: #1a1a1a !important;
}

/* Memastikan semua link dengan background colors memiliki kontras yang cukup */
a[class*="bg-"] {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Perbaikan khusus untuk link dengan background terang */
a.bg-f9bc64,
a.bg-5dd39e,
a.bg-bce784,
a.bg-c6b38e,
a.bg-a7cdbd,
a.bg-fef2e0,
a.bg-f2f4f6 {
    color: #1a1a1a !important; /* Text gelap untuk background terang */
    font-weight: 600 !important;
}

/* Perbaikan kontras untuk semua background colors yang bermasalah */
.bg-777da7 {
    background-color: #4a5073 !important; /* Warna lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-368f8b {
    background-color: #1e4f4c !important; /* Warna lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-3ebafa {
    background-color: #1e7db8 !important; /* Warna biru lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-36b7d7 {
    background-color: #1e7a9a !important; /* Warna cyan lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-8781bd {
    background-color: #5a4f8a !important; /* Warna ungu lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-3b96ca {
    background-color: #1e5f7a !important; /* Warna biru lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

.bg-c49bbb {
    background-color: #8a5f7a !important; /* Warna pink lebih gelap untuk kontras yang lebih baik */
    color: #ffffff !important;
}

/* Memastikan footer dan copyright memiliki kontras yang baik */
span:contains('©'),
.footer span {
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

/* Perbaikan untuk dropdown menu */
.js-dropdown,
.js-dropdown * {
    color: #1a1a1a !important;
}