*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green: #63ab45;
    --green-dark: #4e8c35;
    --green-light: #edf7e6;
    --text: #1a2236;
    --muted: #6b7a99;
    --border: #e4eaf3;
    --shadow: 0 2px 18px rgba(30, 50, 100, 0.08);
    --shadow-hover: 0 6px 32px rgba(30, 50, 100, 0.14);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
}

.notif {
    position: relative;
    cursor: pointer;
}

.notif i {
    font-size: 1.15rem;
    color: var(--muted);
}

.badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background: var(--green);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 5px;
}

/* HERO */
.community-hero {
    background: linear-gradient(135deg, #1a2236 0%, #2d5e1e 60%, #63ab45 100%);
    padding: 52px 32px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.community-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('./../img/community_banner.jpg') center/cover no-repeat;
    opacity: .13;
}

.community-hero>* {
    position: relative;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 99px;
    padding: 5px 16px;
    font-size: .78rem;
    color: #d6f5e8;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 18px;
}

.hero-pill i {
    color: var(--green);
    font-size: .75rem;
}

.community-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 10px;
}

.community-hero h1 em {
    color: var(--green);
    font-style: normal;
}

.community-hero p {
    color: rgba(255, 255, 255, .7);
    font-size: 1rem;
    margin-bottom: 28px;
}

.hero-search {
    display: flex;
    align-items: center;
    max-width: 560px;
    margin: 0 auto 24px;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    color: var(--text);
    background: transparent;
    width: 70%;
}

.hero-search input::placeholder {
    color: var(--muted);
}

.hero-search button {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hero-search button:hover {
    background: var(--green-dark);
}

.hero-stats {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat {
    color: rgba(255, 255, 255, .85);
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-stat i {
    color: var(--green);
    font-size: .9rem;
}

.hero-stat strong {
    color: #fff;
    font-size: 1.05rem;
}

/* LAYOUT */
.main {
    max-width: 1515px;
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: 1fr 365px;
    gap: 28px;
    align-items: start;
}

/* SECTION HEADER */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.section-header span {
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
}

/* FILTER TABS */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 0px!important;
}

.filter-btn {
    border: 1.5px solid var(--border);
    background: rgb(var(--white));
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn i {
    font-size: .76rem;
}

.filter-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.filter-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* ASK BAR */
.ask-bar {
    background: rgb(var(--white));
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.ask-bar:hover {
    border-color: var(--green);
    box-shadow: var(--shadow-hover);
}

.ask-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    flex-shrink: 0;
}

.ask-placeholder {
    flex: 1;
    color: var(--muted);
    font-size: 18px;
}

.ask-actions {
    display: flex;
    gap: 8px;
}

.ask-act-btn {
    border: 1.5px solid var(--border);
    background: transparent;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: .8rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ask-act-btn i {
    font-size: .78rem;
}

.ask-act-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

/* QUESTION CARD */
.question-card {
    background: rgb(var(--white));
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 14px;
    transition: box-shadow .25s, border-color .25s, transform .2s;
    cursor: pointer;
    animation: fadeUp .4s ease both;
}

.question-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #c5dff0;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card:nth-child(1) {
    animation-delay: .05s
}

.question-card:nth-child(2) {
    animation-delay: .1s
}

.question-card:nth-child(3) {
    animation-delay: .15s
}

.question-card:nth-child(4) {
    animation-delay: .2s
}

.question-card:nth-child(5) {
    animation-delay: .25s
}

.q-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.q-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .8rem;
}

.q-user-info {
    flex: 1;
}

.q-username {
    font-size: 18px;
    font-weight: 500;
}

.q-meta {
    font-size: 16px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.q-meta i {
    font-size: 16px;
}

.q-badge {
    font-size: 16px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.q-badge i {
    font-size: .68rem;
}

.q-badge.solved {
    background: #edf7e6;
    color: #4e8c35;
}

.q-badge.open {
    background: #fff4e5;
    color: #e67e22;
}

.q-badge.hot {
    background: #fdecea;
    color: #e74c3c;
}

.q-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 7px;
    line-height: 1.4;
}

.q-title:hover {
    color: var(--green-dark);
}

.q-desc {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.q-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.q-tag {
    font-size: 16px;
    font-weight: 400;
    background: var(--green-light);
    color: var(--green-dark);
    border-radius: 999px;
    padding: 3px 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.q-tag i {
    font-size: .7rem;
}

.q-tag.place {
    background: #eaf2ff;
    color: #2980b9;
}

.q-tag.cat {
    background: #f5eaff;
    color: #8e44ad;
}

.q-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.q-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: var(--muted);
    font-weight: 600;
}

.q-stat i {
    font-size: 16px;
}

.q-stat:hover {
    color: var(--green-dark);
}

.q-upvote-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--border);
    background: rgb(var(--white));
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
}

.q-upvote-btn i {
    font-size: 16px;
}

.q-upvote-btn:hover,
.q-upvote-btn.active {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-light);
}

/* SIDEBAR */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-card {
    background: rgb(var(--white));
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    animation: fadeUp .5s ease both;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: var(--green);
    font-size: .92rem;
    width: 16px;
    text-align: center;
}

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: var(--text);
}

.cat-item:hover {
    background: var(--green-light);
}

.cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cat-icon i {
    font-size: .88rem;
}

.cat-item-name {
    font-size: 16px;
    font-weight: 400;
    flex: 1;
}

.cat-count {
    font-size: 16px;
    color: var(--muted);
    font-weight: 400;
    background: var(--bg);
    border-radius: 999px;
    padding: 4px 12px;
}

.contrib-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contrib-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contrib-rank {
    width: 22px;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
}

.contrib-rank.gold i {
    color: #f1c40f;
}

.contrib-rank.silver i {
    color: #95a5a6;
}

.contrib-rank.bronze i {
    color: #cd7f32;
}

.contrib-rank.num {
    color: var(--muted);
    font-size: .82rem;
}

.contrib-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .82rem;
    flex-shrink: 0;
}

.contrib-info {
    flex: 1;
}

.contrib-name {
    font-size: 16px;
    font-weight: 400;
}

.contrib-pts {
    font-size: 16px;
    color: var(--muted);
}

.contrib-badge {
    font-size: 16px;
    font-weight: 400;
    padding: 3px 9px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.contrib-badge i {
    font-size: .65rem;
}

.guide {
    background: #fff4e5;
    color: #e67e22;
}

.explorer {
    background: #eaf2ff;
    color: #2980b9;
}

.traveler {
    background: var(--green-light);
    color: var(--green-dark);
}

.pop-place-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pop-place-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    color: var(--text);
}

.pop-place-item:hover {
    background: var(--bg);
}

.pop-place-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pop-place-thumb i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .9);
}

.pop-place-name {
    font-size: 18px;
    font-weight: 500;
}

.pop-place-meta {
    font-size: 16px;
    color: var(--muted);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, .45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.question-modal {
    background: rgb(var(--white));
    border-radius: 20px;
    width: min(600px, 95vw);
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    transform: translateY(20px);
    transition: transform .25s;
}

.modal-overlay.open .question-modal {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.modal-title-left i {
    color: var(--green);
}

.modal-close {
    cursor: pointer;
    font-size: 1rem;
    color: var(--muted);
    background: none;
    border: none;
    font-family: inherit;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.modal-close:hover {
    background: var(--bg);
}

.question-modal label {
    display: block;
    font-size: .83rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 5px;
    margin-top: 14px;
}

.question-modal input,
.question-modal textarea,
.question-modal select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: .9rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
}

.question-modal input:focus,
.question-modal textarea:focus,
.question-modal select:focus {
    border-color: var(--green);
    background: #fff;
}

.question-modal textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.btn-secondary {
    border: 1.5px solid var(--border);
    background: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    color: var(--muted);
}

.btn-primary {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    gap: 7px;
}

.btn-primary:hover {
    background: var(--green-dark);
}

/* FAB */
.ask-question-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 90;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(99, 171, 69, .45);
    display: none;
    align-items: center;
    gap: 8px;
    transition: background .2s, transform .15s;
}

.ask-question-button:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

@media (max-width:900px) {
    .main {
        grid-template-columns: 1fr;
    }

    .ask-question-button {
        display: flex;
    }
}

@media (max-width:600px) {
    .community-hero h1 {
        font-size: 1.7rem;
    }

    nav {
        padding: 0 14px;
    }

    .nav-links {
        display: none;
    }
}

.cat-icon {
    background: #edf7e6;
    color: var(--green-dark);
}

.contrib-avatar img,
.q-user-avatar img,
.ask-avatar img {
    border-radius: 20px;
}

.sidebar .sidebar-card:first-child {
    background: linear-gradient(135deg, #1a2236, #2d5e1e);
    border-color: transparent;
}

.sidebar-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.sidebar-card-icon i {
    color: var(--green);
    font-size: 1.1rem;
}

.sidebar-card-title {
    color: #fff;
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 6px;
}
.sidebar-card-desc {
    color: rgba(255, 255, 255, .65);
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.sidebar-card .btn-primary {
    width: 100%;
    border-radius: 10px;
    justify-content: center;
}

.modal-inputs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

/* Large screen  */
@media only screen and (min-width: 1200px) and (max-width: 1319px){

}

/* Medium screen  */
@media only screen and (min-width: 992px) and (max-width: 1199px){

}

/* Tablet Layout: 768px. */
@media only screen and (min-width: 768px) and (max-width: 991px){
    .header-search .search-box2 {
        min-width: 280px;
    }
}

/* Mobile Layout: 320px. */
@media only screen and (max-width: 767px){
    .modal-inputs {
    grid-template-columns: auto;
    }
    .question-modal {
    padding: 16px;
    }
    .ask-placeholder {
        font-size: 14px;
    }
    .ask-bar {
    padding: 10px 10px;
    }
    .question-modal {
    border-radius: 10px;
    padding: 16px;
    height: 400px;
    overflow-y: auto;
    }
    .hero-search input {
    font-family: auto;
    font-size: 14px;
    }

    .q-meta {
    font-size: 14px;
    flex-direction: column;
    }
    .q-meta i{
        display: none;
    }
    .q-stat i{
        display: none;
    }
    .question-card {
    padding: 20px 16px;
    }
    .sidebar-card {
    padding: 16px;
    }
    .contrib-item {
        gap: 7px;
    }
    .contrib-badge {
    font-size: 14px;
    }
    .ask-question-button {
    bottom: 60px !important;
    right: auto !important;
    left: 15px;
    padding: 12px 22px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    gap: 5px !important;
    }
}