body {
        font-family: 'Poppins', sans-serif;
        background-color: #f9f9f9;
            margin: 0;
            padding: 0;
    }
header {
    background-color: #4B0082;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    animation: slidefromtop 0.8s ease-out;
    z-index: 10;
    position: relative;
    top: 0;
    left: 0;
}
header img {
    height: 60px;
    filter: brightness(0) invert(1);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-links a {
    background-color: #C71585;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.nav-links a:hover {
    background-color: #e052a0;
    transform: translateY(-2px);
}
.cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../IMAGES/Cover_image.jpg") center/cover no-repeat;
    filter: blur(8px);
    z-index: -1;
}
    h2 {
        text-align: center;
        color: #7b1fa2;
        margin-bottom: 25px;
    }

/* Search panel fixed left */

/* Search panel fixed left, fits header */
.search-panel {
    position: fixed;
    top: 80px; /* header height */
    left: 0;
    width: 220px;
    height: calc(100vh - 80px); /* full height minus header */
    background: #ffffffff;
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Inputs, selects, and button sizing */
.search-panel input,
.search-panel select,
.search-panel button {
    width: 100%;        /* fit sidebar width */
    box-sizing: border-box; /* include padding/border in width */
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Search button styling */
.search-panel button {
    background: #ff4081;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    font-weight: bold;
}
.search-panel button:hover {
    background: #ff1744;
}

/* Ads container to the right of search panel */
.ads-wrapper {
    margin-left: 240px;
    padding: 20px;
    flex: 1;
}

/* Ads grid */
.ad-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.ad-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: none; /* hidden initially */
}
.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.ad-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f3f3f3;
}
.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.service-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff007b;
    color: white;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
}
.ad-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    color: #444;
    font-weight: bold;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
}
.ad-details {
    padding: 15px;
    line-height: 1.6;
}
.ad-details h3 {
    color: #333;
    margin: 0 0 8px 0;
}
.price {
    color: #e91e63;
    font-weight: bold;
    font-size: 16px;
}
.ad-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}
.more-btn {
    display: block;               /* make it full width inside the card */
    text-align: center;
    width: calc(100% - 30px);     /* optional, can remove for 100% */
    margin: 10px auto 15px;       /* auto centers the button */
    padding: 10px;
    background: linear-gradient(135deg, #ff4081, #ff1744);
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
    box-sizing: border-box;       /* ensures padding included in width */
}

.more-btn:hover {
    background: linear-gradient(135deg, #ff1744, #ff4081);
}

#showMoreBtn {
    display: block;
    margin: 30px auto;
    padding: 12px 25px;
    font-size: 16px;
    background: #ff4081;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
#showMoreBtn:hover {
    background: #ff1744;
}
.page-title-container {
    margin-left: 240px; /* space for the search sidebar */
    padding: 20px 0;
    text-align: center; /* center horizontally */
    background: transparent; /* transparent background */
}

.page-title-container h1 {
    margin: 0;
    font-size: 28px;
    color: #7b1fa2;
    font-weight: bold;
}


/* Responsive adjustments */
@media (max-width: 1200px) {
    header img {
        height: 50px; 
    }
    .nav-links a {
        padding: 8px 16px;
        font-size: 14px;
    }
    form {
        max-width: 70%;
    }
    .ad-container { 
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    header {
        padding: 10px 20px;
    }
    .nav-links a {
        font-size: 13px;
        padding: 8px 16px;
    }
    .page-title-container h1 {
        font-size: 24px; /* page title smaller */
    }
    .search-panel input,
    .search-panel select,
    .search-panel button {
        font-size: 13px;
        padding: 6px 8px;
    }
}

@media (max-width: 900px) {
    .ad-container { 
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    
    header img {
        height: 50px;
    }
    .nav-links a {
        padding: 8px 16px;
        font-size: 14px;
    }
    .cover {
        filter: blur(5px);
    }
    form {
        padding: 30px;
        max-width: 90%;
        margin-top: 80px;
    }
    .page-title-container {
        margin-left: 0;
        padding: 15px 10px;
    }
    .page-title-container h1 {
        font-size: 22px;
    }
    .search-panel {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        margin-bottom: 8px; /* reduced space */
        padding: 10px 10px;
    }
    .search-panel h3 {
        margin-bottom: 4px; /* smaller gap below title */
        font-size: 16px;
    }
    .search-panel input,
    .search-panel select,
    .search-panel button {
        font-size: 12px;
        padding: 5px 6px;
        margin-bottom: 5px; /* compact spacing between controls */
    }
}

@media (max-width: 600px) {
    .ad-container { 
        grid-template-columns: 1fr;
    }
    .search-panel { 
        position: relative; 
        width: 100%; 
        height: auto; 
        border-right: none; 
        margin-bottom: 12px;
        padding: 10px 10px;
    }
    .ads-wrapper { 
        margin-left: 0; 
    }
}

@media (max-width: 480px) {
        .search-panel h2 {
        margin-bottom: -80px; /* very compact */
        font-size: 18px;
    }
    header {
        flex-direction: column;
        gap: 10px;
        padding: 8px 16px;
        text-align: center;
    }
    header img {
        height: 40px;
    }
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .nav-links a {
        width: 90%;
        font-size: 11px;
        padding: 6px 12px;
        text-align: center;
        display: inline-block; 
        border-radius: 25px;
        background-color: #C71585;
        color: white;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    .nav-links a:hover {
        background-color: #e052a0;
        transform: translateY(-2px);
    }
    .cover {
        filter: blur(3px);
    }
    form {
        padding: 20px;
        width: 80%;
        max-width: 300px; 
        margin-top: 80px; 
    }
    .footer {
        font-size: 0.8em;
    }
    .page-title-container h1 {
        font-size: 20px; /* small mobile */
    }
    .search-panel h3 {
        font-size: 15px;
        margin-bottom: 3px; /* smallest gap for compact view */
    }
    .search-panel input,
    .search-panel select,
    .search-panel button {
        font-size: 11px;
        padding: 4px 6px;
        margin-bottom: 5px; /* compact spacing between controls */
    }
    .more-btn, #showMoreBtn {
        font-size: 14px;
        padding: 8px 10px; /* smaller buttons on mobile */
    }
}

