/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Vietnamese:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@800;900&display=swap');

/* Ẩn nút đóng tìm kiếm mặc định */
.close-search-btn {
    display: none;
}

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

:root {
    /* Colors */
    --primary-color: #2c5aa0;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background:
        linear-gradient(135deg, rgba(248, 250, 252, 0.7) 0%, rgba(241, 245, 249, 0.8) 100%),
        url('../img/BG1.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    scroll-behavior: smooth;
}

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

/* Header */
.header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999 !important;
    transition: all 0.4s ease-in-out !important;
    overflow: visible !important;
    padding: 1rem 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
}

.navbar {
    padding: 0;
    transition: all 0.4s ease-in-out;
    overflow: visible;
    background: transparent;
}

.header.scrolled .navbar {
    padding: 0.5rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: visible;
    max-width: 1200px;
    margin: 0 auto;
}

.header.scrolled .navbar .container {
    justify-content: space-between;
    gap: var(--space-lg);
    align-items: center;
    min-height: auto;
}

/* Floating Logo - Independent from navbar */

.header.scrolled .floating-logo {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.5);
    transition: all 0.4s ease-in-out;
}



.header.scrolled .navbar .container {
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.header.scrolled .nav-menu {
    gap: var(--space-lg);
    margin-left: 0;
    justify-content: center;
}

.header.scrolled .nav-auth {
    position: absolute;
    right: 2rem;
    margin-right: 0;
}

/* Nav-brand removed - logo is now floating independently */

.brand-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all var(--transition-normal);
    overflow: visible;
    position: relative;
    z-index: 200;
}

.header.scrolled .brand-logo-container {
    opacity: 0;
    transform: translateX(-100%);
    width: 0;
    margin: 0;
}

.nav-brand:hover {
    transform: translateY(-2px);
}

/* Floating Logo */
.floating-logo {
    position: absolute;
    top: 85px; /* Tăng từ 60px lên 80px */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1001;
    background: transparent !important;
    padding: 0;
    margin: 0;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: center;
    width: auto;
    max-width: 200px;
    margin-top: 5px; /* Điều chỉnh khoảng cách từ trên xuống */
}

.brand-logo-container {
    background: transparent !important;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-align: center;
    margin-top: 10px;
}

.brand-logo-container img {
    width: 120px;
    height: auto;
    display: block;
    opacity: 1 !important;
    transform: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    margin: 0 auto;
}

/* Style cho chữ Thảo Điền Gate */
.logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: #a88f00;
    text-align: center;
    margin-top: 0px;
    position: relative;
    z-index: 1002;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    white-space: nowrap;
    animation: wave 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes wave {
    0% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-3px) rotate(1deg);
    }
    100% {
        transform: translateY(0) rotate(-1deg);
    }
}

/* Style cho dòng chữ Kết nối giá trị */
.logo-slogan {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 700; /* Tăng từ 500 lên 700 */
    color: #1d7ae4;
    text-align: center;
    margin-top: 15px;
    text-shadow: 
        0.5px 0.5px 0 #000000,  /* Thêm viền trắng mỏng */
        -0.5px -0.5px 0 #000000,
        0.5px -0.5px 0 #000000,
        -0.5px 0.5px 0 #000000,
        0.5px 0.5px 0 #000000;
    -webkit-text-stroke: 0.3px #000000; /* Viền mỏng cho chữ */
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.95; /* Tăng độ đậm nhẹ */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.brand-logo:error,
.brand-logo[src=""],
.brand-logo:not([src]) {
    display: none;
}

/* Fallback when logo fails to load */
.nav-brand:has(.brand-logo:error) h1::before,
.nav-brand:has(.brand-logo[src=""]) h1::before {
    content: "🏠 ";
    margin-right: var(--space-sm);
}

.floating-logo:hover .brand-logo {
    transform: scale(1.15);
    box-shadow: 0 16px 64px rgba(44, 90, 160, 0.5);
    filter: brightness(1.1);
}

/* Brand subtitle hover removed - no longer used */

/* Ensure logo maintains aspect ratio */
.brand-logo {
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.nav-brand h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.1;
    transition: all var(--transition-normal);
}

.header.scrolled .nav-brand h1 {
    font-size: 1.2rem;
    line-height: 1;
    transform: translateX(-10px);
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    transition: all var(--transition-normal);
    margin-left: -120px;
    white-space: nowrap;
    flex-wrap: nowrap;
    flex-shrink: 0;
}



.nav-link {
    text-decoration: none;
    color: #FF8C00; /* Màu cam cho menu chưa active */
    font-weight: 600;
    font-size: 0.95rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left var(--transition-slow);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #FF6B00; /* Màu cam đậm hơn khi hover */
    background: rgba(255, 140, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
}

.nav-link.active {
    color: var(--text-white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: var(--shadow-lg);
}

.nav-link.active::after {
    display: none;
}

/* Map 3D Navigation Button */
.map3d-btn-nav {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 1rem;
    position: relative;
    overflow: hidden;
}

.map3d-btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left var(--transition-normal);
}

.map3d-btn-nav:hover::before {
    left: 100%;
}

.map3d-btn-nav:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white !important;
}

.map3d-btn-nav:active {
    transform: translateY(-1px);
}

.map3d-btn-nav i {
    font-size: 1rem;
    animation: mapPulse 2s infinite;
}

@keyframes mapPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Mobile buttons */
.mobile-buttons {
    display: none;
    align-items: center;
    gap: 1rem;
}

/* Hide mobile buttons on desktop */
@media (min-width: 769px) {
    .mobile-buttons {
        display: none !important;
    }
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: -100px;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #666;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: #f8f9fa;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #2c5aa0;
}

/* Main Content */
.main-content {
    margin-top: 0;
    min-height: 100vh;
}

.page {
    display: none;
    padding-top: 0;
}

.page.active {
    display: block;
}

.page .container {
    padding-top: var(--space-lg);
}

/* Hero Section */
.hero {
    position: relative !important;
    overflow: hidden !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin-top: 0 !important;
    z-index: 1 !important; /* Đảm bảo hero nằm dưới header */
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%),
        url('../img/hero1.png') center/cover no-repeat fixed,
        url('../img/BG1.jpg') center/cover no-repeat fixed !important;
}

.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 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header, .hero, .main-content, .page {
    position: relative;
    z-index: 1;
}

/* Ẩn menu mobile trên desktop */
.mobile-menu, 
.mobile-menu-overlay {
    display: none !important;
}

/* Đảm bảo menu mobile nằm trên tất cả */
.mobile-menu, 
.mobile-menu * {
    z-index: 9999 !important;
}

.mobile-menu {
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
}

/* Fix for any stacking context issues */
body.menu-open {
    overflow: hidden;
    height: 100vh;
}

.hero .container {
    position: relative;
    z-index: 2;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.hero-content {
    text-align: right;
    padding: var(--space-2xl);
    width: 50%;
    position: relative;
    z-index: 3;
    color: var(--text-white);
    font-family: 'Faustina', serif;
    margin-right: var(--space-2xl);
}





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

.hero-content h1 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin: 1.5rem 0 2.5rem 0;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: var(--text-white);
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    animation: slideInUp 1s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content p {
    font-family: 'Faustina', serif;
    font-size: 1.25rem;
    margin-bottom: var(--space-2xl);
    opacity: 0.9;
    line-height: 1.6;
    color: var(--text-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-search {
    position: absolute;
    top: 30%;
    left: 5%;
    transform: none;
    max-width: 600px;
    width: 50%;
    min-width: 400px;
    z-index: 4;
    animation: slideInLeft 1s ease-out 0.4s both;
    padding: 0;
    box-sizing: border-box;
}

.search-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.search-form:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.search-form input,
.search-form select,
.search-form button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fff;
    color: var(--text-primary);
    transition: all 0.2s ease;
    height: 44px;
}

.search-field {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.search-form input:focus,
.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.1);
    transform: translateY(-2px);
}

.search-form input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-form button {
    flex-shrink: 0;
    padding: 10px 16px;
    min-width: 120px;
    height: 44px;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.search-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-normal);
}

.search-form button:hover::before {
    left: 100%;
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-form button:active {
    transform: translateY(0);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section.bg-light {
    background:
        linear-gradient(135deg, rgba(248, 250, 252, 0.616) 0%, rgba(241, 245, 249, 0.9) 100%),
        url('../img/BG1.jpg') center/cover no-repeat;
    position: relative;
}

.section.bg-light::before {
    content: '';
    position: absolute;
    top: 0;
}

.section.bg-light .container {
position: relative;
z-index: 2;
}

/* Section Title Styles */
.section-title,
.section-title h2,
.section h2 {
    text-align: center;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    margin-bottom: 2.5rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 1rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, #2c5aa0 0%, #3b82f6 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(44, 90, 160, 0.1);
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2c5aa0, transparent);
    transition: width 1s ease 0.3s;
    z-index: -1;
}

.section-title.visible::before {
    width: 100px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2c5aa0, transparent);
    transition: width 1s ease 0.5s;
}

.section-title.visible::after {
    width: 120px;
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-family: 'Faustina', serif;
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
    position: relative;
}

.section-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle::before {
    content: '"';
    position: absolute;
    left: -20px;
    top: -10px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: 'Faustina', serif;
    line-height: 1;
}

.section-subtitle::after {
    content: '"';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: 'Faustina', serif;
    line-height: 1;
}

/* Thao Dien District Map */
.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.thao-dien-image {
    width: 100%;
    height: 800px;
    object-fit: cover;
    display: block;
}

.service-marker {
    position: absolute;
    transform: translate(50px, 160px); /* Dịch sang phải 20px và xuống dưới 30px */
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-marker .marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e74c3c;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.service-marker .marker-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: inherit;
    animation: ripple 2s infinite;
    z-index: 1;
    opacity: 0.7;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.marker-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    min-width: 120px;
    text-align: center;
}

.service-marker:hover .marker-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.service-marker[data-service="school"] .marker-dot {
    background: #3498db;
}

.service-marker[data-service="hospital"] .marker-dot {
    background: #2ecc71;
}

.service-marker[data-service="park"] .marker-dot {
    background: #f39c12;
}

/* Dịch marker nhà hàng sang trái */
.service-marker[data-service="restaurant"] {
    transform: translate(-200px, 30px) !important;
}

.service-marker[data-service="restaurant"] .marker-dot {
    background: #9b59b6;
}

.marker-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.map-info-panel {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    max-width: 300px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 1; /* Changed from 0 to 1 to make it visible */
    z-index: 999;
    transform: translateY(0); /* Reset transform */
    transition: all 0.5s ease;
}

.map-info-panel h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.map-info-panel p {
    margin: 0 0 15px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.service-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Scroll Trigger Animations */
.section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Specific section animations */
.hero {
    opacity: 0;
    transform: translateY(30px);
}

.hero.animate {
    opacity: 1;
    transform: translateY(0);
}

.thao-dien-map {
    perspective: 1000px;
}

.thao-dien-map.animate {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.district-map {
    width: 100%;
    height: 600px;
    max-height: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: all var(--transition-normal);
    border: 2px solid #ddd;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    /* Fix SVG interaction issues */
    overflow: visible;
    pointer-events: auto;
}

/* Fix SVG text selection and interaction */
.district-map text {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Ensure clickable elements work properly */
.district-map .clickable {
    cursor: pointer;
    pointer-events: all;
}

/* Prevent animation elements from blocking clicks */
.district-map .non-interactive {
    pointer-events: none;
}

.district-map:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(44, 90, 160, 0.15);
}

/* Property Markers Styling */
.property-marker {
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-marker:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.property-marker.luxury rect {
    fill: #C41E3A !important;
}

.property-marker rect {
    transition: all 0.3s ease;
}

.property-marker:hover rect {
    stroke-width: 3;
    filter: drop-shadow(0 0 10px rgba(196, 30, 58, 0.5));
}

/* Area Labels Styling */
.area-labels text {
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Title Section Styling */
.title-section text {
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Map Labels Styling */
.map-labels text {
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: bold;
}

.map-title rect {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.map-title text {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Thao Dien Map Container */
.thao-dien-map {
    position: relative;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Animated Border Effects */
.animated-border {
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.5));
}

.animated-border:hover {
    stroke-width: 12;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
    transition: all 0.3s ease;
}

/* Nguyen Van Huong Road Effects - Realistic Highway */
.nguyen-van-huong-road {
    cursor: pointer;
}

.road-base {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.road-base:hover {
    stroke-width: 40;
    transition: all 0.3s ease;
}

.center-line {
    filter: drop-shadow(0 1px 2px rgba(255, 255, 0, 0.5));
}

.road-sign {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    transition: all 0.2s ease;
    pointer-events: all;
    cursor: pointer;
}

.road-sign:hover {
    transform: scale(1.02) translateY(-1px); /* Reduced scale and movement */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.road-sign rect {
    transition: all 0.2s ease;
    pointer-events: none; /* Prevent rect from interfering */
}

.road-sign:hover rect {
    fill: #228B22;
    stroke-width: 3; /* Reduced stroke width change */
}

.road-sign text {
    pointer-events: none; /* Prevent text from interfering */
}

/* Highway Animation Effects */
@keyframes roadShimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1.0; }
    100% { opacity: 0.8; }
}

.nguyen-van-huong-road:hover .road-base {
    animation: roadShimmer 2s ease-in-out infinite;
}

/* Road Sign Glow Effect */
.road-sign:hover text {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* Traffic Animation Effects - Fixed pointer events */
.traffic-animation {
    pointer-events: none; /* Prevent interference with map interactions */
}

.car {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    pointer-events: none; /* Cars don't interfere with clicks */
}

.truck {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    pointer-events: none; /* Trucks don't interfere with clicks */
}

/* River Flow Effects - Fixed pointer events */
.river-flow {
    pointer-events: none; /* Prevent interference with map interactions */
}

.water-wave {
    filter: drop-shadow(0 0 4px rgba(135, 206, 235, 0.6));
    pointer-events: none;
}

.boat {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    pointer-events: none;
}

.boat-1 {
    transform-origin: center;
}

.boat-2 {
    transform-origin: center;
}

.yacht {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    pointer-events: none;
    transform-origin: center;
}

/* Boat wake effects */
.boat::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    transform: translateX(-25px);
}

/* River flow animation improvements */
.water-wave {
    animation: waterFlow 3s ease-in-out infinite;
}

@keyframes waterFlow {
    0%, 100% {
        stroke-dashoffset: 0;
        opacity: 0.6;
    }
    50% {
        stroke-dashoffset: 20;
        opacity: 0.8;
    }
}

/* Enhanced Map Labels - Fixed hover issues */
.river-label text {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
    font-family: 'Arial', sans-serif;
    pointer-events: none; /* Prevent hover conflicts */
}

.compass {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
    cursor: pointer;
    pointer-events: all;
}

.compass:hover {
    transform: scale(1.02); /* Reduced scale to prevent jitter */
    transition: transform 0.2s ease;
}

.map-title {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    pointer-events: all;
}

.map-title:hover {
    transform: translateY(-1px); /* Reduced movement */
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
    transition: all 0.2s ease;
}

.additional-labels text {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    font-family: 'Arial', sans-serif;
    pointer-events: none; /* Prevent hover conflicts */
}

.additional-labels text:hover {
    transform: scale(1.02); /* Reduced scale */
    transition: transform 0.2s ease;
}

/* Animation Keyframes */
@keyframes carMove {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(1200px); }
}

@keyframes waterFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 50; }
}

@keyframes labelGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(255,255,255,0.5); }
    50% { text-shadow: 0 0 15px rgba(255,255,255,0.8); }
}

/* Responsive Animations */
@media (max-width: 768px) {
    .traffic-animation,
    .river-flow {
        display: none;
    }

    .map-labels text {
        font-size: 12px;
    }

    .additional-labels {
        display: none;
    }
}

/* Thao Dien Pointer Effects - Fixed hover issues */
.thao-dien-pointer {
    cursor: pointer;
    pointer-events: all;
}

.thao-dien-pointer:hover .pointer-circle {
    stroke-width: 4;
    stroke: #C41E3A;
    transition: all 0.2s ease;
}

.thao-dien-pointer:hover .arrow-pointer {
    transform: scale(1.05); /* Reduced scale */
    transform-origin: center;
    transition: transform 0.2s ease;
}

.pointer-circle {
    filter: drop-shadow(0 0 6px rgba(231, 76, 60, 0.4));
    pointer-events: none; /* Prevent circle from interfering */
}

.arrow-pointer {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    pointer-events: all; /* Allow clicking on arrow */
}

/* SVG Elements Styling */
.river {
    filter: drop-shadow(0 2px 4px rgba(79, 195, 247, 0.3));
}

.district-boundary {
    filter: drop-shadow(0 2px 4px rgba(44, 90, 160, 0.2));
}

.park {
    filter: drop-shadow(0 2px 4px rgba(129, 199, 132, 0.3));
}

.road {
    filter: drop-shadow(0 1px 2px rgba(102, 102, 102, 0.3));
}

.landmark {
    cursor: pointer;
    transition: all 0.3s ease;
}

.landmark:hover {
    transform: scale(1.2);
}

.landmark-label {
    font-family: 'Faustina', serif;
    font-size: 10px;
    font-weight: 600;
    fill: #2c5aa0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.district-logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.district-sublabel {
    font-family: 'Faustina', serif;
    font-size: 14px;
    font-weight: 500;
    fill: #64748b;
    opacity: 0.7;
}

/* Road Styles */
.major-road {
    filter: drop-shadow(0 2px 4px rgba(74, 74, 74, 0.3));
}

.main-road {
    filter: drop-shadow(0 1px 3px rgba(74, 74, 74, 0.2));
}

.road {
    filter: drop-shadow(0 1px 2px rgba(102, 102, 102, 0.2));
}

/* Enhanced Landmark Styles */
.landmark {
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
}

.landmark:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* Realistic Building Shadows */
.landmark rect,
.landmark polygon {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Enhanced Property Markers */
.property-marker {
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(44, 90, 160, 0.5));
    transition: all 0.3s ease;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
}

.property-marker:hover {
    transform: scale(1.3);
    filter: drop-shadow(0 4px 8px rgba(44, 90, 160, 0.7));
}

.property-marker {
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(44, 90, 160, 0.4));
    transition: all 0.3s ease;
}

.property-marker:hover {
    transform: scale(1.5);
}

/* Map Legend */
.map-legend {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-legend h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.river-color {
    background: linear-gradient(135deg, #4FC3F7, #29B6F6);
}

.park-color {
    background: linear-gradient(135deg, #81C784, #66BB6A);
}

.property-color {
    background: #2c5aa0;
}

.landmark-color {
    background: linear-gradient(135deg, #FF6B6B, #FFD93D);
}

.school-color {
    background: #3498DB;
}

.commercial-color {
    background: linear-gradient(135deg, #F39C12, #E67E22);
}

.villa-color {
    background: linear-gradient(135deg, #27AE60, #2ECC71);
}

.legend-note {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(44, 90, 160, 0.2);
}

.legend-note small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .thao-dien-map {
        padding: 1rem;
        margin: 1rem 0;
    }

    .map-container-section {
        width: calc(100% - 2rem); /* Giảm khoảng cách trên mobile */
        margin: 1rem auto 0;
    }

    .map-controls {
        position: static; /* Đặt legend dưới map trên mobile */
        margin-top: 1rem;
        justify-content: center;
    }

    .map-legend {
        position: static;
        margin-top: 0;
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .legend-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .district-map {
        max-height: 300px;
    }

    .landmark-label {
        font-size: 8px;
    }

    .district-label {
        font-size: 18px;
    }
}

/* Map Section */
.map-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.map-section::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 1000 1000"><defs><radialGradient id="mapGrad" cx="50%" cy="50%"><stop offset="0%" stop-color="%2344, 90, 160" stop-opacity="0.05"/><stop offset="100%" stop-color="%2344, 90, 160" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23mapGrad)"/><circle cx="800" cy="400" r="200" fill="url(%23mapGrad)"/><circle cx="500" cy="800" r="180" fill="url(%23mapGrad)"/></svg>');
    opacity: 0.6;
    animation: mapFloat 25s ease-in-out infinite;
}

@keyframes mapFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(20px, -30px) rotate(180deg);
        opacity: 0.8;
    }
}

.map-preview-container {
    position: relative;
    z-index: 2;
}

.map-preview {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    transition: all var(--transition-slow);
    cursor: pointer;
}

.map-preview:hover {
    transform: translateY(-8px);
    box-shadow:
        var(--shadow-xl),
        0 25px 50px -12px rgba(44, 90, 160, 0.25);
}

.map-preview-content {
    position: relative;
    z-index: 3;
    padding: 3rem;
    flex: 1;
    text-align: center;
}

.map-preview-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: mapIconPulse 3s ease-in-out infinite;
}

@keyframes mapIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.map-preview-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Faustina', serif;
}

.map-preview-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

#mapPropertiesCount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2em;
}

.map-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.map-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(44, 90, 160, 0.05);
    border-radius: var(--radius-lg);
    min-width: 120px;
    transition: all var(--transition-fast);
}

.map-feature:hover {
    background: rgba(44, 90, 160, 0.1);
    transform: translateY(-2px);
}

.map-feature i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.map-feature span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.map-open-btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.map-open-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left var(--transition-normal);
}

.map-open-btn:hover::before {
    left: 100%;
}

.map-open-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow:
        var(--shadow-xl),
        0 15px 30px -5px rgba(44, 90, 160, 0.4);
}

.map-open-btn:active {
    transform: translateY(-1px);
}

.map-open-btn i {
    font-size: 1.2rem;
    animation: mapButtonPulse 2s ease-in-out infinite;
}

@keyframes mapButtonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.map-preview-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.map-preview-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: all var(--transition-slow);
}

.map-preview:hover .map-preview-bg img {
    opacity: 0.5;
    transform: scale(1.05);
}

.map-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 90, 160, 0.03) 0%,
        rgba(59, 130, 246, 0.02) 50%,
        transparent 100%
    );
}

/* Inline Map Styles */
.map-container-section {
    position: relative;
    width: calc(100% - 4rem); /* Khoảng cách 2rem mỗi bên */
    margin: 2rem auto 0; /* Center với khoảng cách */
    border-radius: 0; /* Bỏ bo tròn */
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: white;
    /* Fade-in animation */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.map-container-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.map-inline {
    width: 100%;
    height: 500px;
    position: relative;
    background: var(--bg-secondary);
}

.map-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: flex-end; /* Đặt legend về phía phải */
    align-items: flex-start;
    z-index: 1000;
    pointer-events: none;
}

.map-info {
    pointer-events: auto;
}

.map-legend {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 220px;
    max-width: 280px;
    /* Đặt lại vị trí */
    position: relative;
    margin-top: 0.5rem;
    pointer-events: auto;
}

.map-legend h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-color.green {
    background: #10b981;
}

.legend-color.orange {
    background: #f59e0b;
}

.legend-color.red {
    background: #ef4444;
}

.map-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: auto;
}

.map-control-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    font-size: 1rem;
}

.map-control-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.map-control-btn:active {
    transform: scale(0.95);
}

/* Fullscreen Map */
.map-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: white;
}

.map-fullscreen .map-inline {
    height: 100vh;
    border-radius: 0;
}

.map-fullscreen .map-controls {
    top: 2rem;
    left: 2rem;
    right: 2rem;
}

.map-fullscreen .map-control-btn.fullscreen-exit {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.map-fullscreen .map-control-btn.fullscreen-exit:hover {
    background: #dc2626;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2xl);
    margin-bottom: 2rem;
    padding: var(--space-2xl) 0 2rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c5aa0;
}

.search-filters {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.search-filters input,
.search-filters select {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid transparent;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-width: 120px;
}

.search-filters input:focus,
.search-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.search-filters button {
    flex-shrink: 0;
    min-width: 100px;
}

/* Grids */
.products-grid,
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Cards */
.product-card,
.blog-card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.product-card::before,
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.product-card:hover,
.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(44, 90, 160, 0.2);
}

.product-card:hover::before,
.blog-card:hover::before {
    opacity: 1;
}

.card-image {
    height: 240px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .card-image::after,
.blog-card:hover .card-image::after {
    opacity: 0.7;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .card-image img,
.blog-card:hover .card-image img {
    transform: scale(1.1);
}

.card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 3rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.card-content {
    padding: 0.6rem var(--space-xl);
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.5em; /* Fallback for non-webkit */
    line-clamp: 2; /* Standard property */
}

.card-price {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    letter-spacing: -0.025em;
}

.card-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.card-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* Fallback for non-webkit */
    line-clamp: 3; /* Standard property */
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-map {
    margin-top: var(--space-2xl);
}

.contact-map h3 {
    margin-bottom: var(--space-lg);
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.map-container-section {
    width: 90%;
    max-width: 1400px;
    height: 100%;
    position: relative;
    margin: 0 auto 4rem;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
}

.map-container-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--bg-tertiary);
    transition: all var(--transition-fast);
    position: relative;
}

.map-container:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
    display: block;
    transition: opacity var(--transition-normal);
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.map-container.loading::before {
    opacity: 1;
    content: 'Đang tải bản đồ...';
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 2rem;
    color: #2c5aa0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    color: #2c5aa0;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background: #234c7a;
    color: white;
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: #254b81;
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 100px;
    padding: 0 20px;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}

.footer-section p,
.footer-section a {
    color: #b3c5d7;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 10px;
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 20px;
}

.footer-bottom p {
    margin: 0.5rem 0;
    color: #8a9fb1;
    font-size: 0.9rem;
}

.footer-admin {
    margin-left: auto;
}

.footer-admin a {
    color: #8a9fb100;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-admin a:hover {
    color: var(--accent-color);
}

/* Decorative Buildings */
.buildings-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    display: flex;
    align-items: flex-end;
    z-index: 1;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
}

.building {
    position: relative;
    margin: 0 1px;
    background: #0f1a29;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* Small House */
.house-1 {
    width: 60px;
    height: 180px;
    background: #2c3e50;
}

.house-1::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -3px;
    width: 0;
    height: 0;
    border-left: 33px solid transparent;
    border-right: 33px solid transparent;
    border-bottom: 12px solid #2c3e50;
}

.house-1 .window {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #f1c40f;
    border-radius: 2px;
}

.house-1 .window:nth-child(1) { top: 12px; left: 12px; }
.house-1 .window:nth-child(2) { top: 12px; right: 12px; }
.house-1 .window:nth-child(3) { bottom: 8px; left: 12px; }
.house-1 .window:nth-child(4) { bottom: 8px; right: 12px; }
.house-1 .window:nth-child(5) { bottom: 8px; right: 12px; }
.house-1 .window:nth-child(6) { bottom: 8px; right: 12px; }
.house-1 .window:nth-child(7) { bottom: 8px; right: 12px; }
.house-1 .window:nth-child(8) { bottom: 8px; right: 12px; }

/* Apartment Building */
.apartment {
    width: 45px;
    height: 70px;
    background: #34495e;
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
}

.apartment .window {
    width: 8px;
    height: 8px;
    background: #f1c40f;
    margin: 2px;
    flex: 0 0 calc(33.333% - 4px);
}

/* Tall Building */
.building-tall {
    width: 40px;
    height: 90px;
    background: #2c3e50;
    position: relative;
}

.building-tall::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 15px;
    background: #2c3e50;
    transform: perspective(8px) rotateX(10deg);
}

.building-tall .window {
    position: absolute;
    width: 6px;
    height: 10px;
    background: #f1c40f;
}

.building-tall .window:nth-child(1) { top: 15px; left: 5px; }
.building-tall .window:nth-child(2) { top: 15px; right: 5px; }
.building-tall .window:nth-child(3) { top: 35px; left: 5px; }
.building-tall .window:nth-child(4) { top: 35px; right: 5px; }
.building-tall .window:nth-child(5) { top: 55px; left: 5px; }
.building-tall .window:nth-child(6) { top: 55px; right: 5px; }

/* Modern Building */
.building-modern {
    width: 80px;
    height: 70px;
    background: #2c3e50;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
    position: relative;
}

.building-modern .window {
    position: absolute;
    width: 12px;
    height: 15px;
    background: #f1c40f;
    transform: skewX(-10deg);
}

.building-modern .window:nth-child(1) { top: 15px; left: 15px; }
.building-modern .window:nth-child(2) { top: 15px; left: 40px; }
.building-modern .window:nth-child(3) { top: 40px; left: 15px; }
.building-modern .window:nth-child(4) { top: 40px; left: 40px; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3::after,
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-admin {
        margin: 1rem 0 0;
    }
    
    .buildings-container {
        display: none;
    }
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

.footer-admin {
    display: flex;
    align-items: center;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.admin-link i {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.bg-light {
    background-color: #f8f9fa;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-weight: 500;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    margin-right: var(--space-md);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Micro Interactions */
.card-details span,
.card-location,
.card-meta span {
    transition: all var(--transition-fast);
}

.product-card:hover .card-details span,
.product-card:hover .card-location,
.blog-card:hover .card-meta span {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Stagger Animation for Cards */
.products-grid .product-card,
.blogs-grid .blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Map Container Fade-in Animation */
@keyframes mapContainerFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.map-container-section.fade-in.visible {
    animation: mapContainerFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
}

[data-theme="dark"] body {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%),
        url('../img/BG1.jpg') center/cover no-repeat fixed;
}

[data-theme="dark"] .product-card,
[data-theme="dark"] .blog-card {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .section.bg-light {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%),
        url('../img/BG1.jpg') center/cover no-repeat;
}

[data-theme="dark"] .section.bg-light::before {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .search-form {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .product-card,
[data-theme="dark"] .blog-card {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: var(--space-md);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Language Selector */
.language-selector {
    margin-right: var(--space-md);
    transition: all var(--transition-fast);
}

.language-selector select {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.language-selector select:hover,
.language-selector select:focus {
    border-color: var(--primary-color);
    color: var(--primary-color);
    outline: none;
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: var(--space-sm);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Notification Badge */
.notification-badge {
    background: var(--error-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: var(--space-xs);
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: var(--text-muted);
    margin: var(--space-sm) 0;
    opacity: 0.3;
}

/* Product Detail Enhancements */
.employee-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.detail-location-coords {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.detail-location-coords h4 {
    margin-bottom: var(--space-sm);
    color: var(--primary-color);
}

.detail-location-coords p {
    margin: var(--space-xs) 0;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-meta {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--bg-tertiary);
}

.detail-meta small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
}

.spec-item {
    text-align: center;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.spec-item:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

.spec-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.spec-item:hover .spec-value {
    color: var(--text-white);
}

.spec-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-item:hover .spec-label {
    color: var(--text-white);
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

/* Employee Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--bg-tertiary);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.employee-contact-modal {
    max-width: 500px;
    width: 90%;
}

.employee-contact-info {
    text-align: center;
    padding: var(--space-lg);
}

.employee-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-lg);
    position: relative;
}

.employee-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-lg);
}

.employee-details h4 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.employee-title {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.contact-item {
    width: 100%;
}

.contact-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 1rem;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.phone-btn {
    border-color: var(--success-color);
}

.phone-btn:hover {
    background: var(--success-color);
    color: white;
}

.email-btn {
    border-color: var(--primary-color);
}

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

.whatsapp-btn {
    border-color: #25d366;
}

.whatsapp-btn:hover {
    background: #25d366;
    color: white;
}

.contact-btn i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.contact-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-value {
    font-size: 0.85rem;
    opacity: 0.8;
}

.product-reference {
    text-align: left;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.product-reference h5 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-reference p {
    margin: var(--space-xs) 0;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--error-color);
}

.product-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-location i {
    margin-right: var(--space-xs);
    color: var(--primary-color);
}

/* Responsive */
/* Tối ưu cho màn hình 430px */
@media (max-width: 430px) {
    /* Điều chỉnh header trên mobile */
    .header {
        padding-top: 10px;
    }
    
    .navbar {
        padding: 5px 0 !important;
    }
    
    /* Nút tìm kiếm trên header */
    .search-toggle-btn {
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.25rem;
        cursor: pointer;
        display: none; /* Hidden by default */
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: all 0.3s ease;
        margin-left: 0.5rem;
    }
    
    /* Show search toggle button on mobile only */
    @media (max-width: 768px) {
        .mobile-buttons {
            display: flex;
        }
        
        .search-toggle-btn {
            display: flex;
        }
    }
    
    .search-toggle-btn:hover {
        background: rgba(0,0,0,0.05);
    }
    
    .search-toggle-btn.active {
        color: var(--primary-color);
    }
    
    /* Ẩn hero-search mặc định */
    /* Điều chỉnh nút đóng tìm kiếm */
    .close-search-btn {
        position: absolute;
        top: 100%;
        right: 0rem;
        margin-top: 12.5rem;
        font-size: 1.8rem;
        line-height: 1;
        padding: 0.25rem 0.75rem;
        z-index: 10;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        color: #333;
    }
    
    .hero-search {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1001;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .hero-search.active {
        display: block;
    }
    
    /* Ẩn hero-content khi search active */
    .hero-search.active ~ .hero-content {
        display: none;
    }
    
    /* Thiết kế mới cho hero-search */
    .hero-search {
        position: fixed;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 15px; /* Tăng padding để dễ tương tác */
        border-radius: 12px; /* Bo tròn góc */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Đổ bóng đẹp hơn */
        animation: none;
        transform: none;
        left: 0;
        top: 0;
        height: 100%;
        .search-form {
            width: 100%;
            max-width: 100%;
            margin: 0 auto;
            padding: 15px; /* Tăng padding để dễ tương tác */
            border-radius: 12px; /* Bo tròn góc */
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Đổ bóng đẹp hơn */
            animation: none;
            transform: none;
            left: 0;
            top: 0;
            height: 100%;
        }
    }
    
    /* Ẩn các trường phòng ngủ, phòng tắm trên mobile */
    @media (max-width: 768px) {
        .search-form .form-group:nth-child(4),
        .search-form .form-group:nth-child(5) {
            display: none !important;
        }
        
        .search-form {
            margin-top: 60px; /* Tạo khoảng trống cho nút đóng */
        }
    }
    
    @keyframes floatUp {
        from { opacity: 0; transform: translate(-50%, 20px); }
        to { opacity: 1; transform: translate(-50%, 0); }
    }
    
    .search-form {
        position: relative;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        border: 1px solid #eee;
        max-width: 600px;
        margin: 60px auto 20px; /* Thêm margin-top: 60px để tạo khoảng trống cho nút đóng */
    }
    
    /* Nút đóng form tìm kiếm - Ẩn trên desktop */
    .close-search-btn {
        display: none; /* Ẩn mặc định */
    }
    
    .search-form input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        outline: none;
    }
    
    .search-form button {
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(44, 90, 160, 0.3);
        transition: all 0.3s ease;
    }
    
    .search-form button:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(44, 90, 160, 0.4);
    }
    
    .search-form button i {
        font-size: 1.2rem;
    }
    
    /* Ẩn các trường không cần thiết */
    .search-form select,
    .search-form .form-group:not(:first-child) {
        display: none;
    }
    /* Ngăn cuộn ngang khi mobile menu mở */
    body.menu-open {
        overflow-x: hidden;
        width: 100%;
        position: fixed;
    }
    
    /* Đảm bảo container không vượt quá chiều rộng màn hình */
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    /* Hero content điều chỉnh */
    .hero-content {
        margin-top: 2rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .feature-item {
        padding: 1.5rem 1.25rem;
    }

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

    .section-title::after {
        width: 60px;
        height: 3px;
        bottom: -10px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        justify-content: space-between;
    }

    /* Ngăn cuộn ngang toàn trang */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .nav-menu {
        opacity: 0;
        visibility: hidden;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        padding: 2rem 1.5rem;
        margin: 0;
        flex-direction: column;
        overflow-y: auto;
        transform: translateX(-100%);
        will-change: transform, opacity;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    /* Nút đóng tìm kiếm trên mobile */
    .close-search-btn {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        background: #f8f9fa;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .close-search-btn:hover {
        background: #e9ecef;
    }
    
    /* Overlay khi menu mở */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }

    .nav-auth {
        display: none; /* Ẩn nút đăng nhập/đăng ký trên mobile */
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .header.scrolled .navbar .container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .header.scrolled .nav-menu {
        margin-left: 0;
        gap: var(--space-md);
        justify-content: center;
    }

    .header.scrolled .nav-auth {
        right: 1rem;
        margin-right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

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

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

    .search-form {
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        margin-top: 40px; /* Tăng margin-top lên 40px */
    }

    .search-form input,
    .search-form select,
    .search-form button {
        width: 100%;
        height: 48px;
        min-width: auto;
    }

    .search-form button {
        margin-top: var(--space-sm);
    }

    .page-header {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: stretch;
        margin-top: var(--space-lg);
        padding-top: var(--space-lg);
    }

    .page {
        padding-top: var(--space-lg);
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .search-filters input,
    .search-filters select,
    .search-filters button {
        width: 100%;
        min-width: auto;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .contact-map {
        margin-top: var(--space-lg);
    }

    .map-container iframe {
        height: 250px;
    }

    .products-grid,
    .blogs-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .card-content {
        padding: var(--space-lg);
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .header.scrolled .nav-brand h1 {
        font-size: 1rem;
        line-height: 1;
        transform: translateX(-5px);
    }

    .brand-logo {
        width: 140px;
        height: 75px;
    }

    .floating-logo {
        top: 40%;
    }

    .header.scrolled .floating-logo {
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -50%) scale(0.3);
    }

    .header.scrolled .navbar {
        padding: var(--space-xs) 0;
    }

    .nav-brand {
        gap: var(--space-md);
    }

    .header.scrolled .nav-brand {
        gap: 0;
    }

    .hero-search {
        position: relative;
        top: 100px;
        left: 0;
        right: 0;
        transform: none;
        width: 100%; /* Chiếm toàn bộ chiều rộng */
        max-width: 100%;
        min-width: 100%;
        margin: 0;
        padding: 0 10px;
        box-sizing: border-box;
        z-index: 1000;
        animation: none;
    }
    
    .search-form {
        width: 100%;
        max-width: 100%;
        padding: 6px 10px; /* Giảm padding thêm */
        margin: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        gap: 4px; /* Giảm khoảng cách giữa các phần tử */
    }
    
    .search-form label {
        font-size: 0.65rem !important; /* Giảm kích thước chữ label */
        margin-bottom: 1px !important; /* Giảm khoảng cách dưới label */
    }
    
    .search-form input,
    .search-form select,
    .search-form button {
        font-size: 0.65rem !important; /* Giảm kích thước chữ */
        padding: 3px 5px !important; /* Giảm padding */
        height: 26px !important; /* Giảm chiều cao */
        border-radius: 2px !important;
        margin: 0 !important;
        margin-top: 1px !important; /* Giảm khoảng cách trên input */
        border: 1px solid #e2e8f0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
 
    .search-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 3px !important; /* Giảm khoảng cách giữa các cột */
        margin-bottom: 3px !important; /* Giảm margin dưới */
        width: 100%;
        align-items: flex-start; /* Căn các item lên trên */
    }
    
    .search-field {
        margin-bottom: 0.2rem !important; /* Giảm margin dưới */
        min-width: 0;
        padding: 0 1px !important; /* Giảm padding ngang */
    }
    
    /* Search actions - now a separate element */
    .search-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 0.1rem !important; /* Giảm margin trên */
        padding-top: 2px !important; /* Thêm padding trên nhẹ */
        width: 100%;
    }
    
    .search-actions .btn {
        width: 90px !important; /* Giảm chiều rộng nút */
        padding: 0.15rem 0.3rem !important; /* Giảm padding */
        font-size: 0.62rem !important; /* Giảm kích thước chữ */
        height: 24px !important; /* Giảm chiều cao nút */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.08rem !important;
        line-height: 1 !important;
    }
    
    .search-actions .btn i {
        font-size: 0.75rem;
    }
    
    .search-actions .btn i {
        font-size: 0.75rem;
    }

    .hero-image {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
    }

    .hero-image img {
        height: 100vh;
        object-position: center;
    }

    /* Map Section Mobile */
    .map-preview {
        flex-direction: column;
        min-height: auto;
        text-align: center;
    }

    .map-preview-content {
        padding: 2rem 1.5rem;
    }

    .map-preview-content h3 {
        font-size: 1.5rem;
    }

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

    .map-features {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .map-feature {
        min-width: 100px;
        padding: 0.75rem;
    }

    .map-feature i {
        font-size: 1.2rem;
    }

    .map-feature span {
        font-size: 0.8rem;
    }

    .map-open-btn {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }

    .map-preview-bg {
        position: relative;
        width: 100%;
        height: 200px;
        order: -1;
    }

    .map-preview-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 2rem;
        font-family: 'Great Vibes', cursive;
    }

    .section-title::before,
    .section-title::after {
        width: 60px !important;
    }

    .section-subtitle::before,
    .section-subtitle::after {
        display: none;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Inline Map Mobile */
    .map-inline {
        height: 400px;
    }

    .map-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .map-legend {
        min-width: auto;
        width: 100%;
        max-width: 280px;
    }

    .map-actions {
        flex-direction: row;
        align-self: flex-end;
    }

    .map-control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .map-legend h4 {
        font-size: 0.85rem;
    }

    /* Footer Mobile */
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .admin-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }


/* Decorative Houses */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.house-decoration {
    position: absolute;
    z-index: 0;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.house {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 20px;
}

.house-roof {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 20px solid var(--primary-color);
    position: absolute;
    top: 0;
    left: -5px;
}

.house-body {
    width: 40px;
    height: 30px;
    background: var(--primary-color);
    position: absolute;
    bottom: 0;
}

.house-window {
    width: 10px;
    height: 10px;
    background: var(--bg-primary);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.house-door {
    width: 8px;
    height: 12px;
    background: var(--accent-color);
    position: absolute;
    bottom: 0;
    left: 16px;
}

/* Position decorative houses */
#blogsPage {
    position: relative;
    overflow: hidden;
    padding: 100px 0 60px;
    background: var(--bg-secondary);
}

#blogsPage .page-header {
    margin-top: 4rem; /* Thêm khoảng cách phía trên */
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 50px;
}

#blogsPage .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    color: #1d293f;
    letter-spacing: -0.5px;
}

#blogsPage .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

#blogsPage .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Search and Filter */
.search-filters {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
    outline: none;
}

.select-wrapper {
    position: relative;
    min-width: 200px;
}

.select-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.custom-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    appearance: none;
    background: var(--bg-primary);
    cursor: pointer;
}

#filterBlogs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    font-weight: 500;
}

/* Blogs Container */
.blogs-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 40px;
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Blog Card */
.blog-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-category {
    display: inline-block;
    background: rgba(44, 90, 160, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-read-more {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    color: var(--primary-dark);
    gap: 8px;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    color: var(--text-primary);
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list li.active a {
    color: var(--primary-color);
    padding-left: 8px;
}

.category-list a::after {
    content: '→';
    opacity: 0;
    transition: all 0.3s ease;
}

.category-list a:hover::after,
.category-list li.active a::after {
    opacity: 1;
    transform: translateX(5px);
}

/* Popular Posts */
.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post img {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.post-info a {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-info a:hover {
    color: var(--primary-color);
}

.post-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tags Widget */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Pagination */
/* Add decorative houses */
#blogsPage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(44, 90, 160, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(44, 90, 160, 0.05) 0%, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 5px;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-numbers:hover:not(.current) {
    background: #f1f5f9;
    color: var(--primary-color);
}

.page-numbers.current {
    background: var(--primary-color);
    color: white;
}

.page-numbers.prev,
.page-numbers.next {
    font-size: 0.9rem;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(44, 90, 160, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .blogs-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box,
    .select-wrapper,
    #filterBlogs {
        width: 100%;
    }
    
    .blogs-grid {
        grid-template-columns: 1fr;
    }
    
    #blogsPage .section-title {
        font-size: 2rem;
    }
}

/* Product Intro Section */
.product-intro {
    position: relative;
    min-height: 100vh;
    overflow: visible;
    background: #f8f9fa;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.intro-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0 url('../img/product_b470.jpg') center/contain no-repeat fixed;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    padding: 80px 0 150px; /* Tăng padding dưới để chứa nút */
    overflow: visible;
    flex: 1; /* Chiếm hết không gian còn lại */
}

/* Features Section */
.intro-features {
    position: relative;
    padding: 100px 0;
    background: #fff;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.8s ease-out;
}

.intro-features.reveal {
    transform: translateY(-50px);
}

.product-intro .container {
    position: relative;
    z-index: 2;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    z-index: 2;
    padding-bottom: 80px; /* Tạo không gian cho nút scroll */
}

.intro-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.intro-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.intro-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Parallax Effect for Hero Background */
@keyframes parallax {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-20%);
    }
}

.intro-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
    will-change: transform;
    animation: parallax 10s ease-in-out infinite alternate;
}

/* Features Content */
.features-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a1a;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #2c5aa0;
    border-radius: 2px;
}

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

.feature-item {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #2c5aa0;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: #2c5aa0;
    color: #fff;
    transform: scale(1.1);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #2c5aa0;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
    animation: bounce 2s infinite;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    margin-top: 40px; /* Thêm margin phía trên nút */
}

.scroll-indicator:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.scroll-indicator i {
    margin-top: 8px;
    font-size: 1.2rem;
    color: #2c5aa0;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover i {
    transform: translateY(3px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-15px) translateX(-50%);
    }
    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

/* Product Grid with Scroll Animation */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    position: relative;
    min-height: 200px; /* Ensure there's space for the loading indicator */
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}



.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.product-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2.5rem;
    }
    
    .intro-text {
        font-size: 1.1rem;
    }
    
    .intro-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999998 !important; /* Tăng lên rất cao */
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

/* Hiển thị menu mobile trên thiết bị di động */
@media (max-width: 768px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: block !important;
    }
    
    .mobile-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 320px !important;
        max-width: 90% !important;
        height: 100vh !important;
        background: var(--bg-primary) !important;
        z-index: 9999999 !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3) !important;
        display: flex !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
}

.mobile-menu.active {
    right: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Ẩn mobile logo trên desktop */
.mobile-logo {
    display: none;
}

.mobile-logo img {
    height: 50px;
    width: auto;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 10000000; /* Đảm bảo nội dung menu hiển thị trên cùng */
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary-color);
    color: white;
}

.mobile-auth-buttons {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.mobile-theme-toggle,
.mobile-language-selector {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-theme-toggle .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
}

.mobile-language-selector select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Hide desktop auth buttons on mobile */
@media (max-width: 768px) {
    .floating-logo {
        display: none; /* Ẩn logo nổi trên mobile */
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .header.scrolled {
        padding: 0.25rem 0 !important;
    }
    
    /* Mobile menu header styles */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.98);
    }
    
    .mobile-logo {
        display: flex; /* Hiển thị trên mobile */
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-logo .brand-logo {
        width: 50px;
        height: auto;
        margin-bottom: 5px;
    }
    
    .mobile-logo .logo-text {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1d7ae4;
        margin: 0;
    }
    
    .mobile-logo .logo-slogan {
        font-size: 0.7rem;
        color: #1d7ae4;
        font-style: italic;
        font-weight: 500;
    }
    
    .mobile-close-btn {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #333;
        cursor: pointer;
    }
    
    .nav-auth {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Pagination Styles */
#featuredProductsPagination {
    text-align: center;
    padding: 20px 0 40px;
}

#featuredProductsPagination .pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

#featuredProductsPagination .page-info {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

/* Style for both pagination buttons */
#prevPageBtn,
#nextPageBtn {
    min-width: 130px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
}

/* Next button style */
#nextPageBtn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

#nextPageBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Previous button style */
#prevPageBtn {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#prevPageBtn:hover:not(:disabled) {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Disabled state for both buttons */
#prevPageBtn:disabled,
#nextPageBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner */
#prevPageBtn .fa-spinner,
#nextPageBtn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading state */
.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 0;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #featuredProductsPagination {
        padding: 15px 0 30px;
    }
    
    #loadMoreBtn {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
}
/* Responsive styles for Thao Dien Real Estate */

/* For mobile devices */
@media (max-width: 767px) {
    /* Advanced search form styles */
    .hero .hero-search .advanced-search-form {
        margin: 2.5rem 0 0.5rem 0 !important;
        padding: 0 !important;
    }
    
    .advanced-search-form .search-form {
        padding: 1rem 0.75rem;
    }
    /* Make "Thảo Điền" break into two lines on mobile */
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content h1 .word {
        display: inline-block;
    }
    
    .hero-content h1 .word:last-child {
        display: block;
        margin-left: 0;
    }
    
    /* Adjust hero section padding on mobile */
    .hero {
        padding: 20px 0 20px !important;
    }
    
    .hero .container {
        padding-top: 0 !important;
    }
    
    .advanced-search-form + .hero-content {
        padding-top: 0.5rem;
    }
    
    /* Điều chỉnh nút đóng tìm kiếm */

    
    .hero-content {
        text-align: center;
    }
    
    /* Make sure the text is readable on small screens */
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    /* Adjust button size for better touch targets */
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Adjust hero content when search is active */
    .hero-search.active + .hero-content {
        padding-top: 1rem;
    }
}

}