/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Container for all pages */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Forms */
form {
    background: #fff;
    width: 100%; 
    max-width: 500px; 
    margin: 30px auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0; /* Added slight margin for breathing room */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; 
}

button {
    
    padding: 14px;
    background-color: #00b894;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #009374;
}

/* Dashboard Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}



/* Listings Grid ----------------------------------------------------------------------*/
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    
}

/* Modal Popup */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
    align-items: center;
    justify-content: normal;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0.8); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
}

/* --- Media Query for Listings --- */
@media screen and (max-width: 600px) {
    .listings-grid {
        grid-template-columns: 1fr !important;
        padding: 10px;
    }
    
    /* Keep any general form styles here too */
    form {
        padding: 20px;
        margin: 20px auto;
    }
}

/*  **********************************************************/




.islamic-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 10px auto 15px;
    padding: 0 20px;
}

.islamic-separator .line {
    flex-grow: 1;
    height: 1px;
    background-color: #000; /* Solid black line */
}

.islamic-separator .icon {
    padding: 0 20px;
    font-size: 34px;
    color: #000; /* Solid black icon */
    display: flex;
    align-items: center;
}

/* Adjust for smaller screens */
@media screen and (max-width: 600px) {
    .islamic-separator {
        max-width: 60%;
        margin: 5px auto 5px;
    }
    .islamic-separator .icon {
        font-size: 38px;
        padding: 0 10px;
    }
}


/* Star Rating System */
.star-rating {
    display: flex;
    flex-direction: row-reverse; /* Reverses order so 5 is technically first in DOM */
    justify-content: flex-end;
}

.star-rating input {
    display: none; /* Hide the actual radio buttons */
}

.star-rating label {
    font-size: 24px;
    color: #ddd; /* Default star color (grey) */
    cursor: pointer;
    transition: color 0.2s ease-in-out;
    margin-right: 5px;
}

/* Hover effect: Highlight stars to the left */
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f1c40f; /* Yellow star color */
}

/* Specific hover tweak to keep stars yellow when hovering over higher ones */
.star-rating input:checked + label:hover,
.star-rating input:checked ~ label:hover,
.star-rating input:checked ~ label:hover ~ label,
.star-rating label:hover ~ input:checked ~ label {
    color: #f39c12; /* Slightly darker orange on hover */
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade-in for new items (Easy Load) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.listing-card-new {
    animation: fadeInUp 0.5s ease forwards;
}

@media (max-width: 480px) {
    .filter-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    .sort-container {
        width: 90%;
        justify-content: space-between;
    }
}






