/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --footer-bg: #2c3e50; /* Matching header color */
    --footer-text: #ecf0f1;
    --footer-link-hover: #e74c3c;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-brand i {
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section .search-form {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
}

/* Property Cards */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.property-card img {
    transition: transform 0.5s ease;
}

.property-card:hover img {
    transform: scale(1.1);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

/* Price Tag */
.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Property Details Page */
.property-gallery {
    position: relative;
}

.gallery-thumbnail {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list i {
    color: var(--secondary-color);
    width: 20px;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Blog Cards */
.blog-card {
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: none;
    margin: 0 5px;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.pagination .page-link:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Admin Panel */
.admin-sidebar {
    background: var(--primary-color);
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* Footer Styles - Matching Header Blue */
footer {
    background-color: var(--primary-color);
    color: var(--footer-text);
    margin-top: 50px;
    width: 100%;
}

.footer {
    background-color: var(--primary-color);
    color: var(--footer-text);
}

.footer-top {
    padding: 50px 0 30px;
    background-color: var(--primary-color);
}

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-widget h5 i {
    color: var(--secondary-color);
    margin-right: 8px;
}

.footer-text {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--footer-link-hover);
    padding-left: 5px;
}

.footer-links i {
    color: var(--secondary-color);
    margin-right: 8px;
    font-size: 12px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.7);
}

.footer-contact li i {
    color: var(--secondary-color);
    font-size: 18px;
    margin-top: 3px;
    min-width: 20px;
}

.footer-contact li span {
    flex: 1;
    line-height: 1.6;
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright {
    color: rgba(255,255,255,0.6);
    margin: 0;
    font-size: 14px;
}

.footer-bottom-links {
    text-align: right;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--footer-link-hover);
}

/* Social Links in Footer */
.footer .social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer .social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Newsletter Form in Footer */
.footer .newsletter-form {
    margin-top: 15px;
}

.footer .newsletter-form .input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer .newsletter-form input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: white;
}

.footer .newsletter-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.footer .newsletter-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255,255,255,0.15);
}

.footer .newsletter-form button {
    padding: 10px 25px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer .newsletter-form button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-widget {
        text-align: center;
    }
    
    .footer-widget h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-bottom-links {
        text-align: center;
        margin-top: 10px;
    }
    
    .footer-bottom-links a {
        margin: 0 10px;
    }
    
    .footer .social-links {
        justify-content: center;
    }
    
    .footer .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .footer .newsletter-form input,
    .footer .newsletter-form button {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: 500px !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .property-card {
        margin-bottom: 20px;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 400px !important;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .search-form .row > div {
        margin-bottom: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top: 3px solid var(--secondary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Mobile menu improvements */
@media (max-width: 768px) {
    .admin-sidebar {
        left: -280px;
        transition: left 0.3s ease;
        box-shadow: none;
    }
    
    .admin-sidebar.show {
        left: 0;
        box-shadow: 2px 0 20px rgba(0,0,0,0.3);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .toggle-sidebar {
        display: block !important;
        z-index: 1001;
    }
    
    .user-info.d-none {
        display: none !important;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Ensure toggle button is visible */
.toggle-sidebar {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 10px;
    margin: -10px;
}

.toggle-sidebar:hover {
    color: #667eea;
}

@media (min-width: 769px) {
    .toggle-sidebar {
        display: block;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1000;
    box-shadow: 0 3px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}