/* ===== CSS Variables ===== */
:root {
    --primary-color: #00bcd4;
    --primary-dark: #0097a7;
    --secondary-color: #f8f9fa;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans Thai', Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 76px; /* For fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans Thai', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navbar Styles ===== */
.navbar {
    background-color: #ffffff !important;
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    z-index: 1000;
    min-height: 76px;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    font-weight: 700;
    flex-shrink: 0;
}

.navbar-brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.navbar-nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-item {
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    transition: var(--transition);
    font-size: 0.95rem;
    white-space: nowrap;
}

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

.navbar-collapse {
    flex-grow: 1;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-medium);
    border-radius: 8px;
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
}

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

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/house-illustration.png') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Search Form ===== */
.search-wrapper {
    position: relative;
    z-index: 3;
    margin-top: 3rem;
}

.search-form {
    background: white;
    padding: 0.75rem;
    border-radius: 50px;
    box-shadow: var(--shadow-heavy);
    max-width: 700px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-wrapper {
    flex: 1;
}

.search-form .input-group {
    border-radius: 50px;
    overflow: hidden;
}

.search-form .input-group-text {
    background: transparent;
    border: none;
    color: var(--primary-color);
    padding-left: 1.5rem;
}

.search-form .form-control {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.search-form .form-control:focus {
    box-shadow: none;
    outline: none;
}

.search-form .form-control::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    min-width: 140px;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

/* ===== Features Section ===== */
.features-section {
    padding: 4rem 0;
    background-color: #ffffff;
    position: relative;
    z-index: 10;
    margin-top: -2rem;
}

.features-row {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
}

.feature-link {
    color: inherit;
    display: block;
}

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: white;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 188, 212, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* ===== Property Section ===== */
.property-section {
    padding: 5rem 0;
    background-color: var(--secondary-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.view-all-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all-link:hover {
    color: var(--primary-dark);
}

.property-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
}

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

.property-image {
    position: relative;
}

.property-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.property-img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #00838f;
}

.property-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ffc107;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.property-info {
    padding: 1.5rem;
}

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

.property-title {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.detail-item i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.property-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== Locations Section ===== */
.locations-section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.location-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

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

.location-img {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.location-info {
    padding: 1.5rem;
    text-align: center;
}

.location-info h5 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.location-info p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.8);
    margin: 1rem 0 2rem;
    max-width: 400px;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

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

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 1rem;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .property-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .property-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .property-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .features-section {
        padding: 3rem 0;
    }
    
    .property-section,
    .locations-section {
        padding: 3rem 0;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .features-row {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem 0.5rem;
    }
}
