:root {
    --primary-color: #B8860B; /* สีทอง */
    --secondary-color: #1c1c1c; /* สีดำเข้ม */
    --accent-color: #D4AF37; /* สีทองสว่าง */
    --text-color: #333333;
    --light-bg: #F8F8F8;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
}

/* Navbar Custom Styles */
.navbar {
    background: linear-gradient(135deg, #05192d 0%, #0A2647 100%); /* น้ำเงินเกือบดำไปน้ำเงินเข้ม */
    backdrop-filter: blur(10px);
    padding: 20px 0;
}

.navbar-brand.logo {
    color: var(--white);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-link {
    color: var(--white) !important;
    font-weight: 400;
    padding: 10px 20px !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section with Video Background */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* ปรับความเข้มของ overlay ตามต้องการ */
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding-top: 20vh;
}

/* Animation for text fade-in */
.carousel-item.active .hero-content h1 {
    animation: fadeInUp 1s ease forwards;
}

.carousel-item.active .hero-content p {
    animation: fadeInUp 1s ease 0.3s forwards;
}

.carousel-item.active .hero-content .cta-button {
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 30px;
}

.cta-button {
    background-color: var(--primary-color);
    padding: 15px 40px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* House Models Section */
.house-models {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 50px;
    text-align: center;
}

.model-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 40px;
}

.model-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.model-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.model-card img {
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.model-card:hover img {
    transform: scale(1.05);
}

.model-info {
    padding: 20px;
}

.model-info h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.price-tag {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 10px 0;
}

/* Feng Shui Section */
.fengshui {
    padding: 100px 0;
    background: linear-gradient(135deg, #05192d 0%, #0A2647 100%); /* น้ำเงินเกือบดำไปน้ำเงินเข้ม */
    color: var(--white);
}

.fengshui-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.feature {
    background: rgba(255,255,255,0.08);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    width: 250px;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.feature:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

.feature img {
    width: 80px;
    height: 80px;
}

/* Appointment Form */
.appointment {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
}

.form-control, .form-select {
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 5px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.25);
}

.submit-button {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

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

/* เพิ่ม Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .model-container {
        padding: 0 20px;
    }
    
    .fengshui-features {
        padding: 0 20px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    nav {
        flex-direction: column;
        padding: 10px 20px;
    }

    nav ul {
        flex-direction: column;
        margin-top: 15px;
    }

    nav ul li {
        margin: 10px 0;
    }

    /* Hero Section */
    .hero {
        height: 100vh;
    }
    
    .hero-content {
        padding: 15vh 20px 0;
    }

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

    .hero-content p {
        font-size: 1.1rem;
    }

    /* House Models */
    .model-container {
        flex-direction: column;
        align-items: center;
    }

    .model-card {
        width: 90%;
        margin: 10px 0;
    }

    /* Feng Shui Section */
    .fengshui-features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 30px;
    }
    
    .col-md-4 {
        display: flex;
        justify-content: center;
    }

    /* Appointment Form */
    .appointment {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* Mobile Optimization */
    .hero-video {
        /* สำหรับมือถือให้ใช้รูปแทนถ้าต้องการประหยัด bandwidth */
        /* display: none; */
    }
    
    .video-background {
        /* ใส่รูปแทนวิดีโอสำหรับมือถือ */
        /* background: url('../images/hero-mobile-bg.jpg') center center/cover no-repeat; */
    }
}

@media (max-width: 480px) {
    /* Further adjustments for mobile */
    .hero-content h1 {
        font-size: 1.5rem;
    }

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

    .cta-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .model-card {
        width: 100%;
    }

    .navbar-brand.logo {
        color: var(--white);
        font-weight: 700;
        font-size: 1.5rem;
    }

    /* Form elements */
    input, select {
        font-size: 16px; /* ป้องกัน iOS zoom เวลากด input */
    }
}

/* Add hamburger menu for mobile */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1000;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #05192d 0%, #0A2647 100%);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .navbar-collapse.show {
        max-height: 500px;
    }

    .navbar-nav {
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        padding: 15px 20px !important;
        width: 100%;
        display: block;
    }

    .nav-link:hover {
        background: rgba(255,255,255,0.1);
    }
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* เพิ่ม Bootstrap Icons */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css");

/* Location Styles */
.location-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
}

.location-details i {
    margin-right: 10px;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Contact Styles */
.contact-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.3s ease;
}

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

.contact-icon i {
    color: var(--primary-color);
}

.social-links a {
    color: var(--secondary-color);
    font-size: 24px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .location-info {
        margin-bottom: 30px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .contact-card {
        margin-bottom: 20px;
    }
}

/* ถ้าผู้ใช้เลือก prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
    
    .video-background {
        background: url('../images/hero-static-bg.jpg') center center/cover no-repeat;
    }
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: var(--primary-color);
    color: white;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* Carousel in Modal */
.carousel {
    border-radius: 10px;
    overflow: hidden;
}

.carousel-item img {
    height: 500px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    padding: 10px;
}

/* House Details Styles */
.house-details {
    padding: 20px;
}

.specs-list {
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.spec-item i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--primary-color);
}

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

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:before {
    content: "✓";
    color: var(--primary-color);
    margin-right: 10px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .carousel-item img {
        height: 300px;
    }
    
    .house-details {
        margin-top: 20px;
    }
}

.material-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* สำหรับหน้าจอขนาดเล็ก */
@media (max-width: 768px) {
    .material-card img {
        height: 200px;
    }
} 

.house-model-image {
    width: 800px;
    height: 600px;
    object-fit: cover;
}

/* สำหรับหน้าจอมือถือ */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}
