/* ===== Base Styles ===== */
root {
    --vip-color:  #ecc94b;;
    --top-color: #43a047;
    --premium-color: #9f7aea;
    --urgent-color: #fb8c00;
    --featured-color: rgb(23, 182, 47);
    --promoted-color: rgba(255, 0, 0, 0.61);
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    margin: 0;
    padding: 0;
    background-color: #9f9696;
}

.ad-details-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ===== Title Section ===== */
.ad-title {
    color: #1a365d;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.ad-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: #4299e1;
}

/* ===== Image Gallery Styles (Maintained from previous) ===== */
.image-gallery {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.main-image-container {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent;
    position: relative;
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #718096;
    font-size: 1.2rem;
}

.thumbnail-container {
    display: flex;
    gap: 12px;
    padding: 1rem;
    overflow-x: auto;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: #4299e1 #edf2f7;
}

.thumbnail {
    width: 100px;
    height: 75px;
    cursor: pointer;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
    border-color: #4299e1;
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ====Badge type ====*/

/* Ad Badges Styling */
.ad-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px; /* Pill shape */
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 5px; /* Space between icon and text */
}

.promoted-badge {
    background-color: rgba(255, 0, 0, 0.7); /* Red for promoted */
}

.featured-badge {
    background-color: rgb(23, 182, 47); /* Green for featured */
}

.type-badge-vip {
    background-color: #ecc94b; /* Yellow for VIP */
}

.type-badge-premium {
    background-color: #9f7aea; /* Purple for Premium */
}

.type-badge-standard {
    background-color: #3182ce; /* Blue for Standard */
}

/* ===== Details Section ===== */
.details-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background-color: #ebf8ff;
}

.detail-item i {
    color:#6e2f58;
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ebf8ff;
    border-radius: 50%;
}

.detail-item span {
    font-weight: 500;
    color: #4a5568;
}
/* ===== Price Section ===== */
.service-prices-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-prices-section h3 {
    margin-top: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.price-item:hover {
    background: #f0fff0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.service-name {
    font-weight: 500;
    color: #555;
}

.service-price {
    font-weight: bold;
    color: #e91e63;
}

/* Add a small WhatsApp indicator */
.price-item::after {
    content: "→";
    margin-left: 8px;
    color: #25D366;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.price-item:hover::after {
    opacity: 1;
}

/* ===== Description Section ===== */
.description-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.description-section h2 {
    color: #2b6cb0;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.description-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: #4299e1;
}

.description-section p {
    color: #4a5568;
    line-height: 1.8;
    white-space: pre-line;
}

/* ===== Type Badge ===== */
.type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color:rgb(56, 89, 120); /* Default color (for standard) */
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

/* Standard badge (blue) */
.type-badge.Standard {
    background-color:rgb(57, 136, 215); /* Blue */
}

/* Premium badge (purple) */
.type-badge.Premium {
    background-color: #9f7aea; /* Purple */
}

/* VIP badge (gold/orange) */
.type-badge.VIP {
    background-color: #ecc94b; /* Yellow */
    color: #000; /* Dark text for better contrast */
}

/* If you have featured as well */
.type-badge.featured {
    background-color: #f56565; /* Red */
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .ad-title {
        font-size: 1.8rem;
    }
    
    .main-image-container {
        height: 350px;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .details-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-image-container {
        height: 250px;
    }
    
    .ad-title {
        font-size: 1.5rem;
    }
    
    .detail-item {
        padding: 0.5rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-animation {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ===== Custom Scrollbar ===== */
.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 3px;
}

/* Posted By Section - Matching Related Ads Style */
.posted-by-section {
    margin: 40px 0;
}

.posted-by-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.posted-by-ads-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.posted-by-ad-card {
    display: block;
    border: 1px solid #948e8e;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: #9f9696;
}

.posted-by-ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.posted-by-ad-card .photo-preview {
    position: relative;
    height: 180px;
    background: #9f9696;
}

.posted-by-ad-card .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posted-by-ad-card .ad-content {
    padding: 15px;
}

.posted-by-ad-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #333;
}

.posted-by-ad-card .meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.posted-by-ad-card .meta i {
    margin-right: 5px;
}

.posted-by-ad-card .description {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* Tag styling (same as related ads) */
.posted-by-ad-card .tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    z-index: 1;
}

/* Specific tag types */
.posted-by-ad-card .tag.VIP {
    background-color:var(--vip-color);
}

.posted-by-ad-card .tag.Premium {
    background-color: var(--premium-color);
}

.posted-by-ad-card .tag.Standard {
    background-color:rgb(45, 139, 183);
}

/* "Voir plus" button styling */
.voir-plus-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4a5568;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.voir-plus-btn:hover {
    background-color: #2d3748;
}

/* No image placeholder */
.posted-by-ad-card .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #e2e8f0;
    font-size: 0.9rem;
}

/* Related Ads Section - Updated for clickable cards */
.related-ads-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-ad-card {
    display: block; /* Changed from div to a */
    border: 1px solid #948e8e;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: #9f9696;
}

.related-ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.related-ad-card .photo-preview {
    position: relative;
    height: 180px;
    background: #9f9696;
}

.related-ad-card .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-ad-card .ad-content {
    padding: 15px;
}

.related-ad-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #333;
}

.related-ad-card .meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.related-ad-card .description {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* Make sure clickable elements inside the card don't interfere */
.related-ad-card .tag {
    position: relative; /* Ensure tag stays above the clickable area */
    z-index: 1;
}
/* Contact Section */
.contact-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.contact-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-option i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.contact-option span {
    font-size: 0.8rem;
}

/* Base styles */
.report-button {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: background-color 0.2s;
}

.report-button:hover {
    background-color: #fee2e2;
}

.report-button i {
    margin-right: 0.5rem;
}

/* Modal styles */
#reportModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

#reportModal .modal-container {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 28rem;
    width: 100%;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
}

.modal-header button {
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-header button:hover {
    color: #374151;
}

/* Form styles */
#reportForm label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

#reportForm select,
#reportForm textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

#reportForm textarea {
    min-height: 6rem;
}

/* Button styles */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.form-actions button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
}

.cancel-button {
    border: 1px solid #d1d5db;
    background-color: white;
}

.cancel-button:hover {
    background-color: #f9fafb;
}

.submit-button {
    background-color: #dc2626;
    color: white;
    border: none;
}

.submit-button:hover {
    background-color: #b91c1c;
}

/* Success popup styles */
#successPopup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.success-popup-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    text-align: center;
}

/* Specific styles for each option */
.contact-option:nth-child(1) { color: #0066cc; } /* Phone */
.contact-option:nth-child(2) { color: #25D366; } /* WhatsApp */
.contact-option:nth-child(3) { color: #D44638; } /* Email */
.contact-option:nth-child(4) { color: #210808; } /*sms*/

.contact-option:hover:nth-child(1) { background-color: rgba(0, 102, 204, 0.1); }
.contact-option:hover:nth-child(2) { background-color: rgba(37, 211, 102, 0.1); }
.contact-option:hover:nth-child(3) { background-color: rgba(212, 70, 56, 0.1); }