/* ============================================
   CONTACT PAGE
   Card-first flow + dual funnel + submission overlay
   ============================================ */

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 60px 0 80px;
}

/* ===== HERO ===== */
.contact-hero {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.contact-hero h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 800;
}

.contact-hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   TWO CARDS
   ============================================ */
.contact-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.contact-card {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 40px 32px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover,
.contact-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
}

.contact-card:hover::before,
.contact-card:focus-visible::before {
    opacity: 1;
}

.contact-card-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(233, 175, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon,
.contact-card:focus-visible .contact-card-icon {
    background: rgba(233, 175, 0, 0.18);
    transform: scale(1.05);
}

.card-pi .contact-card-icon {
    background: rgba(220, 80, 80, 0.1);
    color: #e05a5a;
}

.card-pi:hover .contact-card-icon,
.card-pi:focus-visible .contact-card-icon {
    background: rgba(220, 80, 80, 0.18);
}

.contact-card-title {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.contact-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.contact-card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
    flex: 1;
}

.contact-card-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 4px 0 4px 20px;
    position: relative;
    line-height: 1.5;
}

.contact-card-list li::before {
    content: "▸";
    position: absolute;
    left: 4px;
    color: var(--gold);
    font-weight: bold;
    font-size: 0.75rem;
}

.contact-card-phone {
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 20px;
}

.phone-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.phone-number {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.phone-number i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.phone-number:hover {
    color: var(--gold-light);
    transform: scale(1.03);
    text-decoration: none;
}

.contact-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

/* Ensure interactive children remain clickable */
.contact-card [data-no-card-click],
.contact-card .js-send-msg {
    position: relative;
    z-index: 3;
}

/* Non-interactive parts should not show a text cursor */
.contact-card h2,
.contact-card p,
.contact-card ul,
.contact-card li {
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    width: 100%;
}

.btn-card-primary {
    background: var(--gold);
    color: var(--dark-bg);
}

.btn-card-primary:hover {
    background: var(--gold-light);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 175, 0, 0.3);
    text-decoration: none;
}

.btn-card-secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(233, 175, 0, 0.4);
}

.btn-card-secondary:hover {
    background: rgba(233, 175, 0, 0.08);
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-card-secondary i {
    transition: transform 0.2s ease;
}

.btn-card-secondary:hover i {
    transform: translateX(4px);
}

/* ============================================
   SELECTED-TYPE BANNER
   ============================================ */
.selection-banner {
    max-width: 720px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(233, 175, 0, 0.08), rgba(233, 175, 0, 0.03));
    border: 1px solid rgba(233, 175, 0, 0.25);
    border-radius: var(--radius);
    padding: 20px 24px;
    animation: bannerFadeIn 0.4s ease;
}

@keyframes bannerFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.selection-banner-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.selection-banner-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(233, 175, 0, 0.15);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.selection-banner-text {
    flex: 1;
}

.selection-banner-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 0 0 4px;
    font-weight: 600;
}

.selection-banner-value {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 700;
    margin: 0 0 6px;
}

.selection-banner-reset {
    background: none;
    border: none;
    padding: 0;
    color: var(--gold);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.selection-banner-reset:hover {
    color: var(--gold-light);
}

/* ============================================
   FORM WRAPPER
   ============================================ */
.contact-form-wrapper {
    max-width: 720px;
    margin: 0 auto 60px;
}

.form-card {
    background: var(--dark-card, #162d4a);
    border-radius: var(--radius, 12px);
    padding: 40px 35px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-card h2 {
    font-size: 1.5rem;
    color: var(--text-light, #e8edf3);
    margin-bottom: 4px;
}

.form-subtitle {
    color: var(--text-muted, #8aa3c0);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ===== HONEYPOT ===== */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: var(--text-light, #e8edf3);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.form-group .required {
    color: #f44336;
}

.form-group .optional {
    color: var(--text-muted, #8aa3c0);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--dark-bg, #0a1a2b);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-light, #e8edf3);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--gold, #e9af00);
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 175, 0, 0.08);
}

.form-control.error {
    border-color: #f44336;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted, #8aa3c0);
    opacity: 0.4;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

.error-text {
    display: block;
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ============================================
   MASS TORT CONDITIONAL FIELDS
   ============================================ */
.mt-fields {
    background: rgba(233, 175, 0, 0.04);
    border: 1px solid rgba(233, 175, 0, 0.2);
    border-radius: 8px;
    padding: 20px 20px 8px;
    margin: 8px 0 18px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mt-fields-visible {
    opacity: 1;
    transform: translateY(0);
}

.mt-fields-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.mt-fields-header i {
    font-size: 1rem;
}

/* ===== MATH CAPTCHA ===== */
.captcha-group {
    margin: 20px 0 18px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light, #e8edf3);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.captcha-hint {
    font-size: 0.75rem;
    color: var(--text-muted, #8aa3c0);
    font-weight: 400;
    opacity: 0.6;
}

.captcha-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.captcha-input {
    max-width: 120px;
}

.captcha-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-muted, #8aa3c0);
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: inherit;
}

.captcha-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold, #e9af00);
    border-color: var(--gold, #e9af00);
}

/* ===== SUBMIT BUTTON ===== */
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 44px;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    background: var(--gold, #e9af00);
    color: var(--dark-bg, #0a1a2b);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--gold-light, #f5d742);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 175, 0, 0.2);
}

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert i {
    font-size: 1.3rem;
    margin-top: 2px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.alert-success strong {
    display: block;
    color: #4CAF50;
    font-weight: 600;
}

.alert-success p {
    color: var(--text-muted, #8aa3c0);
    margin: 0;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.alert-error strong {
    display: block;
    color: #f44336;
    font-weight: 600;
}

.alert-error p {
    color: var(--text-muted, #8aa3c0);
    margin: 0;
    font-size: 0.9rem;
}

/* ============================================
   OFFICES
   ============================================ */
.contact-info h2 {
    font-size: 1.8rem;
    color: var(--text-light, #e8edf3);
    margin-bottom: 4px;
}

.contact-tagline {
    color: var(--text-muted, #8aa3c0);
    font-size: 0.95rem;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.offices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.office-block {
    margin-bottom: 28px;
}

.office-block h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold, #e9af00);
    margin-bottom: 6px;
}

.office-block p {
    color: var(--text-muted, #8aa3c0);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.office-block .office-phone a {
    color: var(--text-light, #e8edf3);
    text-decoration: none;
    transition: color 0.3s;
}

.office-block .office-phone a:hover {
    color: var(--gold, #e9af00);
}

.office-hours {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted, #8aa3c0);
    font-size: 0.9rem;
}

.office-hours strong {
    color: var(--text-light, #e8edf3);
}

/* ============================================
   SUBMISSION OVERLAY
   ============================================ */
.submit-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 26, 43, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.submit-overlay.is-visible {
    display: flex;
    opacity: 1;
}

.submit-overlay-card {
    background: var(--dark-card);
    border: 1px solid rgba(233, 175, 0, 0.25);
    border-radius: var(--radius);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: overlayPop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes overlayPop {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.submit-state h3 {
    font-size: 1.4rem;
    color: var(--text-light);
    margin: 18px 0 8px;
    font-weight: 700;
}

.submit-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.submit-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid rgba(233, 175, 0, 0.15);
    border-top-color: var(--gold);
    animation: spin 0.9s linear infinite;
}

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

.submit-check {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.5);
    color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: checkPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes checkPop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.submit-x {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.15);
    border: 2px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.submit-state-error .btn-card {
    margin-top: 20px;
    width: auto;
    padding: 10px 32px;
    display: inline-flex;
}

body.overlay-open {
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-card {
        padding: 32px 24px 24px;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 40px 0 60px;
    }

    .contact-hero {
        margin-bottom: 35px;
    }

    .contact-hero h1 {
        font-size: 1.7rem;
    }

    .contact-hero-sub {
        font-size: 1rem;
    }

    .contact-cards {
        margin-bottom: 40px;
    }

    .contact-card {
        padding: 28px 20px 22px;
    }

    .contact-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        margin-bottom: 16px;
    }

    .contact-card-title {
        font-size: 1.3rem;
    }

    .phone-number {
        font-size: 1.5rem;
    }

    .offices-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mt-fields {
        padding: 16px 16px 4px;
    }

    .selection-banner {
        padding: 16px 18px;
    }

    .selection-banner-inner {
        gap: 12px;
    }

    .selection-banner-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .selection-banner-value {
        font-size: 1.05rem;
    }

    .contact-info h2 {
        font-size: 1.5rem;
    }

    .form-card {
        padding: 24px 18px;
    }

    .form-card h2 {
        font-size: 1.3rem;
    }

    .btn-submit {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .captcha-input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 24px 16px 20px;
    }

    .contact-card-list li {
        font-size: 0.8rem;
    }

    .phone-number {
        font-size: 1.3rem;
    }

    .btn-card {
        padding: 11px 20px;
        font-size: 0.9rem;
    }

    .selection-banner {
        padding: 14px 16px;
        margin-bottom: 18px;
    }

    .selection-banner-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .selection-banner-label {
        font-size: 0.7rem;
    }

    .selection-banner-value {
        font-size: 0.95rem;
    }

    .selection-banner-reset {
        font-size: 0.8rem;
    }

    .contact-info h2 {
        font-size: 1.3rem;
    }

    .office-block h3 {
        font-size: 0.9rem;
    }

    .office-block p {
        font-size: 0.85rem;
    }

    .form-card {
        padding: 18px 14px;
    }

    .captcha-question {
        font-size: 1rem;
    }

    .submit-overlay-card {
        padding: 36px 24px;
    }

    .submit-spinner {
        width: 50px;
        height: 50px;
    }

    .submit-check,
    .submit-x {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .submit-state h3 {
        font-size: 1.2rem;
    }
}