/* ================================================================
   Real Estate Contact Widget — Premium Styles
   Design: Luxury Dark Gold Aesthetic
   ================================================================ */

:root {
    --re-accent:  #C9A96E;
    --re-dark:    #0F1117;
    --re-card:    #181C24;
    --re-text:    #E8E2D9;
    --re-muted:   #8A8F9E;
    --re-border:  rgba(201, 169, 110, 0.18);
    --re-input-bg: #0C0F15;
    --re-radius:  14px;
    --re-shadow:  0 24px 64px rgba(0,0,0,0.55);
    --re-font-display: 'Playfair Display', Georgia, serif;
    --re-font-body:    'DM Sans', 'Segoe UI', sans-serif;
    --re-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Load Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Wrapper ── */
.re-contact-wrap {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    background: var(--re-dark);
    border-radius: 20px;
    padding: 36px;
    font-family: var(--re-font-body);
    color: var(--re-text);
    box-shadow: var(--re-shadow);
    position: relative;
    overflow: hidden;
}

.re-contact-wrap::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(201,169,110,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Left Column ── */
.re-contact-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Agent Card ── */
.re-agent-card {
    background: var(--re-card);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    overflow: hidden;
}

.re-agent-photo-wrap {
    position: relative;
    height: 260px;
    background: linear-gradient(135deg, #1a1e2a 0%, #0f1117 100%);
    overflow: hidden;
}

.re-agent-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.re-agent-card:hover .re-agent-photo {
    transform: scale(1.04);
}

.re-agent-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e2332, #0f1117);
}

.re-agent-photo-placeholder span {
    font-family: var(--re-font-display);
    font-size: 56px;
    font-weight: 600;
    color: var(--re-accent);
    opacity: 0.6;
}

/* Photo gradient overlay */
.re-agent-photo-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--re-card), transparent);
    pointer-events: none;
}

.re-online-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(15,17,23,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(201,169,110,0.3);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--re-text);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.re-online-dot {
    width: 7px;
    height: 7px;
    background: #4CAF50;
    border-radius: 50%;
    animation: re-pulse 2s infinite;
}

@keyframes re-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(76,175,80,0); }
}

.re-agent-info {
    padding: 22px 24px 26px;
}

.re-agent-license {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--re-accent);
    margin: 0 0 6px;
    font-weight: 500;
}

.re-agent-name {
    font-family: var(--re-font-display);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
    line-height: 1.2;
}

.re-agent-title {
    font-size: 13px;
    color: var(--re-muted);
    margin: 0 0 12px;
    font-weight: 400;
}

.re-agent-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.re-stars {
    display: flex;
    gap: 2px;
}

.re-star {
    color: var(--re-accent);
    font-size: 14px;
}

.re-rating-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--re-accent);
}

.re-agent-bio {
    font-size: 13px;
    line-height: 1.7;
    color: var(--re-muted);
    margin: 0 0 20px;
    border-left: 2px solid var(--re-accent);
    padding-left: 12px;
}

/* Stats */
.re-agent-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--re-border);
    border-radius: 10px;
    padding: 14px 0;
    margin-bottom: 20px;
}

.re-stat {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.re-stat-num {
    font-family: var(--re-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--re-accent);
}

.re-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--re-muted);
}

.re-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--re-border);
}

/* Action Buttons */
.re-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.re-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--re-transition);
    cursor: pointer;
    border: none;
    font-family: var(--re-font-body);
}

.re-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.re-btn-primary {
    background: var(--re-accent);
    color: #0F1117;
    font-weight: 600;
}

.re-btn-primary:hover {
    background: #dbbf7e;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201,169,110,0.3);
    color: #0F1117;
}

.re-btn-whatsapp {
    background: rgba(37,211,102,0.1);
    border: 1px solid rgba(37,211,102,0.3);
    color: #25D366;
}

.re-btn-whatsapp:hover {
    background: rgba(37,211,102,0.18);
    transform: translateY(-2px);
    color: #25D366;
}

/* ── Office Card ── */
.re-office-card {
    background: var(--re-card);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 22px 24px;
}

.re-office-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--re-accent);
}

.re-office-header svg {
    width: 16px;
    height: 16px;
    fill: var(--re-accent);
    flex-shrink: 0;
}

.re-office-address {
    font-size: 14px;
    line-height: 1.7;
    color: var(--re-text);
    margin: 0 0 12px;
}

.re-office-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--re-muted);
    margin: 0 0 18px;
}

.re-office-hours svg {
    width: 14px;
    height: 14px;
    fill: var(--re-muted);
    flex-shrink: 0;
}

.re-map-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--re-border);
}

.re-map-wrap iframe {
    display: block;
    filter: grayscale(0.2) invert(0.9) hue-rotate(180deg) brightness(0.85);
}

/* ── Right Panel: Form ── */
.re-contact-right {
    background: var(--re-card);
    border: 1px solid var(--re-border);
    border-radius: var(--re-radius);
    padding: 38px 40px;
    display: flex;
    flex-direction: column;
}

.re-form-header {
    margin-bottom: 32px;
}

.re-form-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(201,169,110,0.12);
    border: 1px solid rgba(201,169,110,0.3);
    color: var(--re-accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.re-form-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--re-accent);
    border-radius: 50%;
    margin-right: 8px;
    animation: re-pulse 2s infinite;
}

.re-form-title {
    font-family: var(--re-font-display);
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}

.re-form-subtitle {
    font-size: 14px;
    color: var(--re-muted);
    margin: 0;
    line-height: 1.6;
}

/* Form Elements */
.re-contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.re-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.re-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.re-form-group label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--re-muted);
}

.re-required {
    color: var(--re-accent);
}

.re-form-group input,
.re-form-group select,
.re-form-group textarea {
    background: var(--re-input-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 14px;
    color: var(--re-text);
    font-family: var(--re-font-body);
    transition: border-color var(--re-transition), box-shadow var(--re-transition);
    outline: none;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.re-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238A8F9E'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

.re-form-group select option {
    background: #181C24;
    color: var(--re-text);
}

.re-form-group input::placeholder,
.re-form-group textarea::placeholder {
    color: rgba(138,143,158,0.5);
}

.re-form-group input:focus,
.re-form-group select:focus,
.re-form-group textarea:focus {
    border-color: var(--re-accent);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.re-form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Form Footer */
.re-form-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 4px;
}

/* Checkbox */
.re-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--re-muted);
    line-height: 1.5;
}

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

.re-checkbox-custom {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 5px;
    background: var(--re-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--re-transition);
    margin-top: 1px;
}

.re-checkbox-wrap input:checked + .re-checkbox-custom {
    background: var(--re-accent);
    border-color: var(--re-accent);
}

.re-checkbox-wrap input:checked + .re-checkbox-custom::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border: 2px solid #0F1117;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg) translateY(-1px);
}

/* Submit Button */
.re-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--re-accent);
    color: #0F1117;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--re-font-body);
    cursor: pointer;
    transition: var(--re-transition);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.re-submit-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.re-submit-btn:hover::before {
    left: 100%;
}

.re-submit-btn:hover {
    background: #dbbf7e;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(201,169,110,0.35);
}

.re-submit-btn:active {
    transform: translateY(0);
}

.re-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.re-btn-arrow {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform var(--re-transition);
}

.re-submit-btn:hover .re-btn-arrow {
    transform: translateX(3px);
}

/* Spinner */
.re-spinner {
    width: 16px;
    height: 16px;
    animation: re-spin 0.8s linear infinite;
}

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

/* Form Message */
.re-form-message {
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    line-height: 1.5;
}

.re-form-message.success {
    background: rgba(76,175,80,0.1);
    border: 1px solid rgba(76,175,80,0.3);
    color: #81C784;
}

.re-form-message.error {
    background: rgba(239,83,80,0.1);
    border: 1px solid rgba(239,83,80,0.3);
    color: #EF9A9A;
}

/* Trust Badges */
.re-trust-badges {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--re-border);
    margin-top: auto;
}

.re-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--re-muted);
    font-weight: 500;
}

.re-badge svg {
    width: 14px;
    height: 14px;
    fill: var(--re-muted);
    flex-shrink: 0;
}

/* ── Reveal Animation ── */
.re-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.re-reveal.re-visible {
    opacity: 1;
    transform: translateY(0);
}

.re-contact-left .re-reveal:nth-child(1) { transition-delay: 0s; }
.re-contact-left .re-reveal:nth-child(2) { transition-delay: 0.12s; }
.re-contact-right.re-reveal               { transition-delay: 0.06s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .re-contact-wrap {
        grid-template-columns: 360px 1fr;
        padding: 28px;
        gap: 22px;
    }
    .re-form-title { font-size: 28px; }
}

@media (max-width: 860px) {
    .re-contact-wrap {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .re-agent-photo-wrap {
        height: 200px;
    }

    .re-contact-right {
        padding: 28px 24px;
    }

    .re-form-title { font-size: 26px; }

    .re-trust-badges {
        flex-wrap: wrap;
        gap: 14px;
    }
}

@media (max-width: 520px) {
    .re-contact-wrap {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .re-form-row {
        grid-template-columns: 1fr;
    }

    .re-agent-stats {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .re-contact-right {
        padding: 24px 18px;
    }
}

/* ── Elementor Editor Overrides ── */
.elementor-editor-active .re-reveal {
    opacity: 1;
    transform: none;
}
