/* Professional Real Estate Rentals Theme */

:root {
    --primary: #2c3e50;
    --secondary: #5dade2; /* calmer blue instead of orange */
    --accent: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Footer disclaimer styling */
.site-disclaimer {
    background: #343a40 !important; /* dark background for contrast */
}
.site-disclaimer p,
.site-disclaimer .text-muted {
    color: #ffffff !important;
    opacity: 0.95;
}

/* global font */
body {
    font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* ============= NAVBAR / HEADER ============= */
/* ensure page content starts below the fixed navbar */
body {
    padding-top: 70px; /* space for navbar height */
}

.navbar {
    background: transparent;
    box-shadow: none;
    padding: 1rem 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
    box-shadow: var(--shadow-lg);
}

/* ============= CALL-TO-ACTION BANNER ============= */
.call-banner {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
}
.call-banner a {
    color: white;
    text-decoration: underline;
}

/* floating whatsapp button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.2s ease;
}
.whatsapp-float:hover {
    transform: scale(1.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============= HERO / PAGE HEADERS ============= */
.page-header,
.listing-page-header {
    /* background image colors plus overlay */
    background: linear-gradient(135deg, rgba(44,62,80,0.7) 0%, rgba(52,152,219,0.7) 100%), url('assets/img/hero.jpg') center/cover no-repeat;
    color: white;
    min-height: 500px;
    position: relative;
    padding: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .page-header,
    .listing-page-header {
        min-height: 300px;
    }
    .page-header .header-content,
    .listing-page-header .header-content {
        padding: 1rem;
    }
    .page-header h1,
    .listing-page-header h1 {
        font-size: 1.8rem;
    }
    .page-header .subtitle,
    .listing-page-header .subtitle {
        font-size: 1rem;
    }
}
.listing-page-header {
    background-size: cover;
}
.page-header .header-content,
.listing-page-header .header-content {
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}
.page-header .subtitle,
.listing-page-header .subtitle {
    font-size: 1.3rem;
}
.page-header::after,
.listing-page-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
}

/* listing gallery grid */
.listing-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
    gap: 0.5rem;
}
.listing-gallery .gallery-item {
    background-size: cover;
    background-position: center;
    padding-bottom: 75%;
    border-radius: 8px;
}

/* ============= SEARCH SECTION (homepage) ============= */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
}
.search-section .form-control,
.search-section .form-select {
    border-radius: 50px;
}

/* ensure the search button is wide enough and text doesn't wrap */
.search-section .btn {
    white-space: nowrap;
    min-width: 120px;
}

/* on smaller screens, allow the button to grow and avoid cutting text */
@media (max-width: 767px) {
    .search-section .btn {
        min-width: 0;
    }
    .search-section .row {
        flex-wrap: wrap;
    }
    .search-section .col-md-4,
    .search-section .col-md-3,
    .search-section .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .search-section {
        padding: 1rem;
    }
    .btn, .form-control, .form-select {
        padding: 1rem 0.75rem;
        font-size: 1rem;
    }
}

.search-section .form-label {
    font-weight: 600;
    color: var(--dark);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ============= CARDS ============= */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    word-wrap: break-word;
}
@media (max-width: 767px) {
    .card {
        margin-bottom: 1rem;
    }
}
.card:hover {
    transform: scale(1.03);
}
.card .price-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 1rem;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.price-badge {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0.5rem 0;
}

/* ============= BUTTONS ============= */
.btn {
    border: none;
    border-radius: 6px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-primary {
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #229954;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    color: white;
}

.btn-warning {
    background: var(--secondary);
    color: white;
}

.btn-warning:hover {
    background: var(--secondary);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* ============= FORMS ============= */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.form-check-input {
    cursor: pointer;
    border: 2px solid var(--border-color);
    width: 1.3em;
    height: 1.3em;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* ============= ALERTS ============= */
.alert {
    border: none;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left-color: var(--success);
}

.alert-danger {
    background-color: #fadbd8;
    color: var(--danger);
    border-left-color: var(--danger);
}

.alert-warning {
    background-color: #fdeaa8;
    color: #d68910;
    border-left-color: var(--secondary);
}

.alert-info {
    background-color: #d6eaf8;
    color: var(--accent);
    border-left-color: var(--accent);
}

/* ============= TABLES ============= */
.table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
    color: white;
    font-weight: 700;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table th {
    padding: 1.2rem 1rem;
    border: none;
}

/* ============= ADMIN DASHBOARD ============= */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary) 0%, #34495e 100%);
    min-height: 100vh;
    padding: 2rem 0 !important;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.admin-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.admin-header h1 {
    margin-bottom: 0.3rem;
}

.admin-header .subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ============= LISTING DETAILS ============= */
.listing-detail {
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
@media (max-width: 767px) {
    .listing-detail {
        padding: 0.5rem;
    }
}

.listing-detail h1 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.listing-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.listing-gallery img {
    border-radius: 6px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.listing-gallery img:hover {
    transform: scale(1.05);
}

.listing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid var(--accent);
}

.feature-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============= CONTACT FORM ============= */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.contact-form h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* ============= PAGINATION ============= */
.pagination {
    gap: 0.5rem;
}

.page-link {
    color: var(--accent);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

.page-link:hover {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
}

/* ============= FILTER SECTION ============= */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ============= FOOTER ============= */
footer {
    background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* ============= UTILITIES ============= */
.text-secondary {
    color: var(--secondary) !important;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #2980b9 100%);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-sidebar {
        padding: 1rem 0 !important;
    }
    
    .admin-sidebar .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .listing-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .listing-features {
        grid-template-columns: repeat(2, 1fr);
    }
}
