/* ============================================
   Gowesan v2 — Custom Styles
   Dark theme + Forest Green accent
   ============================================ */

:root {
    --gowesan-green: #2d6a4f;
    --gowesan-green-light: #40916c;
    --gowesan-green-dark: #1b4332;
    --gowesan-green-bright: #52b788;
    --gowesan-accent: #d8f3dc;
    --gowesan-danger: #e63946;
}

/* === Navbar brand accent === */
.navbar-brand {
    color: var(--gowesan-green-bright) !important;
}

/* === Buttons === */
.btn-gowesan {
    background-color: #fff;
    border-color: #F97A17;
    border-width: 2px;
    color: #F97A17;
}
.btn-gowesan:hover, .btn-gowesan:focus {
    background-color: #F97A17;
    border-color: #F97A17;
    color: #fff;
}
.btn-gowesan:active {
    background-color: #e06800;
    border-color: #e06800;
    color: #fff;
}
.btn-outline-gowesan {
    color: var(--gowesan-green-bright);
    border-color: var(--gowesan-green-bright);
}
.btn-outline-gowesan:hover {
    background-color: var(--gowesan-green-bright);
    color: #111;
}

/* === Card hover effects === */
.card.gowesan-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-color: rgba(45, 106, 79, 0.2);
}
.card.gowesan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.card.gowesan-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* === Photo Gallery === */
.gallery-primary {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #1a1a1a;
    border-radius: 8px;
    cursor: pointer;
}
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.gallery-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.7;
}
.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--gowesan-green-bright);
    opacity: 1;
}

/* === Article upload preview === */
.article-upload-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-height: 220px;
    cursor: pointer;
}
.article-upload-preview--4col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 575.98px) {
    .article-upload-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        min-height: 140px;
    }
    .article-upload-preview--4col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .article-upload-preview__item {
        border-radius: 8px;
    }
}
.article-upload-placeholder {
    grid-column: 1 / -1;
    min-height: 220px;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}
.article-upload-preview__item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.article-upload-preview__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* === Map containers === */
.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}
#map {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    z-index: 1;
}

/* === SOS Button === */
.btn-sos {
    background-color: var(--gowesan-danger);
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: sos-pulse 1.5s infinite;
    transition: transform 0.1s;
}
.btn-sos:hover {
    color: #fff;
    transform: scale(1.08);
    animation: none;
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.7);
}
.btn-sos:active {
    transform: scale(0.95);
}

@keyframes sos-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.6); }
    70%  { box-shadow: 0 0 0 18px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* === Invoice styling === */
.invoice-container {
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}
.invoice-header {
    border-bottom: 2px solid var(--gowesan-green);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.invoice-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.invoice-total {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gowesan-green-bright);
}
.payment-code {
    font-family: monospace;
    font-size: 1.1rem;
    background: #111;
    padding: 4px 12px;
    border-radius: 4px;
    color: var(--gowesan-green-bright);
}

/* === Community card === */
.community-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.community-card .community-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gowesan-green);
    margin: 0 auto 1rem;
}
.community-card .member-count {
    font-size: 0.85rem;
    color: var(--gowesan-green-bright);
}

/* === Stats cards (admin) === */
.stat-card {
    border-left: 4px solid var(--gowesan-green);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}
.stat-card .stat-label {
    color: #000;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Event pace badges === */
.pace-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pace-santai { background-color: #40916c; color: #fff; }
.pace-sedang { background-color: #e09f3e; color: #111; }
.pace-cepat  { background-color: #e63946; color: #fff; }

/* === Like/Dislike buttons === */
.btn-like, .btn-dislike {
    transition: transform 0.15s;
}
.btn-like:active, .btn-dislike:active {
    transform: scale(1.2);
}
.btn-like.liked {
    color: var(--gowesan-green-bright);
}
.btn-dislike.disliked {
    color: var(--gowesan-danger);
}

/* === Star rating === */
.star-rating {
    direction: rtl;
    display: inline-flex;
}
.star-rating input {
    display: none;
}
.star-rating label {
    color: #555;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f4a261;
}

/* === Share buttons === */
.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.2s, opacity 0.2s;
}
.share-btn:hover { transform: scale(1.15); color: #fff; opacity: 0.9; }
.share-wa   { background-color: #25D366; }
.share-tg   { background-color: #0088cc; }
.share-fb   { background-color: #1877f2; }
.share-tw   { background-color: #1DA1F2; }
.share-copy { background-color: #6c757d; cursor: pointer; }
.share-report {
    background: none;
    color: #dc3545;
    cursor: pointer;
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s;
    padding: 4px 8px;
    border: 1px solid #dc3545;
    border-radius: 6px;
}
.share-report:hover { opacity: 0.7; color: #dc3545; }

/* === Search tabs === */
.search-tabs .nav-link {
    color: #aaa;
}
.search-tabs .nav-link.active {
    background: var(--gowesan-green);
    color: #fff;
    border-color: var(--gowesan-green);
}

/* === Checkpoint row === */
.checkpoint-row {
    background: rgba(45, 106, 79, 0.1);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

/* === Participant list === */
.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* === Article content === */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
}
.article-content p {
    margin-bottom: 1rem;
}

/* === Checkbox bulk === */
.bulk-check {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* === Tabs custom === */
.tab-section {
    display: none;
}
.tab-section.active {
    display: block;
}

/* === Report modal === */
.report-modal .modal-header {
    border-bottom-color: var(--gowesan-danger);
}

/* === Google Maps link button === */
.btn-gmaps {
    background-color: #4285f4;
    color: #fff;
    border: none;
}
.btn-gmaps:hover {
    background-color: #3367d6;
    color: #fff;
}

/* === Misc === */
.featured-ribbon {
    position: absolute;
    top: 10px;
    right: -8px;
    background: var(--gowesan-green-bright);
    color: #111;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 3px;
    z-index: 2;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #444;
}

/* Extra small buttons & inputs */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 0.3rem;
}
.input-group-xs > .form-control,
.input-group-xs > .input-group-text,
.input-group-xs > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 0.3rem;
}

/* Tab navigation — icon + text tab style */
.tab-nav {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-nav-inner {
    min-width: max-content;
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.4rem 0.3rem 0.2rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.7rem;
    line-height: 1.15;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    min-width: 60px;
}
.tab-item .tab-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.1rem;
}
@media (min-width: 768px) {
    .tab-item .tab-icon {
        width: 32px;
        height: 32px;
    }
}
.tab-item span {
    color: #6b7280;
    white-space: nowrap;
}
.tab-item.active {
    border-bottom-color: #03AC0E;
}
.tab-item.active span {
    color: #03AC0E;
}
.tab-item:hover span {
    color: #374151;
}
@media (min-width: 768px) {
    .tab-item {
        flex-direction: row;
        gap: 0.45rem;
        padding: 0.45rem 0.9rem;
        font-size: 1rem;
        min-width: auto;
    }
    .tab-item .tab-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
    }
}

/* Tight spacing below header */
.main-tight {
    padding-top: 2px;
    padding-bottom: 4px;
}
@media (min-width: 768px) {
    .main-tight {
        padding-top: 4px;
        padding-bottom: 6px;
    }
}

/* Hero section — responsive logo + text */
.hero-logo {
    height: 48px;
    width: 48px;
}
/* Top bar logo, title, subtitle */
.hero-title {
    font-size: 0.9rem;
}
.hero-subtitle {
    font-size: 0.67rem;
    color: #111;
}
@media (min-width: 768px) {
    .hero-logo {
        height: 64px;
        width: 64px;
    }
    .hero-title {
        font-size: 1.25rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
        color: #111;
    }
}

/* Responsive thumbnail grid */
@media (max-width: 576px) {
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
    .community-card .community-logo {
        width: 70px;
        height: 70px;
    }
    .map-container, #map {
        height: 250px;
    }
}

/* Mobile text sizing */
@media (max-width: 767.98px) {
    .small-text-mobile {
        font-size: 0.5rem;
    }
}

/* Dashboard nav-tabs — tighter on mobile to prevent 3-line wraps */
@media (max-width: 767.98px) {
    .dashboard-tabs .nav-link {
        padding: 0.35rem 0.45rem;
        font-size: 0.72rem;
        line-height: 1.2;
    }
    .dashboard-tabs .nav-item {
        margin-right: 0;
    }
}

/* Dashboard tab borders — proper tab-style with orange accent */
.dashboard-tabs {
    border-bottom: 2px solid #F97A17;
}
.dashboard-tabs .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-bottom: -2px;
    padding: 0.5rem 1rem;
    color: #666;
    font-weight: 500;
    transition: all 0.15s ease;
}
.dashboard-tabs .nav-link:hover {
    color: #F97A17;
    background: rgba(249, 122, 23, 0.05);
}
.dashboard-tabs .nav-link.active {
    color: #F97A17 !important;
    background: #fff;
    border-color: #F97A17 #F97A17 #fff;
    border-bottom: 2px solid #fff;
    font-weight: 600;
}

/* Profile view mode labels */
.profile-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1px;
    font-weight: 500;
}
.profile-info-value {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    word-break: break-word;
}

/* ── Search Bar (shared by event/listings/places browse) ── */
.search-bar { max-width: 400px; }
.search-bar-inner {
    display: flex; align-items: center; gap: 0;
    background: #fff; border: 2px solid #d1d5db;
    border-radius: 12px; overflow: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.search-input {
    background: transparent; border: none; color: #111;
    padding: 12px 16px; font-size: 0.9rem; outline: none;
    min-width: 0; flex: 1;
}
.search-input::placeholder { color: rgba(0,0,0,0.4); }

.city-selector-wrapper { position: relative; flex-shrink: 0; }
.city-input {
    border-left: 1px solid rgba(0,0,0,0.15); width: 160px; flex: none;
    cursor: pointer;
}
.city-checkbox-dropdown { min-width: 200px; }
.city-checkbox-option {
    display: flex !important; align-items: center; gap: 8px;
    cursor: pointer; white-space: nowrap;
}
.city-checkbox-option input[type="checkbox"] {
    accent-color: #F97A17; width: 16px; height: 16px; margin: 0; flex-shrink: 0;
}
.city-checkbox-option:hover { background: #f3f4f6; }
.city-dropdown-actions {
    padding: 8px 10px; border-top: 1px solid #e5e7eb;
    display: flex; gap: 6px; justify-content: flex-end;
    position: sticky; bottom: 0; background: #fff;
}
.city-apply-btn {
    background: #F97A17; color: #fff; border: none;
    border-radius: 6px; padding: 6px 18px; font-size: 0.82rem;
    font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.city-apply-btn:hover { background: #e06d10; }

.filter-selector-wrapper { position: relative; flex-shrink: 0; }
.filter-input {
    border-left: 1px solid rgba(0,0,0,0.15); width: 170px; flex: none;
    cursor: pointer;
}

.city-dropdown {
    display: none; position: absolute; top: 100%; left: 0; min-width: 100%;
    background: #fff; border: 1px solid #d1d5db;
    border-radius: 8px; max-height: 240px; overflow-y: auto;
    z-index: 1100; margin-top: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.city-dropdown.show { display: block; }
.city-option {
    padding: 8px 14px; cursor: pointer; color: #333;
    font-size: 0.82rem; transition: background 0.1s;
}
.city-option:hover { background: #f3f4f6; color: #111; }
.empty-option { color: #999; cursor: default; pointer-events: none; }
.search-btn {
    background: transparent; border: none; color: #F97A17;
    padding: 10px 16px; cursor: pointer; display: flex; align-items: center;
    transition: color 0.15s; flex-shrink: 0;
}
.search-btn:hover { color: #e06d10; }
@media (max-width: 575px) {
    .city-input { width: 90px; }
    .filter-input { width: 120px; }
    .search-input { padding: 9px 10px; font-size: 0.78rem; }
    .search-btn { padding: 9px 12px; }
}
