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

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #d4af37;
    --text-color: #2d3748;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.logo-en {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo-zh {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary-color);
    letter-spacing: 1px;
    margin-top: 2px;
    opacity: 0.85;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Language Toggle in Navigation */
.language-toggle-nav {
    margin-left: 0.5rem;
}

.language-toggle-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c99d2e 100%);
    color: white;
    border: none;
    padding: 0.65rem 1.3rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.language-toggle-nav button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #ddb843 0%, #d4af37 100%);
}

.language-toggle-nav button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(44, 82, 130, 0.85) 100%),
                url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1600&q=80') center/cover;
    color: var(--white);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.cta-button.cta-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.cta-button.cta-secondary:hover {
    background-color: var(--light-bg);
}

.cta-button.cta-tertiary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}

.cta-button.cta-tertiary:hover {
    background-color: var(--primary-color);
}

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

.properties h2 {
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 700;
}

.property-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 400px 1fr;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.property-card.featured {
    border: 2px solid var(--accent-color);
}

.property-image {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--light-bg);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-image-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.property-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.property-image-slide.active {
    opacity: 1;
}

.property-placeholder {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 2rem;
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.property-content {
    padding: 2rem;
}

.property-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.property-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
}

.property-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.property-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.property-features li:last-child {
    border-bottom: none;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.detail-item {
    font-size: 0.95rem;
}

.detail-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.detail-item.special {
    grid-column: 1 / -1;
    color: var(--accent-color);
    font-weight: 600;
}

.property-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.property-link:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

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

.contact h2 {
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact > .container > p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.submit-button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .property-card {
        grid-template-columns: 1fr;
    }

    .property-image {
        min-height: 250px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .language-toggle-nav button {
        padding: 0.55rem 1.1rem;
        font-size: 0.9rem;
    }

    .logo-en {
        font-size: 1.5rem;
    }

    .logo-zh {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .properties h2,
    .contact h2 {
        font-size: 2rem;
    }

    .property-content h3 {
        font-size: 1.4rem;
    }

    .property-details {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-color);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: var(--accent-color);
}

.modal-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.modal-content h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.modal-content h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.details-table tr {
    border-bottom: 1px solid var(--border-color);
}

.details-table tr:last-child {
    border-bottom: none;
}

.details-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: top;
}

.details-table td:first-child {
    width: 30%;
    color: var(--primary-color);
}

.contact-info {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.property-title-clickable {
    cursor: pointer;
    transition: color 0.3s ease;
}

.property-title-clickable:hover {
    color: var(--accent-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.modal-btn {
    flex: 1;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.modal-btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.modal-btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.modal-btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.highlights-list {
    list-style: none;
    padding-left: 0;
}

.highlights-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.highlights-list li:last-child {
    border-bottom: none;
}

.highlights-list li:before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
}


/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chatbot-window.chatbot-hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

#chatbot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

#chatbot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#chatbot-close:hover {
    opacity: 0.8;
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light-bg);
}

.chatbot-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chatbot-message.user {
    align-items: flex-end;
}

.chatbot-message.bot {
    align-items: flex-start;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
}

.chatbot-message.user .chatbot-message-content {
    background: var(--secondary-color);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot .chatbot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    line-height: 1.6;
    white-space: pre-wrap;
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

#chatbot-input-container {
    display: flex;
    padding: 1rem;
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

#chatbot-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

#chatbot-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#chatbot-send {
    margin-left: 0.5rem;
    padding: 0.75rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

#chatbot-send:hover {
    background: var(--primary-color);
}

#chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tablet and landscape responsive design */
@media (max-width: 1024px) and (min-width: 641px) {
    #chatbot-window {
        width: 400px;
        height: 60vh;
        max-height: 600px;
        min-height: 400px;
    }

    #chatbot-messages {
        flex: 1;
        overflow-y: auto;
        min-height: 200px;
    }
}

/* Wide landscape screens (16:9 and wider) */
@media (max-height: 600px) {
    #chatbot-window {
        height: 85vh;
        max-height: none;
        bottom: 70px;
    }

    #chatbot-messages {
        flex: 1;
        overflow-y: auto;
        min-height: 150px;
    }

    #chatbot-header {
        padding: 0.75rem 1rem;
    }

    #chatbot-input-container {
        padding: 0.75rem;
    }
}

@media (max-width: 640px) {
    #chatbot-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    #chatbot-toggle {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }

    #chatbot-window {
        width: 100%;
        height: 70vh;
        max-height: 500px;
        bottom: 70px;
        left: 0;
        right: auto;
    }

    #chatbot-header {
        padding: 0.875rem 1rem;
    }

    #chatbot-header h3 {
        font-size: 0.95rem;
    }

    #chatbot-messages {
        padding: 0.75rem;
    }

    .chatbot-message-content {
        max-width: 85%;
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    #chatbot-input-container {
        padding: 0.75rem;
    }

    #chatbot-input {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    #chatbot-send {
        padding: 0.625rem;
        margin-left: 0.375rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .details-table td:first-child {
        width: 40%;
    }
}