/* =============================
   GENERAL
============================= */
body {
    font-family: Arial, sans-serif;
    background: #f6f6f6;
    margin: 0;
}

.container {
    width: 90%;
    margin: auto;
}

/* =============================
   LAYOUT
============================= */
.category-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}

.posts-area {
    flex: 3;
}

.sidebar {
    flex: 1;
}

/* =============================
   POSTS LIST
============================= */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-row-card {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post-row-thumb {
    width: 280px;
    min-width: 280px;
    position: relative;
    background: #f3f3f3;
}

.post-row-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-row-content {
    flex: 1;
    padding: 20px;
}

.post-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.post-row-price {
    font-size: 16px;
    font-weight: 700;
    color: #163333;
}

.post-row-title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.35;
}

.post-row-title a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.post-row-title a:hover {
    color: inherit;
    text-decoration: none;
}
.post-row-location {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}

.post-row-time {
    font-size: 14px;
    color: #8a8a8a;
}

.favorite-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    background: #fff;
    color: #0f3d3e;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}
.favorite-btn.active {
    color: #dc3545;
    border-color: #dc3545;
}

/* ===============================
   CATEGORY FAVORITE BUTTON
================================ */

.post-row-top {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
    padding-right: 52px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.category-favorite-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 1px solid #d9dfe8;
    border-radius: 50%;
    background: #fff;
    color: #8b95a7;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 2;
}

.category-favorite-btn:hover {
    border-color: #0a58ca;
    color: #0a58ca;
    transform: translateY(-50%);
}

.category-favorite-btn.active {
    color: #0a58ca;           /* 🔵 blue heart */
    border-color: #0a58ca;    /* 🔵 blue border */
    background: #eef4ff;      /* light blue background */
}

.category-favorite-btn .heart-icon {
    line-height: 1;
    font-size: 18px;
}

/* =============================
   CORNER BOX RIBBON (CARD STYLE)
============================= */

.featured-ribbon {
    position: absolute;
    top: 12px;
    right: -35px;   /* less overflow */
    padding: 5px 40px; /* reduce width */
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 5;
}

/* Elite (gold) */
.featured-ribbon.elite {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: white;
}

/* Prime (blue) */
.featured-ribbon.prime {
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
}
.post-row-thumb {
    position: relative;
    overflow: hidden; /* 🔥 THIS REMOVES EXTRA PART */
}

/* =============================
   SIDEBAR
============================= */
.sidebar-box {
    background: #fff;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    border-radius: 10px;
}

.sidebar-box h4 {
    margin-bottom: 15px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #555;
    text-decoration: none;
}

.category-list a:hover {
    color: #0d6efd;
}

/* =============================
   PAGINATION
============================= */
.pagination {
    margin: 40px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: white;
    background: #0a58ca;
    border-radius: 6px;
}

.pagination a.active {
    background: white;
    color: #0a58ca;
    border: 1px solid #0a58ca;
}

.pagination a.next {
    font-weight: bold;
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 900px) {
    .category-layout {
        flex-direction: column;
    }

    .post-row-card {
        flex-direction: column;
    }

    .post-row-thumb {
        width: 100%;
        min-width: 100%;
    }

    .post-row-thumb img {
        height: 220px;
    }
}

.post-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.post-action-btn,
.post-action-btn:visited,
.post-action-btn:focus,
.post-action-btn:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #0a58ca;
    background: #ffffff;
    color: #0a58ca !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* EMAIL */
a.post-action-btn.email-btn,
a.post-action-btn.email-btn:visited,
a.post-action-btn.email-btn:focus,
a.post-action-btn.email-btn:active {
    background: #ffffff;
    color: #0a58ca !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

a.post-action-btn.email-btn:hover {
    background: #0a58ca;
    color: #ffffff !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

/* WHATSAPP */
a.post-action-btn.whatsapp-btn,
a.post-action-btn.whatsapp-btn:visited,
a.post-action-btn.whatsapp-btn:focus,
a.post-action-btn.whatsapp-btn:active {
    background: #ffffff;
    color: #0a58ca !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

a.post-action-btn.whatsapp-btn:hover {
    background: #0a58ca;
    color: #ffffff !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

/* CALL */
a.post-action-btn.call-btn,
a.post-action-btn.call-btn:visited,
a.post-action-btn.call-btn:focus,
a.post-action-btn.call-btn:active {
    background: #ffffff;
    color: #0a58ca !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

a.post-action-btn.call-btn:hover {
    background: #0a58ca;
    color: #ffffff !important;
    border: 1px solid #0a58ca;
    text-decoration: none;
}

.post-action-btn:active {
    transform: scale(0.97);
}

.post-action-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.post-user-logo {
    margin-left: auto;
    width: 42px;              /* make width = height */
    height: 42px;
    border-radius: 50%;       /* 🔥 makes circle */
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-user-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;        /* fills circle nicely */
    border-radius: 50%;       /* ensures image is round */
}

.post-action-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}


.package-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.package-tag.pro {
    background: #e8f1ff;
    color: #0d6efd;
    border: 1px solid #bcd3ff;
}

.package-tag.starter {
    background: #fff4df;
    color: #c97a00;
    border: 1px solid #ffd58a;
}

.package-tag.free {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #ddd;
}

.package-tag.default {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #ddd;
}

.post-row-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.post-row-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-row-actions-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.post-row-package {
    margin: 0;
}

.post-row-location-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.post-row-location {
    font-size: 14px;
    color: #555;
}

.post-row-package-inline {
    flex-shrink: 0;
}

.post-row-time-wrapper {
    display: flex;
    justify-content: space-between; /* pushes left & right */
    align-items: center;
    width: 100%; /* VERY IMPORTANT */
}

.post-row-time {
    font-size: 13px;
    color: #777;
}

.post-row-installment {
    display: flex;
    justify-content: flex-end;
}

.installment-badge-left {
    background: #ff9800; /* new orange color */
    color: #fff;         /* text color stays white */
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    border-radius: 12px;
    margin-top: 8px;      /* adds gap from top */
}

.post-row-content {
    width: 100%;
}

.ads-top,
.ads-mid {
    margin: 20px 0;
    text-align: center;
}
.sidebar-ad {
    margin-bottom: 20px;
    text-align: center;
}

.sidebar-ad ins {
    width: 100%;
}
.ads-bottom {
    margin: 25px 0;
    text-align: center;
}

/* =========================================
   CATEGORY ADSENSE ADS
========================================= */

/* Top / middle / bottom ads inside posts area */
.ads-top,
.ads-mid,
.ads-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 18px 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* Desktop 728x90 style ad area */
.ads-top ins.adsbygoogle,
.ads-mid ins.adsbygoogle,
.ads-bottom ins.adsbygoogle {
    display: block;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Sidebar ad wrapper */
.sidebar-ad {
    width: 100%;
    margin: 0 0 18px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

/* Sidebar ad size */
.sidebar-ad ins.adsbygoogle {
    display: block;
    width: 100%;
    max-width: 300px;
    min-height: 250px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Optional clean box look for ad spaces before live ads */
.ads-top,
.ads-mid,
.ads-bottom,
.sidebar-ad {
    background: #fff;
}

/* Give more space between ads and cards */
.ads-top + .post-row-card,
.ads-mid + .post-row-card {
    margin-top: 16px;
}

.post-row-card + .ads-mid {
    margin-top: 16px;
}

/* Bottom ad after pagination */
.pagination + .ads-bottom {
    margin-top: 24px;
}

/* Sidebar spacing */
.sidebar .sidebar-box + .sidebar-ad,
.sidebar-ad + .sidebar-box {
    margin-top: 18px;
}

/* =========================================
   RESPONSIVE
========================================= */

/* Tablet */
@media (max-width: 991px) {
    .ads-top ins.adsbygoogle,
    .ads-mid ins.adsbygoogle,
    .ads-bottom ins.adsbygoogle {
        max-width: 100%;
        min-height: 90px;
    }

    .sidebar-ad ins.adsbygoogle {
        max-width: 100%;
        min-height: 250px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .ads-top,
    .ads-mid,
    .ads-bottom {
        margin: 14px 0;
    }

    .ads-top ins.adsbygoogle,
    .ads-mid ins.adsbygoogle,
    .ads-bottom ins.adsbygoogle {
        max-width: 100%;
        min-height: 100px;
    }

    .sidebar-ad {
        margin: 14px 0;
    }

    .sidebar-ad ins.adsbygoogle {
        max-width: 100%;
        min-height: 100px;
    }
}

