/* Lead Generation Custom Styles */

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 2px solid var(--primary-color, #1a1a2e);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #1a1a2e);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%231a1a2e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
}

.lang-select:hover {
    border-color: var(--accent-color, #c8a456);
}

.lang-select:focus {
    outline: none;
    border-color: var(--accent-color, #c8a456);
    box-shadow: 0 0 0 3px rgba(200, 164, 86, 0.2);
}

/* Lead Form Wrapper */
.lead-form-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.lead-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.lead-form-header h3 {
    margin-bottom: 8px;
    color: var(--primary-color, #1a1a2e);
}

.lead-form-header p {
    color: #666;
    font-size: 16px;
}

/* Form Fields */
.lead-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.lead-form-fields-vertical {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lead-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.lead-field input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.lead-field input:focus {
    outline: none;
    border-color: var(--accent-color, #c8a456);
    box-shadow: 0 0 0 4px rgba(200, 164, 86, 0.15);
    background: #fff;
}

.lead-field input::placeholder {
    color: #aaa;
}

.lead-field-btn {
    padding-bottom: 2px;
}

.lead-submit-btn {
    white-space: nowrap;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    min-height: 52px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(200, 164, 86, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(200, 164, 86, 0.7); }
}

/* Trust Indicators */
.lead-form-trust {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.trust-item i {
    font-size: 18px;
    color: #28a745;
}

/* Form Success State */
.form-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 16px;
}

.success-icon i {
    font-size: 64px;
}

.form-success h4 {
    color: #28a745;
    margin-bottom: 12px;
    font-size: 28px;
}

.form-success p {
    color: #555;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.form-success-footer {
    text-align: center;
    padding: 16px 0;
}

.form-success-footer p {
    color: #28a745 !important;
    font-weight: 600;
    font-size: 16px;
}

/* Card Lock Overlay */
.card-lock-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 0 0 12px 12px;
}

.card-lock-overlay i {
    font-size: 24px;
}

.card-lock-overlay span {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-house:hover .card-lock-overlay {
    opacity: 1;
}

/* Properties Hint */
.props-hint {
    color: #888;
    font-size: 16px;
    margin-top: 12px;
}

/* Mid-Page CTA */
.section-mid-cta {
    background: #f8f9fa;
}

.mid-cta-wrapper {
    padding: 0;
}

.mid-cta-stats {
    margin-top: 24px;
}

.stat-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.stat-box h3 {
    color: var(--accent-color, #c8a456);
    margin-bottom: 4px;
}

.stat-box p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.lead-form-mid {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Bottom CTA */
.bottom-cta-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    color: #fff;
}

.bottom-cta-wrapper h2 {
    color: #fff;
    margin-bottom: 16px;
}

.bottom-cta-wrapper p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Accordion */
.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    font-size: 17px;
    padding: 18px 24px;
    color: var(--primary-color, #1a1a2e);
    background: #fff;
}

.accordion-button:not(.collapsed) {
    background: #f8f9fa;
    color: var(--primary-color, #1a1a2e);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #e0e0e0;
}

.accordion-body {
    padding: 0 24px 18px;
}

.accordion-body p {
    color: #555;
    line-height: 1.7;
}

/* Floating CTA (Mobile) */
.floating-cta {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: bottom 0.4s ease;
    display: none;
}

.floating-cta.visible {
    bottom: 0;
}

.floating-cta .tf-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 14px 24px !important;
    font-size: 16px !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* RTL Support */
html[dir="rtl"] .lead-form-fields {
    direction: rtl;
}

html[dir="rtl"] .lang-select {
    background-position: left 10px center;
    padding: 8px 12px 8px 32px;
}

html[dir="rtl"] .trust-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .d-flex {
    direction: rtl;
}

/* Responsive */
@media (max-width: 991px) {
    .lead-form-fields {
        grid-template-columns: 1fr;
    }

    .lead-form-wrapper {
        padding: 24px 20px;
        margin: 0 16px;
    }

    .lead-form-trust {
        flex-wrap: wrap;
        gap: 12px;
    }

    .mid-cta-stats {
        flex-wrap: wrap;
    }

    .stat-box {
        min-width: 80px;
    }

    .bottom-cta-wrapper {
        padding: 40px 24px;
    }

    .floating-cta {
        display: block;
    }

    .lead-form-mid {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .lead-form-header h3 {
        font-size: 22px;
    }

    .lead-form-trust {
        flex-direction: column;
        gap: 8px;
    }

    .trust-item {
        font-size: 13px;
    }

    .bottom-cta-wrapper h2 {
        font-size: 24px;
    }

    .bottom-cta-wrapper p {
        font-size: 15px;
    }

    .mid-cta-stats {
        gap: 10px;
    }

    .stat-box {
        padding: 14px 16px;
    }

    .stat-box h3 {
        font-size: 22px;
    }
}

/* Device Checkboxes */
.lead-field-full {
    grid-column: 1 / -1;
}

.device-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.device-checkbox {
    cursor: pointer;
    margin: 0;
}

.device-checkbox input[type="checkbox"] {
    display: none;
}

.device-chip,
.device-chip-sm {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f8f9fa;
    transition: all 0.2s ease;
    user-select: none;
}

.device-chip-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-width: 1px;
}

.device-checkbox input[type="checkbox"]:checked + .device-chip,
.device-checkbox input[type="checkbox"]:checked + .device-chip-sm {
    border-color: var(--accent-color, #c8a456);
    background: rgba(200, 164, 86, 0.12);
    color: var(--primary-color, #1a1a2e);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(200, 164, 86, 0.2);
}

.device-chip:hover,
.device-chip-sm:hover {
    border-color: #bbb;
    background: #f0f0f0;
}

.device-checkbox input[type="checkbox"]:checked + .device-chip:hover,
.device-checkbox input[type="checkbox"]:checked + .device-chip-sm:hover {
    background: rgba(200, 164, 86, 0.2);
}

.device-checkboxes-footer {
    gap: 6px;
}

.device-checkboxes-footer .device-chip-sm {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}

.device-checkboxes-footer .device-checkbox input[type="checkbox"]:checked + .device-chip-sm {
    border-color: var(--accent-color, #c8a456);
    background: rgba(200, 164, 86, 0.2);
    color: #fff;
}

.device-checkboxes-footer .device-chip-sm:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
}

@media (max-width: 767px) {
    .device-checkboxes {
        gap: 6px;
    }
    .device-chip {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Form validation states */
.lead-field input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.lead-field input.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

.field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.field-error.visible {
    display: block;
}

/* Loading state */
.lead-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.lead-submit-btn.loading span:first-child {
    visibility: hidden;
}

.lead-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Scroll link smooth transitions */
.scroll-link,
.scroll-link-mobile {
    cursor: pointer;
}

/* Lead Popup Modal */
.lead-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lead-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.lead-popup {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.lead-popup-overlay.active .lead-popup {
    transform: translateY(0);
}

.lead-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lead-popup-close:hover {
    color: #333;
    background: #f0f0f0;
}

.lead-popup-header {
    text-align: center;
    margin-bottom: 24px;
}

.lead-popup-header h3 {
    margin-bottom: 6px;
    color: var(--primary-color, #1a1a2e);
}

.lead-popup-header p {
    color: #666;
    font-size: 15px;
}

.lead-popup-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.lead-popup .lead-field-full {
    margin-bottom: 18px;
}

.lead-popup .lead-field-full label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.lead-popup .lead-submit-btn {
    margin-top: 8px;
}

@media (max-width: 540px) {
    .lead-popup {
        padding: 28px 20px;
        border-radius: 16px;
    }
    .lead-popup-fields {
        grid-template-columns: 1fr;
    }
}

/* Footer CTA button */
.footer-newsletter .tf-btn {
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
}

.footer-newsletter .mt_16 {
    margin-top: 16px;
    font-size: 13px;
}

/* Property Detail Popup */
.property-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.property-popup {
    background: #fff;
    border-radius: 20px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.property-popup-overlay.active .property-popup {
    transform: translateY(0);
}

.property-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.5);
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 50%;
    z-index: 5;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-popup-close:hover {
    background: rgba(0,0,0,0.8);
}

.property-popup-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.property-popup-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.property-popup-tags {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
}

.property-popup-tags .tag {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.92);
    color: var(--primary-color, #1a1a2e);
    backdrop-filter: blur(4px);
}

.property-popup-body {
    padding: 28px 32px 32px;
}

.property-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color, #1a1a2e);
    margin-bottom: 6px;
}

.property-popup-address {
    color: #888;
    font-size: 15px;
    margin-bottom: 16px;
}

.property-popup-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-color, #c8a456);
    margin-bottom: 20px;
}

.property-popup-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.property-popup-specs .spec-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f4f5f7;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.property-popup-specs .spec-badge i {
    font-size: 18px;
    color: var(--accent-color, #c8a456);
}

.property-popup-desc {
    color: #555;
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.property-popup-cta {
    text-align: center;
}

.property-popup-trust {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.property-popup-trust i {
    color: #28a745;
    margin-right: 4px;
}

@media (max-width: 640px) {
    .property-popup {
        border-radius: 16px;
    }
    .property-popup-image {
        border-radius: 16px 16px 0 0;
    }
    .property-popup-image img {
        height: 260px;
    }
    .property-popup-body {
        padding: 20px;
    }
    .property-popup-title {
        font-size: 20px;
    }
    .property-popup-price {
        font-size: 22px;
    }
    .property-popup-specs .spec-badge {
        padding: 8px 12px;
        font-size: 13px;
    }
    .property-popup-trust {
        flex-direction: column;
        gap: 8px;
    }
}

/* Intent toggle (radio as chips) */
.intent-toggle {
    gap: 10px;
}

.device-checkbox input[type="radio"] {
    display: none;
}

.device-checkbox input[type="radio"]:checked + .device-chip {
    border-color: var(--accent-color, #c8a456);
    background: rgba(200, 164, 86, 0.12);
    color: var(--primary-color, #1a1a2e);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(200, 164, 86, 0.2);
}

.mb_16 {
    margin-bottom: 16px;
}

/* Property cards clickable state */
.card-house[data-property-index] {
    cursor: pointer;
}