/* OneHousing - Shared Real Estate Styles */

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding-top: 80px; /* Account for fixed header */
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 4rem 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   HEADER STYLES
   ============================================ */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-link .logo {
    margin: 0;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

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

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

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

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

/* Navigation Container */
.nav-container {
    transition: all 0.3s ease;
}

/* Desktop Navigation - Ensure it shows properly on larger screens */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .nav-container {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: none !important;
        box-shadow: none !important;
    }

    .nav-menu {
        flex-direction: row !important;
        gap: 2rem !important;
        padding: 0 !important;
    }

    .nav-menu li {
        border-bottom: none !important;
    }

    .nav-menu a {
        padding: 0 !important;
    }
}

/* ============================================
   SCROLL OFFSET FOR FIXED HEADER
   ============================================ */
.section, .hero, .hero-main {
    scroll-margin-top: 100px;
}

.category-section {
    scroll-margin-top: 90px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

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

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

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Button Variants */
.btn-primary {
    background: #007cba;
}

.btn-primary:hover {
    background: #005a8a;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
}

.btn-outline:hover {
    background: #007cba;
    color: white;
}

/* Property Card Buttons Layout */
.property-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.property-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.property-buttons .btn-outline {
    flex: 0.8; /* Chi tiết button slightly smaller */
}

.property-buttons .btn-primary {
    flex: 1.2; /* Liên hệ button slightly larger */
}

/* ============================================
   PROPERTY CARDS
   ============================================ */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.properties-grid.large-cards {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.properties-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.properties-grid.ultra-compact {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card.compact {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.property-card.ultra-compact {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.property-card.compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.property-card.ultra-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.property-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
}

.property-image.compact {
    height: 200px;
    font-size: 1.1rem;
}

.property-image.ultra-compact {
    height: 160px;
    font-size: 1rem;
}

.property-image.large {
    height: 280px;
}

.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.price-badge.compact {
    padding: 6px 12px;
    font-size: 1rem;
    top: 12px;
    right: 12px;
}

.price-badge.ultra-compact {
    padding: 4px 10px;
    font-size: 0.9rem;
    top: 10px;
    right: 10px;
    border-radius: 15px;
}

.premium-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.premium-badge.compact {
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 12px;
}

.premium-badge.ultra-compact {
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 10px;
}

.premium-badge.vip {
    background: #ffc107;
    color: #212529;
}

.premium-badge.hot {
    background: #ff6b6b;
    color: white;
}

.premium-badge.luxury {
    background: #6f42c1;
    color: white;
}

.premium-badge.premium {
    background: #fd7e14;
    color: white;
}

.premium-badge.exclusive {
    background: #e83e8c;
    color: white;
}

.premium-badge.ultimate {
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #212529;
}

.premium-badge.new {
    background: #20c997;
    color: white;
}

.property-content {
    padding: 1.5rem;
}

.property-content.compact {
    padding: 1.2rem;
}

.property-content.ultra-compact {
    padding: 1rem;
}

.property-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.property-title.compact {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.property-title.ultra-compact {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.property-location {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.property-location.compact {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.property-location.ultra-compact {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.property-description {
    color: #666;
    line-height: 1.6;
    margin: 1rem 0;
}

.property-description.compact {
    font-size: 0.95rem;
    margin: 0.8rem 0;
    line-height: 1.5;
}

.property-description.ultra-compact {
    font-size: 0.9rem;
    margin: 0.6rem 0;
    line-height: 1.4;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   PROPERTY FEATURES
   ============================================ */
.property-features {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.property-features.compact {
    margin: 0.8rem 0;
    padding: 0.8rem;
    border-radius: 8px;
}

.property-features.ultra-compact {
    margin: 0.6rem 0;
    padding: 0.6rem;
    border-radius: 6px;
}

.property-features.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.property-features.grid.compact {
    gap: 0.8rem;
}

.property-features.grid.ultra-compact {
    gap: 0.6rem;
}

.property-features.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature {
    text-align: center;
    flex: 1;
    padding: 0.5rem;
}

.feature.compact {
    padding: 0.3rem;
}

.feature.ultra-compact {
    padding: 0.2rem;
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-icon.compact {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.feature-icon.ultra-compact {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.feature-text {
    font-size: 0.9rem;
    color: #666;
}

.feature-text.compact {
    font-size: 0.85rem;
}

.feature-text.ultra-compact {
    font-size: 0.8rem;
}

.feature-value {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.feature-value.compact {
    font-size: 1rem;
}

.feature-value.ultra-compact {
    font-size: 0.95rem;
}

/* ============================================
   PROPERTY HIGHLIGHTS
   ============================================ */
.property-highlights {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.property-highlights.style-2br {
    background: #e3f2fd;
}

.property-highlights.style-2br h4 {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.property-highlights.style-3br {
    background: #e8f5e8;
}

.property-highlights.style-3br h4 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

.highlights-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.9rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   AMENITIES SECTION
   ============================================ */
.amenities {
    background: #f8f9fa;
    padding: 3rem 0;
}

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

.amenities-grid.large {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.amenity-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.amenity-item:hover {
    transform: translateY(-3px);
}

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

/* ============================================
   STATISTICS SECTION
   ============================================ */
.stats-section {
    color: white;
    padding: 3rem 0;
}

.stats-section.style-2br {
    background: #007cba;
}

.stats-section.style-3br {
    background: #28a745;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.contact-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.contact-info {
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.3rem;
}

.contact-info p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: left;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #74b9ff;
}

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

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

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

.footer-section ul li a:hover {
    color: #74b9ff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #95a5a6;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.contact-item p {
    color: #7f8c8d;
    font-weight: 600;
}

/* ============================================
   COLOR THEMES
   ============================================ */
.theme-2br .property-image {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
}

.theme-2br .property-location {
    color: #74b9ff;
}

.theme-2br .amenity-icon {
    color: #74b9ff;
}

.theme-3br .property-image {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.theme-3br .property-location {
    color: #28a745;
}

.theme-3br .amenity-icon {
    color: #28a745;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    /* Adjust body padding for mobile fixed header */
    body {
        padding-top: 80px; /* Reduced padding since menu will collapse */
    }

    .header-content {
        justify-content: space-between;
        align-items: center;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide navigation by default on mobile */
    .nav-container {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
        z-index: 1000 !important;
    }

    /* Show navigation when menu is active */
    .nav-container.mobile-menu-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Extra strong override for mobile menu - force display */
    body .nav-container.mobile-menu-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background: #2c3e50 !important;
        z-index: 1000 !important;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        text-align: center;
        margin: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        transition: background-color 0.3s ease;
    }

    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        opacity: 1;
    }

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

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .properties-grid.compact {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .properties-grid.ultra-compact {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .property-features {
        /* Keep horizontal layout on mobile for compact design */
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.8rem;
        flex-wrap: wrap;
    }

    .property-features.grid,
    .property-features.grid-3 {
        /* Keep grid layout but make it more compact */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .property-features.compact {
        gap: 0.4rem;
        padding: 0.6rem;
        flex-direction: row;
    }

    .property-features.ultra-compact {
        gap: 0.3rem;
        padding: 0.4rem;
        flex-direction: row;
    }

    /* Make features more compact on mobile */
    .feature {
        padding: 0.2rem;
        min-width: 0;
        flex: 1;
    }

    .feature.compact {
        padding: 0.1rem;
    }

    .feature.ultra-compact {
        padding: 0.1rem;
    }

    .feature-icon {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .feature-icon.compact {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    .feature-icon.ultra-compact {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .feature-value {
        font-size: 1rem;
    }

    .feature-value.compact {
        font-size: 0.95rem;
    }

    .feature-value.ultra-compact {
        font-size: 0.9rem;
    }

    .feature-text {
        font-size: 0.8rem;
    }

    .feature-text.compact {
        font-size: 0.75rem;
    }

    .feature-text.ultra-compact {
        font-size: 0.7rem;
    }

    .amenities-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights-list {
        grid-template-columns: 1fr;
    }

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

    /* Contact and Footer responsive */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    /* Compact adjustments for mobile */
    .property-card.compact {
        margin-bottom: 1rem;
    }

    .property-image.compact {
        height: 180px;
    }

    .property-image.ultra-compact {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

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

    .section {
        padding: 2rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Ultra compact for small screens */
    .properties-grid.compact {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .property-image.compact {
        height: 160px;
        font-size: 1rem;
    }

    .property-content.compact {
        padding: 1rem;
    }

    .property-title.compact {
        font-size: 1.1rem;
    }

    .property-features.compact {
        padding: 0.5rem;
        margin: 0.5rem 0;
    }
}
