/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
}

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

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-brand h1 {
    color: #8B4513;
    font-size: 1.8rem;
    margin: 0;
    z-index: 1001;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #8B4513;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #8B4513;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #8B4513;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #f5f1e8 0%, #e8dcc0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23d4af8c" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    color: #8B4513;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* Properties Section */
.properties {
    padding: 5rem 0;
    background-color: #fafafa;
}

.section-title {
    color: #8B4513;
    margin-bottom: 3rem;
}

.property {
    margin-bottom: 4rem;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.property-header {
    text-align: center;
    margin-bottom: 2rem;
}

.property-title {
    color: #8B4513;
    margin-bottom: 1rem;
}

.property-description {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Gallery Styles */
.gallery {
    margin-top: 2rem;
}

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

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item:active {
    transform: scale(0.98);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 69, 19, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    pointer-events: none;
}

.gallery-item:hover::after,
.gallery-item:active::after {
    opacity: 1;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #8B4513;
    font-size: 1.2rem;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    touch-action: manipulation;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    touch-action: manipulation;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.close:hover,
.close:focus {
    color: #8B4513;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(139, 69, 19, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: auto;
    touch-action: manipulation;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(139, 69, 19, 1);
    transform: scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: scale(0.95);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f1e8 0%, #e8dcc0 100%);
    text-align: center;
}

.contact-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Footer */
.footer {
    background-color: #8B4513;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Mobile-First Responsive Design */

/* Large Mobile and Small Tablets (768px and below) */
@media (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.5rem;
        font-weight: 600;
        color: #8B4513;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Hero Section */
    .hero {
        padding-top: 80px;
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }
    
    .cta-button {
        padding: 1.2rem 3rem;
        font-size: 1.1rem;
    }
    
    /* Properties */
    .properties {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .property {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
        border-radius: 20px;
    }
    
    .property-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .property-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.2rem;
        margin-top: 1.5rem;
    }
    
    .gallery-item img {
        height: 220px;
    }
    
    /* Contact */
    .contact {
        padding: 3rem 0;
    }
    
    .contact-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        padding: 0 1rem;
    }
    
    .contact-item {
        width: 100%;
        max-width: 350px;
        padding: 1.5rem 2rem;
        text-align: center;
    }
    
    /* Lightbox */
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
        margin: 10% auto;
    }
    
    .close {
        top: 15px;
        right: 20px;
        font-size: 35px;
        padding: 8px;
    }
    
    .lightbox-nav {
        padding: 0 15px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 12px 16px;
        font-size: 20px;
        min-width: 45px;
        min-height: 45px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    /* Navigation */
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.3rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.8rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1.5rem;
    }
    
    .cta-button {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
    
    /* Properties */
    .property {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .property-title {
        font-size: 1.4rem;
    }
    
    .property-description {
        font-size: 0.95rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    /* Contact */
    .contact-item {
        padding: 1.2rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Lightbox */
    .lightbox-content {
        max-width: 98%;
        max-height: 80%;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        padding: 5px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 10px 14px;
        font-size: 18px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .property {
        padding: 1.2rem 0.8rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .contact-item {
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
    
    .gallery-item:hover::after {
        opacity: 0;
    }
    
    .gallery-item:active {
        transform: scale(0.95);
    }
    
    .gallery-item:active::after {
        opacity: 1;
    }
    
    .lightbox-prev:hover,
    .lightbox-next:hover {
        transform: none;
    }
    
    .close:hover {
        background: none;
    }
}
