.ad-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ad-header {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ad-title {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 5px;
}

.tutor-name {
    color: #3498db;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.ad-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ad-photo {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 20px;
}

.ad-description {
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 25px;
    white-space: pre-line;
}

.fee-badge {
    background-color: #27ae60;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

.contact-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.contact-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-badge {
    background-color: #e67e22;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 10px;
    display: inline-block;
}

.location-info {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .ad-container {
        padding: 15px;
    }
    
    .ad-title {
        font-size: 24px;
    }
}

/*----- IMAGE SIZE AND RESPONSIVENESS ---------------------------------------------------
/* Thumbnail Image (Preview) - Keep original styles */
.ad-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover; /* Crop thumbnail, but show full image in modal */
    border-radius: 6px;
    cursor: pointer;
}

.ad-image:hover {
    transform: scale(1.02); /* Slight zoom on hover */
}

/* Modal Styles (Full-Size Image) */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay */
    overflow: auto;
}

/* Modal Content (Full-Size Image) */
.modal-content {
    display: block;
    width: auto;       /* Allow natural width */
    height: auto;      /* Allow natural height */
    max-width: 90%;    /* Limit width */
    max-height: 90%;   /* Limit height */
    margin: auto;      /* Center horizontally and vertically */
    object-fit: contain; /* Ensures full image fits without cropping/stretching */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Perfect centering */
}

@keyframes zoom {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001;
    font-size: 30px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }
}


/*--------image watermarking --------------------------------------------------------------------*/

.image-with-css-watermark {
    position: relative;
}

.css-watermark {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    opacity: 0.7;
    pointer-events: none;
}

/*--------------------------------------------------------------------------------------*/
/* STOP VIEWING PENDING AND INACTIVE ADS */

.error-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.return-home {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}


/* REPORT AD BUTTON --------------------------------------------------------------------------------------*/ 

/* Report Button (inline in header) */
.report-button {
    background: none;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin: 5px 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.report-button:hover {
    background-color: #ffebee;
    color: #ff5252;
    border-color: #ff5252;
}

.report-button i {
    font-size: 11px;
}


/* Report Popup */
.report-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.report-popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.report-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.report-popup-header h3 {
    margin: 0;
    color: #333;
}

.report-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-report {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-report:hover {
    background-color: #ff5252;
}

/*---HIDE PHONE NUMBERS BUTTON---------------------------------------------------------------------------------------*/

.reveal-contact-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.reveal-contact-btn:hover {
    background-color: #2980b9;
}

.contact-number {
    font-weight: bold;
    margin-left: 5px;
}


/* --------------------------------------------------------------------------------------*/
