/* Custom Styles */
:root {
    --primary: #4F73C1;
    --primary-dark: #3a5a95;
    --accent: #7BA3DB;
    --accent-light: #D6E0F1;
    --dark: #000000;
    --darker: #000000;
    --light: #F8F8F8;
    /* Override Bootstrap variables */
    --bs-primary: #4F73C1;
    --bs-primary-rgb: 79, 115, 193;
    --bs-primary-bg-subtle: rgba(79,115,193,0.1);
    --bs-primary-border-subtle: rgba(79,115,193,0.3);
    --bs-primary-text-emphasis: #4F73C1;
    --bs-btn-bg: #4F73C1;
    --bs-btn-border-color: #4F73C1;
    --bs-btn-hover-bg: #7BA3DB;
    --bs-btn-hover-border-color: #7BA3DB;
    --bs-btn-active-bg: #3a5a95;
    --bs-btn-active-border-color: #3a5a95;
}

* {
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #fafafa;
    color: #333;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.navbar-brand img {
    transition: height 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 50px;
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

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

/* Top Bar */
.top-bar {
    background: var(--primary);
}

/* Buttons */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 15px rgba(79,115,193,0.3);
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,115,193,0.4);
}

.btn-outline-primary {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-light {
    background: #ffffff !important;
    color: var(--primary) !important;
}

.btn-light:hover {
    background: #ffffff !important;
    color: var(--primary) !important;
}

.btn-outline-light {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.btn-outline-light:hover {
    background: #ffffff !important;
    color: var(--primary) !important;
    border-color: #ffffff !important;
}

/* Bootstrap overrides */
.bg-primary {
    background-color: var(--primary) !important;
}

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

/* Hero Section */
.hero-section {
    background-color: var(--primary);
    background-image: url('https://images.unsplash.com/photo-1613977257363-707ba9348227?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    color: white;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Property Card */
.property-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.property-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.property-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.property-card .featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(123, 163, 219, 0.4);
}

/* Section Headings */
.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-subtitle {
    color: var(--secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Stats Section */
.stats-section {
    background: var(--primary);
    padding: 4.5rem 0;
    border-radius: 30px;
    margin: 3rem;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

/* Agent Card */
.agent-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
}

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

.agent-card img {
    height: 220px;
    object-fit: cover;
}

/* Footer */
footer {
    background: var(--light);
    color: var(--dark);
}

footer h4, footer h5 {
    color: var(--primary);
}

footer a {
    color: var(--dark);
}

footer a:hover {
    color: #7BA3DB;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    margin-right: 10px;
    transition: all 0.3s;
}

footer .social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 4px 20px rgba(79,115,193,0.4);
    border: none;
    display: none;
    z-index: 1000;
    transition: all 0.3s;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(79,115,193,0.5);
}

/* Property Details */
.property-gallery img {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Services Section */
.service-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s;
    background: white;
}

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

.service-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: rgba(79,115,193,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 2.5rem;
}

/* FAQ Accordion */
.accordion-button {
    border-radius: 12px;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: rgba(79,115,193,0.1);
    color: var(--primary);
    box-shadow: none;
}

.accordion-item {
    border: none;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Gallery */
.gallery-item img {
    border-radius: 16px;
    transition: all 0.4s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.gallery-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Cards */
.card {
    border: none;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1rem;
}

/* Chip Inputs (Features & Amenities) */
.chip-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #4F73C1;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}
.chip-tag:hover {
    background-color: #e74c3c;
}
.chip-tag i {
    font-size: 10px;
    opacity: 0.85;
}
.chip-input {
    flex: 1;
    min-width: 140px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 4px 6px !important;
    font-size: 14px;
}
.chip-input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* Admin Gallery Upload Rows */
.gallery-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}
.gallery-upload-row .gfile {
    flex: 1;
    min-width: 0;
}
.gallery-thumb {
    width: 64px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gx-remove {
    flex-shrink: 0;
}

/* Existing gallery rows in admin */
.gallery-existing-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.gallery-existing-row img {
    width: 64px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.gallery-existing-row .gal-path {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
}
.gallery-existing-row button {
    flex-shrink: 0;
}

/* Cover image upload wrapper */
.cover-upload-wrap {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.cover-main-img {
    width: 220px;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.cover-main-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}
.cover-upload-info {
    flex: 1;
    min-width: 240px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .stats-section {
        margin: 1rem;
        padding: 3rem 0;
    }
    .stat-item h3 {
        font-size: 2.5rem;
    }
    .cover-main-img {
        width: 100%;
        height: 200px;
    }
}
