/* ================================================================
   CONTACT US PAGE — aft-contact-* namespace
   ================================================================ */

/* ── Hero ── */
.aft-contact-hero {
    position: relative;
    width: 100%;
    padding: calc(var(--header-h) + 40px) 20px 48px;
    background: linear-gradient(165deg, #f0f4ff 0%, #e8eeff 40%, #f0f0ff 70%, #f5f3ff 100%);
    overflow: hidden;
}
/* CAPTCHA Container */
.aft-contact-captcha-container {
    margin: 20px 0;
    min-height: 78px;
}

.aft-contact-captcha {
    display: none;
    /* Will be shown by JavaScript after rendering */
}

.aft-contact-captcha--loaded {
    display: block !important;
}

/* Style the reCAPTCHA container */
#aft-recaptcha-container {
    display: none;
    margin: 10px 0;
}

#aft-recaptcha-container.g-recaptcha {
    display: block !important;
}

/* Make sure reCAPTCHA fits on mobile */
@media (max-width: 480px) {
    .aft-contact-captcha-container {
        transform: scale(0.85);
        transform-origin: left top;
        margin: 15px 0;
        min-height: 70px;
    }
}
html.dark-theme .aft-contact-hero {
    background: linear-gradient(165deg, #0f1117 0%, #141a2a 40%, #1e1b4b 70%, #1a1035 100%);
}

.aft-contact-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.aft-contact-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.aft-contact-hero-glow--1 {
    width: 400px;
    height: 400px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(99,102,241,0.3), transparent 70%);
}

.aft-contact-hero-glow--2 {
    width: 300px;
    height: 300px;
    bottom: -60px;
    left: -60px;
    background: radial-gradient(circle, rgba(139,92,246,0.25), transparent 70%);
}

html.dark-theme .aft-contact-hero-glow--1 {
    opacity: 0.25;
}
html.dark-theme .aft-contact-hero-glow--2 {
    opacity: 0.2;
}

.aft-contact-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* Badge */
.aft-contact-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(99,102,241,0.10);
    border: 1px solid rgba(99,102,241,0.20);
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.aft-contact-hero-badge i {
    font-size: 0.7rem;
}

/* Title */
.aft-contact-hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.aft-contact-hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 auto 0;
    max-width: 640px;
}

/* ── Main Layout ── */
.aft-contact-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}

@media (min-width: 768px) {
    .aft-contact-main {
        padding: 56px 32px 72px;
    }
}

.aft-contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 992px) {
    .aft-contact-layout {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }
}

/* ── Form ── */
.aft-contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .aft-contact-form-wrapper {
        padding: 40px 36px;
    }
}

.aft-contact-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(99,102,241,0.15);
    position: relative;
}

.aft-contact-form-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* Honeypot */
.aft-contact-honeypot {
    display: none !important;
}

/* Form Fields */
.aft-contact-field {
    position: relative;
    margin-bottom: 28px;
}

.aft-contact-field input,
.aft-contact-field select,
.aft-contact-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.aft-contact-field input:focus,
.aft-contact-field select:focus,
.aft-contact-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.06);
}

.aft-contact-field input::placeholder,
.aft-contact-field textarea::placeholder {
    color: transparent;
}

.aft-contact-field label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    background: var(--bg);
    padding: 0 6px;
    transition: all 0.25s ease;
    border-radius: 4px;
}

.aft-contact-field textarea + label {
    top: 18px;
    transform: none;
}

.aft-contact-field input:focus + label,
.aft-contact-field input:not(:placeholder-shown) + label,
.aft-contact-field select:focus + label,
.aft-contact-field select:not(:placeholder-shown) + label,
.aft-contact-field textarea:focus + label,
.aft-contact-field textarea:not(:placeholder-shown) + label {
    top: 0;
    left: 12px;
    font-size: 0.75rem;
    color: var(--accent);
    transform: translateY(-50%);
}

.aft-contact-field textarea:focus + label,
.aft-contact-field textarea:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
}

.aft-contact-field select {
    appearance: none;
    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 fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.aft-contact-field select option {
    background: var(--bg-card);
    color: var(--text);
}

.aft-contact-field textarea {
    resize: vertical;
    min-height: 130px;
}

/* CAPTCHA */
.aft-contact-captcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    min-height: 78px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aft-contact-captcha--loaded {
    opacity: 1;
}

/* Submit Button */
.aft-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.aft-contact-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

.aft-contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.aft-contact-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Sidebar / Reasons ── */
.aft-contact-sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
}

@media (min-width: 992px) {
    .aft-contact-sidebar-title {
        font-size: 1.5rem;
    }
}

.aft-contact-reason {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.aft-contact-reason:hover {
    transform: translateX(4px);
    border-color: rgba(99,102,241,0.2);
}

.aft-contact-reason--email {
    background: rgba(99,102,241,0.04);
    border-color: rgba(99,102,241,0.10);
}

.aft-contact-reason-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99,102,241,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--accent);
}

.aft-contact-reason-content {
    flex: 1;
    min-width: 0;
}

.aft-contact-reason-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.aft-contact-reason-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.aft-contact-reason-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.aft-contact-reason-text a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── FAQ Section ── */
.aft-contact-faq {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.aft-contact-faq-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin: 0 0 28px;
}

@media (min-width: 768px) {
    .aft-contact-faq-title {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }
}

.aft-contact-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.aft-contact-faq-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
}

.aft-contact-faq-question {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    position: relative;
    padding-right: 48px;
    transition: background 0.2s;
    font-size: 0.95rem;
    display: block;
}

.aft-contact-faq-question::-webkit-details-marker {
    display: none;
}

.aft-contact-faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 300;
    line-height: 1;
}

.aft-contact-faq-item[open] .aft-contact-faq-question::after {
    content: '-';
}

.aft-contact-faq-question:hover {
    background: rgba(99,102,241,0.03);
}

.aft-contact-faq-answer {
    padding: 0 20px 18px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.92rem;
}

.aft-contact-faq-answer p:last-child {
    margin-bottom: 0;
}

/* ── Notification Popup ── */
.aft-contact-notification {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(4px);
}

.aft-contact-notification--show {
    opacity: 1;
    visibility: visible;
}

.aft-contact-notification-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.aft-contact-notification--show .aft-contact-notification-inner {
    transform: translateY(0) scale(1);
}

.aft-contact-notification-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.aft-contact-notification-close:hover {
    background: var(--bg);
}

.aft-contact-notification-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
}

.aft-contact-notification-icon.success {
    background: rgba(99,102,241,0.12);
    color: var(--accent);
    border: 2px solid rgba(99,102,241,0.25);
}

.aft-contact-notification-icon.error {
    background: rgba(239,68,68,0.10);
    color: #ef4444;
    border: 2px solid rgba(239,68,68,0.20);
}

.aft-contact-notification-icon.warning {
    background: rgba(234,179,8,0.10);
    color: #eab308;
    border: 2px solid rgba(234,179,8,0.20);
}

.aft-contact-notification-inner h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.aft-contact-notification-inner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.aft-contact-notification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 28px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.aft-contact-notification-btn.success {
    background: var(--accent);
    color: #fff;
}

.aft-contact-notification-btn.success:hover {
    background: var(--accent-hover);
}

.aft-contact-notification-btn.error {
    background: rgba(239,68,68,0.10);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.20);
}

.aft-contact-notification-btn.error:hover {
    background: rgba(239,68,68,0.18);
}

.aft-contact-notification-btn.warning {
    background: rgba(234,179,8,0.10);
    color: #eab308;
    border: 1px solid rgba(234,179,8,0.20);
}

.aft-contact-notification-btn.warning:hover {
    background: rgba(234,179,8,0.18);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .aft-contact-hero {
        padding: calc(var(--header-h) + 24px) 16px 36px;
    }
    
    .aft-contact-hero-title {
        font-size: 1.8rem;
    }
    
    .aft-contact-hero-sub {
        font-size: 0.95rem;
    }
    
    .aft-contact-main {
        padding: 32px 16px 48px;
    }
    
    .aft-contact-form-wrapper {
        padding: 24px 18px;
    }
    
    .aft-contact-field input,
    .aft-contact-field select,
    .aft-contact-field textarea {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .aft-contact-reason {
        padding: 14px 16px;
    }
    
    .aft-contact-reason-icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .aft-contact-hero {
        padding: calc(var(--header-h) + 16px) 12px 28px;
    }
    
    .aft-contact-hero-title {
        font-size: 1.5rem;
    }
    
    .aft-contact-hero-sub {
        font-size: 0.88rem;
    }
    
    .aft-contact-main {
        padding: 24px 12px 40px;
    }
    
    .aft-contact-form-wrapper {
        padding: 20px 14px;
    }
    
    .aft-contact-form-title {
        font-size: 1.2rem;
    }
    
    .aft-contact-layout {
        gap: 32px;
    }
    
    .aft-contact-field {
        margin-bottom: 20px;
    }
    
    .aft-contact-field input,
    .aft-contact-field select,
    .aft-contact-field textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .aft-contact-field label {
        font-size: 0.82rem;
    }
}