/* === EMBAssador Table === */
.emba-table-wrap {
    max-width: 1100px;
    margin: 2rem auto;
}

.emba-table-intro {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Fallback: if columns still can't fit, scroll inside the wrap instead of overflowing it */
.emba-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.emba-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.emba-table thead {
    background: #C1AF7D;
    color: #fff;
}

.emba-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.emba-sortable {
    cursor: pointer;
    user-select: none;
    vertical-align: bottom;
}

.emba-sort-icon {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.6rem;
    margin-left: 4px;
    opacity: 0.5;
    letter-spacing: -2px;
}

.emba-sortable:hover .emba-sort-icon,
.emba-sortable.emba-asc .emba-sort-icon,
.emba-sortable.emba-desc .emba-sort-icon {
    opacity: 1;
}

.emba-table td {
    padding: 12px;
    border-bottom: 1px solid #e8e8e8;
    color: #333;
    overflow-wrap: anywhere;
}

.emba-table tbody tr:hover {
    background: #f5f8fc;
}

/* Keep the Name column visible while the table scrolls horizontally */
.emba-table th:first-child,
.emba-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
}

.emba-table th:first-child {
    background: #C1AF7D;
}

.emba-table td:first-child {
    background: #fff;
}

.emba-table tbody tr:hover td:first-child {
    background: #f5f8fc;
}

.emba-name-link {
    color: #002147;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.emba-name-link:hover {
    border-bottom-color: #d4a843;
    color: #002147;
}

/* === Single Ambassador Page === */
.emba-single-wrap {
    padding: 40px 20px 80px;
    background: #f7f8fa;
    min-height: 60vh;
}

.emba-single-container {
    max-width: 800px;
    margin: 0 auto;
}

.emba-back-link {
    margin-bottom: 24px;
}

.emba-back-link a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.emba-back-link a:hover {
    color: #002147;
}

/* Profile Card */
.emba-profile-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 40px;
    margin-bottom: 32px;
}

.emba-profile-header {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eee;
}

.emba-profile-intro {
    flex: 1;
    min-width: 0;
}

.emba-profile-card .emba-profile-photo {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    border-radius: 50%;
    border: 3px solid #e87722;
    overflow: hidden;
    background: #f4f5f7;
}

.emba-profile-card .emba-profile-photo.is-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f5f2;
}

.emba-photo-initials {
    color: #002147;
    font-size: 46px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
}

.emba-profile-card .emba-profile-photo img {
    display: block;
    width: 150px;
    height: 150px;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
}

.emba-profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #002147;
    margin: 0 0 6px;
    line-height: 1.2;
}

.emba-profile-title {
    font-size: 1.05rem;
    color: #444;
    margin: 0 0 2px;
}

.emba-profile-company {
    font-size: 0.95rem;
    color: #777;
    margin: 0 0 16px;
}

.emba-linkedin-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #0077b5;
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.emba-linkedin-btn:hover {
    background: #005e93;
    color: #fff;
}

.emba-linkedin-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.emba-linkedin-cell {
    white-space: nowrap;
}

.emba-linkedin-empty {
    color: #bbb;
}

/* Detail Grid */
.emba-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.emba-detail-item {
    display: flex;
    flex-direction: column;
}

.emba-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 4px;
}

.emba-detail-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.emba-profile-section {
    margin-bottom: 24px;
}

.emba-profile-section:last-child {
    margin-bottom: 0;
}

.emba-profile-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #002147;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.emba-profile-section p {
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* Form Card */
.emba-form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 40px;
}

.emba-form-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #002147;
    margin: 0 0 6px;
}

.emba-form-desc {
    color: #666;
    margin: 0 0 28px;
    font-size: 0.95rem;
}

.emba-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.emba-form-group {
    display: flex;
    flex-direction: column;
}

.emba-form-full {
    margin-bottom: 24px;
}

.emba-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.emba-form-group label .required {
    color: #c0392b;
}

.emba-form-group input,
.emba-form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.emba-form-group input:focus,
.emba-form-group textarea:focus {
    outline: none;
    border-color: #002147;
    box-shadow: 0 0 0 2px rgba(0, 33, 71, 0.1);
}

.emba-form-submit {
    text-align: right;
}

.emba-submit-btn {
    padding: 12px 36px;
    background: #002147;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.emba-submit-btn:hover {
    background: #003366;
}

.emba-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.emba-form-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.emba-form-feedback.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.emba-form-feedback.error {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Responsive */
@media (max-width: 768px) {
    .emba-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .emba-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .emba-profile-card,
    .emba-form-card {
        padding: 24px;
    }
}

@media (max-width: 991px) {
    .emba-table-scroll {
        overflow: visible;
    }

    .emba-table th:first-child,
    .emba-table td:first-child {
        position: static;
        background: transparent;
    }

    .emba-table thead {
        display: none;
    }

    .emba-table,
    .emba-table tbody,
    .emba-table tr,
    .emba-table td {
        display: block;
    }

    .emba-table tr {
        margin-bottom: 16px;
        border: 1px solid #e8e8e8;
        border-radius: 6px;
        padding: 12px;
        background: #fff;
    }

    .emba-table td {
        border-bottom: none;
        padding: 6px 0;
    }

    .emba-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #002147;
        display: inline-block;
        width: 140px;
        font-size: 0.8rem;
        text-transform: uppercase;
    }
}
