* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: #b3a7a738;
}

nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: #00b842;
    position: sticky;
    top: 0;
    box-shadow: 1px 1px 2px 0px rgba(81, 75, 75, 0.75);
    padding: 0 2rem;
    z-index: 999;
}

/* Default desktop styles */
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link i {
    display: none;
    font-size: 22px;
}

.left {
    width: 150px;
    height: 80px;
}

.left>.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.right>a {
    color: white;
    font-weight: 500;
}

.right>a:hover {
    text-decoration: underline;
    cursor: pointer;
}

.left-logo {
    display: none;
}

/* brand */
.brand {
    background-color: #00b842;
    border-radius: 0 0 30px 30px;
}

.location-search {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 2.5rem 0;
}

.location-search>p {
    color: #ffff;
    margin-bottom: 1.8rem;
}

.location-search>p span {
    color: #ffff;
    background-color: #000;
    display: inline-block;
    padding: 4px;
    font-size: 13px;
    border-radius: 3px;
    ;
}

.search {
    padding: 10px;
    width: 500px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 1px 1px 5px 0px rgba(81, 75, 75, 0.75);
}

.search input {
    width: 95%;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 5px;
}

.search>span {
    color: #31b309;
    font-size: 18px;
    align-items: center;
}

/* category */
.container {
    max-width: 90%;
    margin: 1rem auto;
    display: flex;
    gap: 30px;
}

.category {
    position: sticky;
    background-color: #ffff;
    top: 100px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.categories-grid {
    display: none;
}

.card {
    display: flex;
    align-items: center;
    padding: 1rem;
    /* gap: 10px;
    margin-bottom: 1rem; */
}

.card:hover {
    padding: 1rem;
    background-color: #ddd;
    cursor: pointer;
}

.card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 10px;
}

.card a {
    font-size: 14px;
    font-weight: 500;
    color: #443534;
}

/* ads */
.top-others {
    display: flex;
    gap: 10px;
    margin: 1rem 0;
    height: 200px;
}

.ads {
    flex: 3;
    box-shadow: 1px 1px 2px 0px rgba(81, 75, 75, 0.75);
}

.ads img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert {
    flex: 1;
    box-shadow: 1px 1px 2px 0px rgba(81, 75, 75, 0.75);
}

.cert img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Trending */
.trending h4 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 2rem;
    color: #443534;
    margin-bottom: -2rem;
}

.trending-container{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    margin: 1rem 0;
}

.trending-card {
    width: 200px;
    height: 200px;
    border-radius: 3px;
    margin: 4rem 0;
    padding-bottom: 10px;
    background-color: #ffff;
    box-shadow: 1px 1px 2px 0px rgba(81, 75, 75, 0.75);
    cursor:pointer;
}

.trending-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px 3px 0 0;
}

.card-disc {
    padding: 1rem 0;
    position: relative;
    box-shadow: 1px 1px 2px 0px rgba(81, 75, 75, 0.75);
    border-radius: 0 0 5px 5px;
    background-color: #ffffff;
    align-items: center;
    padding: 10px;
}

.card-disc h4 {
    display: flex;
    font-size: 12px;
    font-weight: 500;
    color: #443534;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: center;
}

.card-disc a {
    background-color: #00b842;
    font-weight: 600;
    color: #ffff;
    display: flex;
    right: 10px;
    padding: 10px;
    text-align: center;
    margin: 5px;
    border-radius: 5px;
}

.card-disc a:hover {
    background-color: #008f2e;
    transition: background-color 0.3s ease;
}

.card-disc a i {
    margin-right: 5px;
    font-size: 20px;
    align-items: center;
}

/* footer */
footer {
    background-color: #00b842;
    padding: 2rem;
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

footer ul {
    flex: 1;
    gap: 30px;
}

footer ul li,
footer ul li a {
    padding: 0.5rem;
    color: #ffff;
}

footer ul li:hover {
    text-decoration: underline;
    cursor: pointer;
}

footer ul label {
    color: rgb(196, 131, 12);
    font-weight: bold;
}

footer ul li a i {
    margin-right: 10px;
    font-size: 20px;
}
.footer-credit {
    text-align: center;
    color: #ffff;
    margin-top: 1rem;
    font-size: 14px;
}

/* ============================
   MOBILE FIXES (Jiji style)
   ============================ */
@media (max-width: 1060px) {
    .trending-container {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .ads {
        flex: 2;
        height: 140px;
    }

    .cert {
        flex: 1;
        height: 140px;
    }

    .ads img {
        object-fit: contain;
    }

    .cert img {
        object-fit: cover;
    }

    .card p {
        font-size: 12px;
    }
}


@media (max-width: 986px) {

    /* NAVIGATION → move to bottom like Jiji */
    nav {
        position: fixed;
        bottom: 0;
        top: auto;
        width: 100%;
        padding: 1.5rem 1rem;
        justify-content: space-around;
        background: #fff;
        box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    nav .right {
        display: flex;
        gap: 30px;
    }

    nav .right a {
        color: #00b842;
        font-size: 14px;
        font-weight: 600;
    }

    nav .left {
        display: none;
    }

    nav .right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        /* spreads icons */
        align-items: center;
    }

    .nav-link {
        flex-direction: column;
        /* stack icon + text (if any) */
        width: 25%;
        /* equal spacing */
        text-align: center;
    }

    .nav-link i {
        display: block;
        font-size: 26px;
        color: #111;
        margin: 0 auto;
    }

    .nav-link span {
        display: none;
        /* still hide text */
    }

    /* BRAND SECTION (Search bar full width) */
    .brand {
        padding-bottom: 20px;
        border-radius: 0 0 25px 25px;
        margin-bottom: 20px;
    }

    .location-search {
        width: 100%;
        padding: 1rem 1rem 1.3rem 1rem;
    }

    .search {
        width: 100%;
        display: flex;
        align-items: center;
        padding: 12px;
        border-radius: 8px;
    }

    .left-logo {
        display: block;
        position: relative;
        top: 10px;
        left: 20px;
        height: 80px;
        width: 150px;
    }

    .left-logo>.logo {
        width: 100%;
        height: 100%;
    }

    /* REMOVE LEFT CATEGORY SIDEBAR */
    .category {
        display: none;
    }

    /* MAIN LAYOUT STACKS */
    .container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 1rem;
    }

    /* ADS SECTION */
    .top-others {
        height: auto;
    }

    .ads {
        width: 100%;
    }

    .ads img {
        object-fit: cover;
    }

    .cert {
        width: 30%;
    }

    /* CATEGORIES GRID LIKE JIJI */
    .others {
        width: 100%;
    }

    .categories-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin: 20px 0;
    }

    .categories-grid .cat-box {
        background: #fff;
        box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        padding: 10px 5px;
    }

    .categories-grid img {
        width: 90px;
        height: 40px;
        object-fit: contain;
        margin-bottom: 5px;
    }
    .categories-grid .cat-box a {
        font-size: 12px;
        color: #443534;
        text-align: center;
        display: block;
    }

    .trending-container {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .card-disc h4 {
        font-size: 12px;
    }

    .card-disc a {
        font-size: 12px;
        padding: 8px;
    }

    .trending-card {
        width: 100%;
        height: 150px;
    }

    .trending-card img {
        object-fit: contain;
    }

    /* FOOTER Grid ON MOBILE */
    footer {
        padding-bottom: 100px;
    }
}

@media (max-width: 670px) {
    .trending-container {
        grid-template-columns: 1fr 1fr;
    }

    .ads {
        flex: 3;
        height: 140px;
    }

    .ads img {
        object-fit: cover;
    }

    footer {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 100px;
    }
}

@media (max-width: 500px) {
    .ads {
        flex: 3;
        height: 120px;
    }

    .cert {
        flex: 1;
        height: 120px;
    }

    .location-search p {
        font-size: 14px;
    }

    .left-logo {
        height: 50px;
        width: 100px;
    }

    .left-logo>.logo {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 430px) {

    .trending-container {
        padding: 1rem;
    }

    .trending-card {
        height: 100px;
        margin-top: 5rem;
    }

    .trending-card img {
        object-fit: contain;
        margin-top: 5px;
    }

    .ads {
        flex: 3;
        height: 100px;
    }

    .cert {
        flex: 1;
        height: 100px;
    }
}