/* ============================================================
   JLIVE — MDPI Scholarly 3-Column Contact Page Styles
   Palette: Oxford Blue (#0A1F44), Gold (#C9A84C), Off-White (#F4F6F9)
   ============================================================ */

:root {
    --navy: #0A1F44;
    --gold: #C9A84C;
    --gold-hover: #b8963e;
    --slate-dark: #1e293b;
    --slate-text: #475569;
    --slate-muted: #64748b;
    --border-light: #e2e8f0;
    --bg-page: #F4F6F9;
    --bg-card: #ffffff;
}

/* Page Layout Wrapper */
.mdpi-contact-page {
    background: var(--bg-page);
    padding-top: calc(var(--nav-height, 72px) + 24px);
    padding-bottom: 70px;
    min-height: 85vh;
}

.mdpi-contact-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
}

.mdpi-contact-layout {
    display: grid;
    grid-template-columns: 260px 1fr 48px;
    gap: 28px;
    align-items: start;
}

/* ============================================================
   LEFT SIDEBAR: About Navigation
   ============================================================ */
.mdpi-contact-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 72px) + 20px);
    background: transparent;
    padding-right: 12px;
}

.sidebar-main-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 18px 0;
    letter-spacing: -0.2px;
}

.sidebar-nav-group {
    margin-bottom: 4px;
}

.sidebar-tab-link,
.sidebar-tab-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 6px 0;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    transition: color 0.15s ease;
    text-decoration: none;
}

.sidebar-tab-link:hover {
    color: #1e3a8a;
}

.sidebar-tab-label.active {
    color: var(--navy);
    font-weight: 700;
}

/* Sub-items (Bullets under Contact) */
.sidebar-sub-list {
    list-style: none;
    margin: 6px 0 14px 0;
    padding: 0 0 0 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-sub-item {
    position: relative;
    padding-left: 18px;
}

.sidebar-sub-item::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: -1px;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.sidebar-sub-link {
    display: block;
    font-size: 13.5px;
    line-height: 1.45;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    padding: 2px 0;
}

.sidebar-sub-link:hover {
    color: var(--navy);
}

.sidebar-sub-item.active .sidebar-sub-link {
    color: var(--navy);
    font-weight: 700;
}

.sidebar-sub-item.active::before {
    color: var(--gold);
}

/* Divider line */
.sidebar-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 12px 0;
}

/* ============================================================
   MAIN CONTENT AREA: MDPI Scholarly White Card
   ============================================================ */
.mdpi-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 44px 52px;
    box-shadow: 0 2px 12px rgba(10, 31, 68, 0.03);
    min-height: 700px;
}

.mdpi-doc-title {
    font-family: var(--font-display, 'IBM Plex Serif', Georgia, serif);
    font-size: 30px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 24px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.mdpi-h2 {
    font-family: var(--font-display, 'IBM Plex Serif', Georgia, serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin: 28px 0 12px 0;
    padding-bottom: 6px;
    scroll-margin-top: 90px;
}

.contact-intro-text {
    font-size: 14.5px;
    color: var(--slate-text);
    margin-bottom: 22px;
    line-height: 1.6;
}

/* ============================================================
   CONTACT FORM: JLIVE Brand Palette
   ============================================================ */
.contact-form-container {
    background: #F8FAFC;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 32px 36px;
    margin-bottom: 44px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Dynamic Join Editorial Board Indicator */
.eb-mode-indicator {
    display: none;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    align-items: flex-start;
    gap: 12px;
}

.eb-mode-indicator.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.eb-mode-icon {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.eb-mode-text {
    font-size: 13.5px;
    color: var(--navy);
    line-height: 1.5;
}

/* Form Row Grid */
.form-row-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 4px;
}

.required-star {
    color: #e11d48;
    font-weight: 700;
}

.field-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.field-input,
.field-select {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    font-family: inherit;
    transition: all 0.15s ease;
}

.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 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.field-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
    transition: all 0.15s ease;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    border-color: var(--navy);
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.1);
    background: #ffffff;
}

.field-help-text {
    font-size: 12px;
    color: var(--slate-muted);
    line-height: 1.4;
    margin-top: 2px;
}

/* Submit Button */
.form-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--navy);
    color: #ffffff;
    border: 1px solid var(--navy);
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.2s ease;
}

.form-submit-btn:hover {
    background: #14326d;
    box-shadow: 0 4px 14px rgba(10, 31, 68, 0.2);
    transform: translateY(-1px);
}

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

/* Spinner */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.form-submit-btn.is-submitting .btn-spinner {
    display: inline-block;
}

.form-submit-btn.is-submitting .btn-icon {
    display: none;
}

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

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

/* Form Status Alerts */
.form-status-alert {
    display: none;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.form-status-alert.visible {
    display: block;
}

.success-alert {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.error-alert {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-content-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-message h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
}

.alert-message p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.reset-form-link {
    background: none;
    border: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ============================================================
   OFFICE LOCATIONS SECTION (MDPI Layout)
   ============================================================ */
.location-category-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin: 28px 0 14px 0;
}

/* Single Location Card (Headquarters) */
.location-hq-box {
    border-left: 2px solid var(--gold);
    padding-left: 18px;
    margin-bottom: 32px;
}

.location-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.location-pin-icon {
    color: var(--navy);
    flex-shrink: 0;
}

.location-address-text {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 12px;
}

.location-address-text a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
}

.location-address-text a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.location-hours-text {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
}

.location-explore-link {
    font-size: 13.5px;
    color: #475569;
}

.location-explore-link a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
}

/* Regional Desks 3-Column Grid */
.regional-locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 14px;
    padding-top: 6px;
}

.regional-location-col {
    border-left: 1px solid var(--border-light);
    padding-left: 16px;
}

.regional-location-col .location-title-row {
    font-size: 14.5px;
    margin-bottom: 6px;
}

.regional-location-col .location-address-text {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 0;
}

/* ============================================================
   RIGHT FLOATING ACTIONS (MDPI Style)
   ============================================================ */
.mdpi-floating-actions {
    position: sticky;
    top: calc(var(--nav-height, 72px) + 20px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(10, 31, 68, 0.04);
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.floating-action-btn:hover {
    color: var(--navy);
    border-color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 31, 68, 0.1);
}

.floating-action-btn svg {
    width: 20px;
    height: 20px;
}

/* Tooltip on hover */
.floating-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 54px;
    background: var(--navy);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-action-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Toast message for link copied */
#toast-notification {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--navy);
    color: #ffffff;
    border-left: 3px solid var(--gold);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1080px) {
    .mdpi-contact-layout {
        grid-template-columns: 240px 1fr;
    }

    .mdpi-floating-actions {
        display: none;
    }

    .regional-locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .mdpi-contact-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mdpi-contact-sidebar {
        position: static;
        max-height: none;
        padding-right: 0;
    }

    .mdpi-content-card {
        padding: 28px 20px;
    }

    .contact-form-container {
        padding: 20px 18px;
    }

    .form-row-two-col {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .regional-locations-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}
