:root {
    --primary-color: #fd5c63;
    --primary-hover: #e04b52;
    --secondary-color: #171b2a;
    --text-color: #555555;
    --light-bg: #f7f7f7;
    --white: #ffffff;
    --nav-height: 80px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.3;
}

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

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

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

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(253, 92, 99, 0.3);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    padding: 12px 28px;
    border: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 92, 99, 0.3);
}

.btn-light-custom {
    background: var(--white);
    color: var(--primary-color);
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-light-custom:hover {
    background: var(--light-bg);
    color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-color);
}

.navbar {
    background-color: var(--secondary-color) !important;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
}

.navbar-brand {
    color: var(--white) !important;
    font-size: 24px;
    font-weight: 700;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 15px;
    margin: 0 10px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-link {
    transition: var(--transition);
}

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

.add-listing-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.add-listing-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 92, 99, 0.3);
}

.hero-section {
    background:
        linear-gradient(rgba(23, 27, 42, 0.7), rgba(23, 27, 42, 0.7)),
        url('https://images.pexels.com/photos/323780/pexels-photo-323780.jpeg?auto=compress&cs=tinysrgb&w=1600');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 180px 0 120px;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.animate-fade-in {
    animation: fadeIn 1s ease;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease 0.3s both;
}

.animate-slide-up {
    animation: slideUp 1s ease 0.6s both;
}

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

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

.search-box-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(10px);
    max-width: 900px;
    width: 100%;
    margin: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.search-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.search-btn-tab {
    background: var(--light-bg);
    border: 2px solid transparent;
    color: var(--text-color);
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 8px;
    flex: 1;
    font-weight: 600;
    transition: var(--transition);
}

.search-btn-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-btn-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.search-form-inner {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form-inner input {
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    outline: none;
    flex: 1;
    min-width: 200px;
    font-size: 14px;
    color: var(--text-color);
    border-radius: 8px;
    transition: var(--transition);
}

.search-form-inner input:focus {
    border-color: var(--primary-color);
}

.search-submit-btn {
    background: var(--primary-color);
    border: none;
    padding: 12px 25px;
    color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-submit-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.featured-properties {
    background-color: var(--white);
}

.property-card {
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.property-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

.property-card:hover .property-img img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 15px;
    padding: 6px 12px;
    border-radius: 5px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.badge-featured {
    left: 15px;
    background-color: var(--secondary-color);
}

.badge-sale {
    left: 105px;
    background-color: var(--primary-color);
}

.badge-rent {
    left: 105px;
    background-color: #28a745;
}

.price-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.property-action {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    opacity: 0;
    z-index: 2;
    transform: translateY(10px);
    transition: var(--transition);
}

.property-card:hover .property-action {
    opacity: 1;
    transform: translateY(0);
}

.property-action a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.property-action a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.property-action a.active {
    background: var(--primary-color);
    color: var(--white);
}

.property-content {
    padding: 20px;
    flex: 1;
}

.property-type {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.property-title {
    margin: 10px 0;
}

.property-title a {
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.property-title a:hover {
    color: var(--primary-color);
}

.property-address {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.property-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.property-features span {
    font-size: 14px;
    color: var(--text-color);
}

.divider {
    height: 1px;
    background: #eee;
}

.property-agent {
    padding: 15px 20px;
}

.property-agent img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
}

.city-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

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

.city-card:hover img {
    transform: scale(1.15);
}

.city-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: var(--transition);
}

.city-card:hover .city-overlay {
    background: linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.85));
}

.city-info h4 {
    color: white;
    margin-bottom: 5px;
    font-size: 28px;
}

.city-info p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 16px;
}

.feature-box {
    padding: 40px 20px;
    transition: var(--transition);
    border-radius: 15px;
}

.feature-box:hover {
    background: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(253, 92, 99, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.feature-box:hover .icon-wrapper {
    background: var(--primary-color);
    color: white;
    transform: rotateY(360deg);
}

.feature-box h4 {
    margin: 20px 0 10px;
    font-size: 20px;
}

.article-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}

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

.article-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

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

.article-card:hover .article-img img {
    transform: scale(1.15);
}

.article-content {
    padding: 25px;
}

.tag {
    background: var(--primary-color);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
}

.article-content h4 {
    color: var(--secondary-color);
    font-size: 18px;
    line-height: 1.5;
    transition: var(--transition);
    margin-bottom: 15px;
}

.article-card:hover .article-content h4 {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-meta .author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author span {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
}

.date {
    font-size: 13px;
    color: var(--text-color);
}

.partner-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.partner-slide img {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
    cursor: pointer;
}

.partner-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 0;
}

.cta-section h2 {
    color: var(--white);
    font-size: 36px;
}

.footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 80px 0 20px;
}

.footer h4 {
    margin-bottom: 25px;
    color: var(--white);
    font-size: 20px;
}

.footer p {
    font-size: 15px;
    line-height: 1.8;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

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

.subscribe-form {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    overflow: hidden;
}

.subscribe-form input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: white;
    outline: none;
}

.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.subscribe-form button {
    background: var(--primary-color);
    border: none;
    width: 50px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background: var(--primary-hover);
}

.footer-bottom {
    margin-top: 60px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

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

@media (max-width: 1199px) {
    .hero-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 32px;
    }
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .search-box-container {
        padding: 25px;
    }

    .search-form-inner {
        flex-direction: column;
    }

    .search-form-inner input {
        min-width: 100%;
    }

    .header-btn {
        margin-top: 15px;
        justify-content: center;
    }

    .navbar-collapse {
        background: var(--secondary-color);
        padding: 20px;
        border-radius: 10px;
        margin-top: 15px;
    }

    .nav-link {
        margin: 5px 0;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .search-btns {
        flex-direction: column;
    }

    .city-card {
        height: 250px;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 28px;
    }

    .search-box-container {
        padding: 20px;
    }

    .property-card {
        margin-bottom: 20px;
    }

    .footer {
        padding: 50px 0 20px;
    }
}
