:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/dusitd2residences/7f62dd5c-eb31-44dd-a41d-f5ea78fda39f.jpeg.avif');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 2rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Apartments Section */
.apartments {
    padding: 5rem 0;
    background-color: var(--light-bg);
}

.apartment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.apartment-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.apartment-card:hover {
    transform: translateY(-5px);
}

.apartment-card > img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.apartment-card > img:hover {
    cursor: zoom-in;
}

/* Image counter for galleries */
.image-gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f5f5f5;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) #f5f5f5;
}

.image-gallery::before {
    content: "Click thumbnails to view, click main image for fullscreen";
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.image-gallery::-webkit-scrollbar {
    width: 6px;
}

.image-gallery::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.image-gallery::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.image-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    border: 2px solid transparent;
    opacity: 0.8;
    position: relative;
}

.image-gallery img:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.image-gallery img.active {
    border-color: var(--accent-color);
    opacity: 1;
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.3);
}

.image-gallery img.active:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.5);
}

/* Add subtle glow effect to active thumbnail */
.image-gallery img.active::before {
    content: "📷";
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 10;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.lightbox-close:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.apartment-card h3 {
    padding: 1rem;
    color: var(--primary-color);
}

.apartment-card p, .apartment-card ul {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.apartment-card ul {
    list-style-position: inside;
}

.book-button {
    display: block;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.8rem;
    text-align: center;
    margin: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.book-button:hover {
    background-color: #c0392b;
}

/* Amenities Section */
.amenities {
    padding: 5rem 0;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.amenity {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--light-bg);
}

.form-group {
    margin-bottom: 1rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    height: 150px;
    resize: vertical;
}

.submit-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

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

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .apartment-grid {
        grid-template-columns: 1fr;
    }
}
