/* 
 * Agence KaRach immobilière - Appended Styles
 * Copy and append the following to assets/css/style.css 
 */

/* =========================================
   UTILITIES
   ========================================= */
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.w-100 { width: 100%; }
.max-w-800 { max-width: 800px; margin: 0 auto; }
.bg-light { background-color: var(--bg-light); }
.bg-gray { background-color: var(--bg-gray); }
.bg-primary { background-color: var(--primary-color); }
.text-white { color: var(--white); }
.text-gold { color: var(--accent-color); }
.pb-0 { padding-bottom: 0 !important; }

/* Sections */
.section { padding: 80px 0; }
/* Global Heading Color Override - Gold Theme */
h1, h2, h3, h4 { color: var(--accent-color) !important; }
.hero-content h1 { color: var(--white) !important; } /* Hero title remains white for contrast */

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--accent-color); /* Gold titles */
}

/* Animations Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px; /* Offset for header */
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Abstract aesthetic background gradient as placeholder. 
       Can be replaced later with generate_image via DB/img */
    background: linear-gradient(135deg, rgba(11,17,32,0.9) 0%, rgba(26,34,53,0.7) 100%),
                url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    z-index: -2;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.78); /* Darker for better contrast */
    z-index: -1;
}
.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}
.hero-content h1 {
    font-size: 3.2rem; /* Shrunk title size */
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--white);
    text-shadow: 2px 2px 15px rgba(0,0,0,0.8);
}
.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
    font-weight: 400;
}
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .hero-actions { flex-direction: column; }
}

/* =========================================
   ABOUT PREVIEW
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-text p { margin-bottom: 15px; font-size: 1.1rem; color: var(--text-secondary); }
.about-image-wrapper { position: relative; }
.about-image {
    width: 100%; height: 500px; border-radius: 8px;
    background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?q=80&w=2075&auto=format&fit=crop') center/cover;
    box-shadow: var(--shadow-lg);
}

/* =========================================
   STATS SECTION
   ========================================= */
.stats-section { padding: 40px 0; border-top: 1px solid var(--border-color); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stat-number { display: block; font-size: 2.5rem; font-family: var(--font-heading); font-weight: 700; color: var(--accent-color); }
.stat-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); }

/* =========================================
   CATEGORIES SECTION
   ========================================= */
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.category-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-bottom: 4px solid transparent;
}
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}
.category-icon { font-size: 3rem; color: var(--accent-color); margin-bottom: 20px; }
.category-card h3 { margin-bottom: 15px; font-size: 1.5rem; color: var(--accent-color); }

/* =========================================
   PROPERTIES CARDS
   ========================================= */
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 30px; margin-top: 40px; }
.property-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}
.property-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.property-img-wrapper { position: relative; height: 250px; overflow: hidden; }
.property-img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.property-card:hover .property-img { transform: scale(1.05); }
.property-placeholder { width: 100%; height: 100%; background: var(--bg-gray); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--text-secondary); }
.property-badge { position: absolute; top: 15px; left: 15px; background: var(--accent-color); color: var(--white); padding: 5px 15px; font-size: 0.8rem; font-weight: 600; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; }
.property-content { padding: 25px; }
.property-price { font-size: 1.5rem; font-family: var(--font-heading); font-weight: 700; color: var(--primary-color); margin-bottom: 10px; }
.property-title { font-size: 1.25rem; margin-bottom: 10px; color: var(--accent-color); }
.property-location { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 15px; display: flex; align-items: center; gap: 5px; }
.property-excerpt { 
    color: var(--text-secondary); 
    font-size: 0.95rem; 
    margin-bottom: 20px; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
.property-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--bg-gray); padding-top: 15px; }
.btn-link { font-weight: 600; color: var(--primary-color); }
.btn-link:hover { color: var(--accent-color); }
.btn-link i { margin-left: 5px; transition: transform var(--transition-fast); }
.btn-link:hover i { transform: translateX(5px); }
.btn-icon { width: 40px; height: 40px; background: #25D366; color: white; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.2rem; }
.btn-icon:hover { background: #128C7E; transform: scale(1.1); color: white; }

/* =========================================
   WHY US & STEPS & TESTIMONIALS
   ========================================= */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; }
.feature-item i { font-size: 3rem; color: var(--accent-color); margin-bottom: 20px; }
.feature-item h3 { color: var(--white); margin-bottom: 15px; }
.feature-item p { color: rgba(255,255,255,0.8); }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.step-item { padding: 30px; position: relative; }
.step-number { width: 60px; height: 60px; background: var(--bg-gray); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-family: var(--font-heading); font-weight: 700; color: var(--accent-color); margin: 0 auto 20px; position: relative; z-index: 2; }
.step-item::after { content: ''; position: absolute; top: 60px; left: 50%; width: 100%; height: 2px; background: var(--bg-gray); z-index: 1; }
.steps-grid .step-item:last-child::after { display: none; }

.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.testimonial-card { background: var(--white); padding: 40px 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.stars { color: #f3c220; margin-bottom: 15px; }
.testimonial-text { font-style: italic; margin-bottom: 20px; color: var(--text-secondary); }
.testimonial-author { font-weight: 600; color: var(--primary-color); }

/* =========================================
   GALLERY & FAQ & CTA
   ========================================= */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 40px; }
.gallery-placeholder { height: 300px; border-radius: 8px; background-size: cover; background-position: center; transition: transform var(--transition-fast); }
.gallery-placeholder:hover { transform: scale(1.03); }
.style-1 { background-image: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?q=80&w=2075&auto=format&fit=crop'); }
.style-2 { background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=2070&auto=format&fit=crop'); }
.style-3 { background-image: url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?q=80&w=2000&auto=format&fit=crop'); }
.style-4 { background-image: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?q=80&w=2070&auto=format&fit=crop'); }

.faq-item { text-align: left; background: var(--white); padding: 25px; border-radius: 8px; margin-bottom: 15px; box-shadow: var(--shadow-sm); }
.faq-question { margin-bottom: 10px; font-size: 1.1rem; }
.faq-answer { color: var(--text-secondary); }

.cta-section { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); color: var(--white); padding: 100px 0; }
.cta-section h2 { color: var(--white); margin-bottom: 20px; }
.cta-section p { margin-bottom: 30px; font-size: 1.1rem; color: rgba(255,255,255,0.8); }

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 992px) {
    .about-grid, .features-grid, .steps-grid, .testimonials-grid { grid-template-columns: 1fr 1fr; }
    .categories-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .step-item::after { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================
   MAP SECTION
   ========================================= */
.map-container {
    max-width: 1000px;
    width: 100%;
    height: 550px;
    margin: 40px auto 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 1.8rem; } /* Compact mobile title */
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .about-grid, .features-grid, .steps-grid, .testimonials-grid, .categories-grid, .gallery-grid, .property-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
    
    /* Ensure brand name doesn't overflow */
    .logo { font-size: 1.1rem; }
    .logo-agence { margin-right: 2px !important; }
}

@media (max-width: 480px) {
    .logo { font-size: 1rem; }
    .whatsapp-floating { width: 50px; height: 50px; font-size: 24px; bottom: 20px; right: 20px; }
}

/* =========================================
   TOP FILTER BAR (Above Navbar)
   ========================================= */
.top-filter-bar {
    background: var(--primary-color);
    border-bottom: none; /* Removed accent-color border to eliminate gap visual */
    position: relative;
    z-index: 1001;
    padding: 10px 0;
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
    transition: margin 0.4s ease;
}

.top-filter-bar.grid-open .filter-controls {
    margin-bottom: 20px;
}

.filter-toggle-btn {
    background: var(--secondary-color);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-secondary);
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-toggle-btn:hover {
    border-color: var(--accent-color);
    color: var(--white);
}

.filter-toggle-btn.active {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Category Mega Grid Toggle */
.category-mega-grid {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.top-filter-bar.grid-open .category-mega-grid {
    max-height: 1000px;
    opacity: 1;
    margin-bottom: 20px;
}

.category-new-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for desktop mega menu feel */
    gap: 1px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.category-new-item {
    background: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-new-item:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.category-new-item i {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.category-new-item span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

/* Add margin reset to ul and p if necessary to prevent layout shifting between them */
.fixed-header-wrapper * {
    margin-block-start: 0;
    margin-block-end: 0;
}
.fixed-header-wrapper ul { margin-bottom: 0; }

/* Adjust header to be right below top filter bar */
.main-header {
    top: 0; /* Changed from 50px since they are now in a wrapper */
}

/* Page spacing for the fixed header/topbar */
body {
    padding-top: 130px; /* top bar + header together */
}

@media (max-width: 992px) {
    .category-new-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-filter-bar { padding: 15px 0; }
    .main-header { left: 0; right: 0; width: 100%; top: 0; } /* Removed top offset */
    body { padding-top: 140px; }
}

@media (max-width: 576px) {
    .whatsapp-floating { width: 50px; height: 50px; font-size: 24px; bottom: 20px; right: 20px; }
}

/* =========================================
   CALLBACK MODAL & FLOATING BUTTON
   ========================================= */

.headset-floating {
    position: fixed;
    bottom: 100px; /* Above whatsapp if it's 30px */
    right: 0;
    width: 60px;
    height: 60px;
    background-color: #0c9e0d;
    color: white;
    border-radius: 8px 0 0 8px; /* Flat on right edge like screenshot */
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: pointer;
    z-index: 1050;
    box-shadow: -2px 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.headset-floating:hover {
    transform: scale(1.05);
}

.callback-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.callback-modal.show {
    display: flex;
    opacity: 1;
}

.callback-modal-content {
    background: #fff;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    padding: 30px 25px;
    position: relative;
    border-top: 5px solid #d4af37; /* Accent color on top */
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.callback-modal.show .callback-modal-content {
    transform: translateY(0);
}

.callback-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.callback-close:hover { color: #333; }

.callback-header { margin-bottom: 20px; }
.support-avatar {
    width: 70px; height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #f0f0f0;
}
.callback-header h3 {
    font-size: 1.3rem; margin-bottom: 5px; color: #111; font-weight: 700;
}
.callback-header p {
    font-size: 0.9rem; color: #007bff; margin: 0; padding: 0 10px;
}

.callback-form input, .callback-form select, .callback-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    outline: none;
    box-sizing: border-box;
}
.callback-form input:focus, .callback-form select:focus, .callback-form textarea:focus {
    border-color: #007bff;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 20px;
    cursor: pointer;
}
.checkbox-container input {
    width: auto; height: auto; margin-top: 4px; margin-right: 10px;
}
.checkbox-text {
    font-size: 0.8rem; color: #666; line-height: 1.4;
}

.btn-submit-callback {
    width: 100%;
    background-color: #2b3a55; /* Dark blue button */
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-submit-callback:hover {
    background-color: #1a2536;
}

/* =========================================
   AGENT RECRUITMENT & PROFILE SECTION
   ========================================= */

.recruitment-section {
    background-color: #f7f9fc;
    padding: 80px 0;
}

.recruitment-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}
.recruitment-title-wrapper h2 {
    font-size: 2.2rem;
    color: #1a2536;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.agent-recruit-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: stretch;
}

.agent-profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.agent-img-wrapper {
    position: relative;
    margin-bottom: 20px;
}
.agent-img-wrapper img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.verified-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.agent-name {
    font-size: 1.8rem;
    color: #2b3a55;
    margin-bottom: 5px;
}
.agent-role {
    font-size: 1rem;
    color: #444;
    margin-bottom: 20px;
}
.agent-bio {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}
.view-profile-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}
.view-profile-btn:hover {
    background-color: #0056b3;
    color: #fff;
}

.recruit-info-card {
    background-color: #2b3a55;
    color: #fff;
    border-radius: 12px;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.recruit-info-card h3 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 25px;
    line-height: 1.4;
}
.recruit-info-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #e0e6ed;
    margin-bottom: 20px;
}
.join-us-action {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 10px;
    margin-bottom: 30px;
    color: #fff;
}
.contact-btn-blue {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
    width: fit-content;
}
.contact-btn-blue:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .agent-recruit-grid { grid-template-columns: 1fr; }
    .recruit-info-card { padding: 30px 20px; text-align: center; align-items: center; }
}

/* =========================================
   CTA SECTION WITH IMAGE
   ========================================= */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
}
.cta-flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: rgba(255,255,255,0.05); /* Slight box effect to contain it */
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.cta-content-box {
    flex: 1;
    text-align: left;
}
.cta-content-box h2 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 2.2rem;
}
.cta-content-box p {
    margin-bottom: 30px;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}
.cta-image-box {
    flex: 1;
    text-align: right;
}
.cta-image-box img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 400px;
    object-fit: cover;
}

@media (max-width: 992px) {
    .cta-flex-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .cta-content-box { text-align: center; }
    .cta-image-box { text-align: center; margin-bottom: 30px; }
    .cta-image-box img { max-height: 300px; }
}
@media(max-width: 992px) {
    .desktop-lang { display: none !important; }
}