/* General Body & Layout */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    color: #333;
}

/* Page Title for Location Listing */
.page-title {
    text-align: center;
    color: #003261;
    margin-bottom: 40px;
    font-size: 2.5em;
    position: relative;
    padding-bottom: 15px;
}
.page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #ff4800;
    border-radius: 2px;
}

/* Projects Grid (for location.php) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Project Card Styles */
.project-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.project-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    color: #003261;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-detail {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.card-detail i {
    margin-right: 8px;
    color: #ff4800;
}

.card-price {
    font-size: 1.3em;
    color: #ff4800;
    font-weight: bold;
    text-align: right;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.no-projects-message {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #777;
    grid-column: 1 / -1; /* Center message in the grid */
}

/* Project Detail Page (clickloction.php) Styles */
.project-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.image-gallery {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
}

.sub-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.sub-image-item {
    width: 80px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.sub-image-item:hover, .sub-image-item.active {
    border-color: #ff4800;
    transform: scale(1.1);
}

.sub-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-details {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}
.project-details h2 {
    color: #003261;
    font-size: 2em;
    margin-top: 0;
}
.price-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #ff4800;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.detail-item {
    font-size: 1.1em;
    margin-bottom: 10px;
}
.detail-item strong {
    color: #555;
    display: inline-block;
    width: 150px;
}
.contact-link {
    display: inline-block;
    background-color: #ff4800;
    color: white;
    padding: 15px 30px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.contact-link:hover {
    background-color: #e63900;
    transform: scale(1.05);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .project-container {
        flex-direction: column;
        gap: 20px;
    }
    .image-gallery, .project-details {
        flex-basis: 100%;
    }
    .project-details h2 {
        font-size: 1.8em;
    }
    .sub-images {
        flex-wrap: wrap;
    }
    .sub-image-item {
        width: 60px;
        height: 45px;
    }
}