/* Profile view (My view & Public view) — reference: #F8F9FA bg, white cards, #4A90E2 primary */
.profile-view-page {
    min-height: 100vh;
    background: #F6F7F9;
    padding-bottom: 32px;
    overflow-x: hidden;
    max-width: 100%;
}

.profile-view-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 24px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Public profile grid: categories column first in DOM (other side vs previous). Mobile: keep main content above sidebar. */
.profile-view-body-grid.mud-grid {
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 959.98px) {
    .profile-view-body-grid .profile-view-col-main.mud-grid-item {
        order: 1;
    }

    .profile-view-body-grid .profile-view-col-sidebar.mud-grid-item {
        order: 2;
    }
}

.profile-view-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

/* Toolbar: Edit / Share left — Back + pill right (reference layouts) */
.profile-view-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    direction:ltr;
}

.profile-view-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-view-toolbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    text-align: end;
}

.profile-view-share-outline {
    font-weight: 600 !important;
}

/* My view: stacked sections, RTL-friendly right alignment for titles + body */
.profile-view-my-view .profile-view-section-title {
    justify-content: flex-end;
}

.profile-view-desc-my {
    text-align: right;
}

/* Public About: right-aligned (RTL-friendly) */
.profile-view-about-public {
    text-align: right;
    direction: rtl;
}

.profile-view-about-public p,
.profile-view-about-public li {
    text-align: right;
}

.profile-view-card--compact-rate {
    padding: 16px 24px !important;
    direction:ltr;
}

.profile-view-stat-share {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.profile-view-stat-share:hover {
    background: #e0efff !important;
}

.profile-view-stat-share:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.profile-view-back-link {
    color: #6b7280 !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

.profile-view-btn-edit {
    background: #4a90e2 !important;
    color: #fff !important;
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
}

.profile-view-toggle-group {
    border-radius: 999px !important;
    overflow: hidden;
    border: 1px solid #e5e7eb !important;
}

/* My view / Public view — pill toggle (reference: blue active segment, icons) */
.profile-view-pill-toggle {
    display: inline-flex;
    align-items: stretch;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.profile-view-pill-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.profile-view-pill-segment .mud-icon-root {
    color: inherit !important;
}

.profile-view-pill-segment.active {
    background: #4a90e2;
    color: #fff;
}

.profile-view-pill-segment:not(.active):hover {
    background: #f3f4f6;
}

/* Click-to-play video thumbnails (no iframe until modal opens) */
.profile-video-thumb-card {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    outline: none;
}

.profile-video-thumb-card:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4a90e2;
}

.profile-video-thumb-card-inner {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111827;
    border-radius: 10px;
    overflow: hidden;
}

.profile-video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #e5e7eb, #f3f4f6);
}

.profile-video-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.15s ease;
}

.profile-video-thumb-card:hover .profile-video-thumb-play {
    background: rgba(0, 0, 0, 0.4);
}

.profile-view-featured-video-click {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 280px;
}
.portfolio-card {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.portfolio-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.portfolio-image-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.portfolio-image-grid img:hover {
    transform: scale(1.05);
}

.portfolio-title {
    font-weight: 700;
}

.portfolio-desc {
    color: #6b7280;
    margin-top: 6px;
}
.profile-view-featured-video-click.public-presentation-video {
    width: 300px;
    height: 175px;
    flex-shrink: 0;
    max-height: unset;
}

.profile-view-featured-video-click.public-presentation-video .profile-video-thumb-card-inner {
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    max-height: 250px;
}

.profile-view-stat-box .profile-video-thumb-card-inner {
    height: 100%; /* full height le */
    min-height: 140px; /* fix minimum height */
}

.profile-view-stat-box .profile-video-thumb-play .mud-icon-root {
    font-size: 40px !important;
    height: 100%;
    min-height: 140px;
}

/* Video modal player */
.profile-video-play-dialog .mud-dialog {
    border-radius: 12px;
    overflow: hidden;
}

.profile-video-dialog-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: min(72vh, 800px);
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.profile-video-dialog-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.profile-view-cert-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.profile-view-cert-clickable:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.profile-view-cert-doc-link {
    margin-top: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4a90e2;
}

.profile-view-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    direction: ltr;
}

.profile-view-section-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f2937;
    margin-bottom: 16px;
}

.profile-view-section-title .mud-icon-root {
    color: #4a90e2 !important;
}

.profile-view-chip-primary {
    background: #4a90e2 !important;
    color: #fff !important;
    border-radius: 999px !important;
}

/* Mobile-only category pills */
.mobile-profile-page .mobile-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 6px 12px;
    background: #4a90e2;
    color: #fff;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2px 6px 2px 0;
}

/* Categories: larger card; owner “My view” — card aligned to logical end (right in LTR sidebar) */
.profile-view-categories-sidebar {
    min-height: 280px;
    padding: 28px !important;
}

@media (min-width: 960px) {
    .profile-view-categories-sidebar {
        align-self: flex-start;
    }
}

.profile-view-categories-owner-wrap {
    display: flex;
    justify-content: flex-start; /* RTL: aligns card to visual right */
    width: 100%;
    margin-bottom: 16px;
}

.profile-view-categories-owner-wrap .profile-view-categories-card {
    width: 100%;
    max-width: 560px;
    min-height: 240px;
    margin-inline-start: auto;
}

@media (max-width: 959px) {
    .profile-view-categories-owner-wrap {
        justify-content: stretch;
    }

    .profile-view-categories-owner-wrap .profile-view-categories-card {
        max-width: none;
        margin-inline-start: 0;
    }
}

.profile-view-categories-card:not(.profile-view-categories-sidebar) {
    min-height: 200px;
}

.profile-view-stat-box {
    background: #eef6ff;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    flex: 1;
    min-width: 100px;
    height: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.profile-view-stat-box > * {
    width: 100%;
}

.profile-view-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.profile-view-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
}

.profile-view-btn-outline {
    border-color: #d1d5db !important;
    color: #4b5563 !important;
    text-transform: none !important;
    border-radius: 10px !important;
}

.profile-view-btn-hire {
    background: #4a90e2 !important;
    color: #fff !important;
    text-transform: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

/* Desktop public profile header: video left, identity + actions right */
.desktop-profile-header-card {
    direction: ltr;
}

.desktop-profile-header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 28px;
    min-height: 175px;
}

.desktop-profile-header-video {
    flex: 0 0 300px;
    width: 300px;
    max-width: 38%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #000;
}

.desktop-profile-header-video .profile-video-thumb-card,
.desktop-profile-header-video .profile-video-thumb-card-inner {
    height: 100%;
    min-height: 175px;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
}

.desktop-profile-header-video .profile-video-thumb-play .mud-icon-root {
    font-size: 56px !important;
}

.desktop-profile-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 22px;
    direction: rtl;
    text-align: right;
}

.desktop-profile-header-main--full {
    width: 100%;
}

.desktop-profile-header-identity {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
}

.desktop-profile-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.desktop-profile-header-text .mud-typography {
    width: 100% !important;
    text-align: right !important;
}

.desktop-profile-name {
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.25 !important;
}

.desktop-profile-title {
    color: #4a90e2 !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.desktop-profile-avatar {
    width: 88px !important;
    height: 88px !important;
    flex-shrink: 0;
}

.desktop-profile-meta-row {
    display: block;
    width: 100%;
    margin-top: 2px;
    text-align: right;
}

.desktop-profile-meta-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 8px;
    max-width: 100%;
    font-size: clamp(0.75rem, 1.1vw, 0.875rem);
    line-height: 1.35;
    direction: rtl;
}

.desktop-profile-meta-icon {
    color: #6b7280 !important;
    flex-shrink: 0;
}

.desktop-profile-location {
    color: #4b5563;
}

.desktop-profile-rate {
    color: #4b5563;
    font-weight: 700;
}

.desktop-profile-meta-dot {
    color: #9ca3af;
}

.desktop-profile-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.desktop-profile-status.is-online {
    background: #22c55e;
}

.desktop-profile-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 100%;
    direction: rtl;
}

@media (max-width: 959.98px) {
    .desktop-profile-header {
        flex-direction: column;
        min-height: unset;
    }

    .desktop-profile-header-video {
        flex: none;
        width: 100%;
        max-width: none;
    }

    .desktop-profile-header-main {
        align-items: stretch;
    }

    .desktop-profile-header-actions {
        justify-content: center;
        direction: ltr;
    }
}

.profile-view-featured-video-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 280px;
}

.profile-view-featured-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.profile-view-portfolio-item,
.profile-view-cert-item,
.profile-view-video-thumb {
    border: 1px solid #e5e7eb;
    justify-content: end;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    text-align: right;
}

.profile-view-video-thumb {
    overflow: hidden;
}

@media (max-width: 960px) {
    .profile-view-container {
        padding: 12px;
    }

    .profile-view-stat-row {
        flex-wrap: wrap;
    }

    .profile-view-pill-toggle {
        width: 100%;
        justify-content: stretch;
    }

    .profile-view-pill-segment {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.8125rem;
    }
}

/* ---------------- Mobile View Profile (separate component) ---------------- */
.mobile-profile-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 32px;
}

/* Transparent hero: back link, identity, actions, presentation video */
.mobile-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: transparent;
    padding: 0;
    direction: rtl;
}

.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    padding: 2px 0;
}

.mobile-top-share {
    margin-inline-end: auto;
    color: #374151 !important;
}

.mobile-top-share .mud-icon-root {
    font-size: 1.35rem !important;
}

.mobile-back-btn {
    color: #6b7280 !important;
    text-transform: none !important;
    font-weight: 500 !important;
    padding: 4px 0 !important;
    min-width: unset !important;
    background: transparent !important;
    box-shadow: none !important;
}

.mobile-profile-identity {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    width: 100%;
}

.mobile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.mobile-avatar {
    width: 80px !important;
    height: 80px !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-avatar-status {
    position: absolute;
    bottom: 2px;
    inset-inline-end: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #f6f7f9;
    background: #d1d5db;
}

.mobile-avatar-status.is-online {
    background: #22c55e;
}

.mobile-identity-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    gap: 4px;
    direction: rtl;
}

.mobile-identity-text .mud-typography {
    width: 100% !important;
    text-align: right !important;
    display: block !important;
}

.mobile-name {
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.25 !important;
}

.mobile-title {
    color: #4a90e2 !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
}

/* Location + rate: directly under title; shrink font if one line is tight */
.mobile-meta-row {
    display: block;
    width: 100%;
    margin-top: 2px;
    text-align: right;
    direction: rtl;
}

.mobile-meta-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 6px;
    max-width: 100%;
    font-size: clamp(0.6875rem, 2.6vw, 0.8125rem);
    line-height: 1.35;
    direction: rtl;
}

.mobile-meta-icon {
    color: #6b7280 !important;
    flex-shrink: 0;
    font-size: 0.95rem !important;
}

.mobile-location {
    color: #4b5563;
    white-space: nowrap;
}

.mobile-rate {
    color: #4b5563;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-meta-dot {
    color: #9ca3af;
    flex-shrink: 0;
}

.mobile-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    direction: ltr;
}

.mobile-action-btn {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    min-height: 44px !important;
    box-shadow: none !important;
}

.mobile-hire-btn {
    background: #4a90e2 !important;
    color: #fff !important;
}

.mobile-hire-btn .mud-icon-root {
    color: #fff !important;
}

.mobile-message-btn {
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    background: #ffffff !important;
}

.mobile-message-btn .mud-icon-root {
    color: #374151 !important;
}

.mobile-phone-btn {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    background: #ffffff !important;
    min-height: 44px !important;
    box-shadow: none !important;
}

.mobile-phone-btn .mud-icon-root {
    color: #374151 !important;
}

.mobile-presentation-video {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #000;
}

.mobile-presentation-video .profile-video-thumb-card {
    border-radius: 14px;
}

.mobile-presentation-video .profile-video-thumb-card-inner {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.mobile-presentation-video .profile-video-thumb-play .mud-icon-root {
    font-size: 64px !important;
}

.profile-view-page .mobile-view-section-card,
.mobile-view-section-card {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    border-radius: 12px !important;
    padding: 14px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    direction: rtl;
    text-align: right;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible;
    margin-bottom: 0 !important;
    gap: 0 !important;
}

.profile-view-page .mobile-view-section-card > .mobile-section-body,
.profile-view-page .mobile-view-section-card > .mobile-about-text,
.profile-view-page .mobile-view-section-card > .mud-typography {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    order: 2;
}

.profile-view-page .mobile-view-section-card > .mobile-section-title {
    order: 1;
}

/* Heading: top-right (RTL); content on the next line — same pattern as desktop View Profile */
.mobile-section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    text-align: right;
    direction: rtl;
    line-height: 1.3;
    flex: 0 0 auto;
}

.mobile-section-heading-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    direction: rtl;
    max-width: 100%;
}

.mobile-section-heading-row .mud-icon-root {
    color: #4a90e2 !important;
}

.mobile-section-body {
    display: block !important;
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    margin: 0;
    padding: 0;
    overflow: visible;
    visibility: visible;
}

.mobile-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-start;
    gap: 8px;
    row-gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 6px 0 2px 0;
    padding: 2px 0;
    direction: ltr;
    text-align: left;
}

.mobile-section-body .mud-stack,
.mobile-section-body .mud-grid {
    width: 100%;
    min-width: 0;
}

.mobile-empty-text {
    color: #9ca3af !important;
    text-align: right;
}

.mobile-about-text {
    text-align: right;
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.mobile-about-text p,
.mobile-about-text li {
    text-align: right;
}

.mobile-portfolio-list {
    width: 100%;
}

.mobile-portfolio-list.mud-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.mobile-portfolio-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

.mobile-portfolio-item + .mobile-portfolio-item {
    margin-top: 0;
}

.mobile-portfolio-grid {
    display: grid;
    gap: 8px;
    width: 100%;
}

.mobile-portfolio-grid--1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 33%;
}

.mobile-portfolio-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-portfolio-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mobile-portfolio-thumb-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
}

.mobile-portfolio-thumb {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    background: #e5e7eb;
    display: block;
}

.mobile-portfolio-thumb--placeholder {
    cursor: default;
    background: #e5e7eb;
}

.mobile-portfolio-title {
    text-align: right;
    color: #6b7280;
    font-weight: 600;
    margin-top: 4px;
    padding-top: 0;
    width: 100%;
}

.mobile-portfolio-desc {
    text-align: right;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    direction: rtl;
}

.mobile-portfolio-desc p {
    margin: 0;
    text-align: right;
}

.mobile-video-list {
    width: 100%;
}

.mobile-video-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-video-item .profile-video-thumb-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.mobile-video-item .profile-video-thumb-card-inner {
    border-radius: 14px;
    aspect-ratio: 16 / 9;
}

.mobile-video-caption {
    color: #6b7280 !important;
    padding-inline: 2px;
    line-height: 1.4;
    text-align: right !important;
}

.mobile-cert-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    direction: rtl;
    justify-items: stretch;
    align-items: stretch;
}

.mobile-cert-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px;
    text-align: right;
    background: #fff;
    height: 100%;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    direction: rtl;
    box-sizing: border-box;
    width: 100%;
}

.mobile-cert-name {
    font-weight: 700 !important;
    text-align: right !important;
    color: #111827 !important;
    line-height: 1.25 !important;
    width: 100%;
    margin: 0 !important;
}

.mobile-cert-year {
    color: #111827 !important;
    font-weight: 700 !important;
    text-align: right !important;
    width: 100%;
    margin: 0 !important;
}

.mobile-cert-doc-link {
    margin-top: auto;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4a90e2;
    text-align: right;
    align-self: flex-end;
    cursor: pointer;
}

.mobile-cert-clickable {
    cursor: pointer;
}

.mobile-cert-clickable:hover {
    border-color: #4a90e2;
    background: #f8fbff;
}

/* Mobile layout footer — same palette as desktop DesktopFooter (#002358, links #94a3b8) */
.mobile-profile-footer {
    margin: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background-color: #002358 !important;
    color: #fff;
    padding: 22px 18px 20px;
    direction: ltr;
}

.mobile-profile-footer-brand {
    text-align: right;
    margin-bottom: 22px;
}

.mobile-profile-footer-logo,
.mobile-profile-footer-brand .mud-image,
.mobile-profile-footer-brand img {
    max-width: 150px;
    width: 100%;
    height: auto;
    display: block;
    margin-inline-start: auto;
}

.mobile-profile-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 14px;
    direction: ltr; /* keep 2×2 column order same as design (About Us | Popular Services) */
}

.mobile-profile-footer-col {
    direction: ltr;
    text-align: right;
    min-width: 0;
}

.mobile-profile-footer-heading {
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.mobile-profile-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-profile-footer-links a {
    color: #94a3b8;
    font-size: 0.85rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.mobile-profile-footer-links a:hover {
    color: #ffffff;
}

.mobile-profile-footer-bottom {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    direction: rtl;
}

.mobile-profile-footer-copy {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Mobile profile view — prevent horizontal overflow and tighten small-screen layout */
@media (max-width: 959.98px) {
    .profile-view-container {
        padding: 12px 14px 24px;
    }

    .mobile-profile-page {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .mobile-hero,
    .mobile-view-section-card,
    .mobile-presentation-video,
    .mobile-portfolio-list,
    .mobile-video-list,
    .mobile-cert-grid {
        max-width: 100%;
        box-sizing: border-box;
    }

    .mobile-section-title {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-section-heading-row {
        max-width: 100%;
    }

    .mobile-section-body,
    .mobile-chip-row,
    .mobile-portfolio-list,
    .mobile-video-list,
    .mobile-cert-grid {
        width: 100%;
        min-width: 0;
    }

    .mobile-about-text,
    .mobile-about-text p,
    .mobile-about-text li,
    .mobile-about-text table {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .mobile-about-text img,
    .mobile-portfolio-thumb,
    .mobile-presentation-video img {
        max-width: 100%;
        height: auto;
    }

    .mobile-location,
    .mobile-rate {
        white-space: normal;
    }

    .mobile-meta-line {
        justify-content: flex-end;
    }

    .mobile-top-bar {
        gap: 8px;
    }

    .mobile-back-btn {
        max-width: calc(100% - 48px);
    }

    .mobile-back-btn .mud-button-label {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-video-list .profile-video-thumb-card,
    .mobile-video-list .profile-video-thumb-card-inner {
        max-width: 100%;
    }

    .mobile-profile-footer {
        margin-inline: -14px;
        width: calc(100% + 28px);
        max-width: 100vw;
    }

    .mobile-profile-footer-grid {
        gap: 18px 12px;
    }

    .mobile-profile-footer-col {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    .mobile-action-row {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .mobile-view-section-card {
        padding: 14px !important;
    }

    .mobile-avatar {
        width: 72px !important;
        height: 72px !important;
    }
}
