/* Styles for hotproadd.php (Admin Page) */
.admin-container {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
}
.admin-container h1 {
    color: #003261;
    margin-bottom: 25px;
    font-size: 2.2em;
}
.admin-container h2 {
    color: #003261;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.8em;
}
.message {
    margin-bottom: 20px;
    font-weight: bold;
}
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}
.add-btn {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 10px;
}
.add-btn:hover {
    background-color: #218838;
}
hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 30px 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
table, th, td {
    border: 1px solid #ddd;
}
th, td {
    padding: 10px;
    text-align: left;
    word-wrap: break-word;
}
th {
    background-color: #003261;
    color: white;
    font-weight: bold;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}
.delete-btn {
    background-color: #dc3545;
    color: white;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.85em;
}
.delete-btn:hover {
    background-color: #c82333;
}
/* Responsive Table for Admin Page */
@media (max-width: 768px) {
    .admin-container {
        padding: 15px;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: 5px;
    }
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    td:nth-of-type(1):before { content: "ID:"; }
    td:nth-of-type(2):before { content: "Title:"; }
    td:nth-of-type(3):before { content: "Location:"; }
    td:nth-of-type(4):before { content: "Price:"; }
    td:nth-of-type(5):before { content: "Property Type:"; }
    td:nth-of-type(6):before { content: "Action:"; }
    .delete-form {
        text-align: right;
        margin-top: 5px;
    }
}

/* Styles for hotpro.php (Frontend Display Page) */
.project-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    gap: 20px;
}
.image-gallery {
    flex: 2; /* Takes more space */
    min-width: 300px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 1s ease-in-out forwards;
}
.main-image-container {
    width: 100%;
    padding-top: 66.66%; /* 3:2 Aspect Ratio */
    position: relative;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area */
    border-radius: 8px;
    transition: opacity 0.5s ease-in-out;
}
.sub-images {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap; /* Allow sub-images to wrap */
}
.sub-image-item {
    width: 80px; /* Fixed width for sub-thumbnails */
    height: 80px; /* Fixed height for sub-thumbnails */
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.sub-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sub-image-item.active, .sub-image-item:hover {
    border-color: #ff4800;
}

.project-details {
    flex: 1; /* Takes remaining space */
    min-width: 280px; /* Minimum width before wrapping */
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
    animation: fadeIn 1s ease-in-out forwards;
}
.project-details h2 {
    color: #003261;
    margin-top: 0;
    font-size: 1.8em;
    border-bottom: 2px solid #ff4800;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.project-details h3 {
    color: #ff4800;
    font-size: 1.2em;
    margin-top: 15px;
    margin-bottom: 10px;
}
.detail-item {
    margin-bottom: 10px;
    font-size: 1.05em;
}
.detail-item strong {
    color: #003261;
    display: inline-block;
    min-width: 120px; /* Align labels */
}
.price-display {
    font-size: 1.5em;
    color: #ff4800;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}
.contact-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    padding: 12px 20px;
    background-color: #003261;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.contact-link:hover {
    background-color: #ff4800;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for hotpro.php */
@media (max-width: 768px) {
    .project-container {
        flex-direction: column;
        padding: 15px;
    }
    .image-gallery, .project-details {
        min-width: unset;
        width: 100%;
    }
    .sub-image-item {
        width: 60px;
        height: 60px;
    }
}