/* Shared profile presentation for standalone pages and AJAX-loaded offcanvas content. */
.profile-location-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;min-width:0;padding:12px;border:1px solid #e2e4da;border-radius:8px;background:#f8f7f1;color:#28362f;}
.profile-location-fields>div{min-width:0;}
#profile-update-form .profile-location-fields label{display:block;margin:0 0 5px;color:#28362f;font-size:.875rem;line-height:1.3;text-shadow:none;}
#profile-update-form .profile-location-fields select,
#profile-update-form .profile-location-fields input{width:100%;max-width:100%;height:44px;min-height:44px;padding:.55rem .7rem;line-height:1.3;font-size:.9375rem;color:#28362f!important;background-color:#fffef9!important;border:1px solid #c9d2c7;border-radius:6px;text-shadow:none;}
#profile-update-form .profile-location-fields select{padding-right:2.2rem;background-image:var(--bs-form-select-bg-img);background-position:right .7rem center;background-repeat:no-repeat;background-size:16px 12px;}
#profile-update-form .profile-location-fields input::placeholder{color:#66736b!important;opacity:1;text-shadow:none;}
#profile-update-form .profile-location-fields select:focus,
#profile-update-form .profile-location-fields input:focus{border-color:#5a7b68;box-shadow:0 0 0 2px #5a7b6830;outline:0;}
.profile-location-status{grid-column:1/-1;min-height:0;font-size:.8rem;color:#546359;margin:0;}
.profile-location-status:empty{display:none;}
@media(max-width:576px){.profile-location-fields{grid-template-columns:1fr;}}
body.profile-page {
    overflow-x: hidden;
    background: linear-gradient(180deg, #f7f7f5 0%, #eef2f1 100%) !important;
}

.profile-page-shell { max-width: 1320px; }
.profile-details-card {
    width: 100%;
    border: 0;
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 45px rgba(38,48,70,.10);
}
.profile-details-card .card-body { padding: 1.25rem; }
.profile-section-title { letter-spacing: -.02em; }
.profile-flow-section { width: 100%; }
@media (min-width: 992px) {
    .profile-details-card .card-body { column-count: 2; column-gap: 2.2rem; }
    .profile-details-card .card-body p { break-inside: avoid; }
}
@media (min-width: 1400px) {
    .profile-page-shell { max-width: 1440px; }
}

.profile-hero {
    width: 100%;
    position: relative;
    padding: 3rem 1rem;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.12);
    border-radius: 0 0 20px 20px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255,255,255,.10), transparent 28%),
        linear-gradient(135deg, #5B3FA8 0%, #4A6FA5 45%, #4FC1B7 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.profile-hero-overlay { position: absolute; inset: 0; opacity: .15; z-index: 0; }
.profile-hero-content { position: relative; z-index: 1; }
.profile-hero-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
}
.profile-hero-title,
.profile-hero-copy {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.profile-hero-role {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.profile-hero-copy { max-width: 600px; }

.parallax-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    transition: background-position .3s ease;
}
.card-title-flow { font-size: 1.25rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.badge-2 { border-radius: 12px; background: rgba(0,0,0,.7); }
.follow-status { pointer-events: none; }
.featured-flow { width: 50%; color: #000; }
.profile-owner-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.profile-owner-actions .btn { border-radius: 999px; padding: .65rem 1rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.16); }

.profile-offcanvas {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    z-index: 1200 !important;
}
.profile-offcanvas .offcanvas-header { flex: 0 0 auto; }
.profile-offcanvas .offcanvas-body {
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#profileOffcanvas,
#profileOffcanvas * { box-sizing: border-box; max-width: 100%; }
#profileOffcanvas .profile-form-container,
#profileOffcanvas #profile-update-form { width: 100%; max-width: 100%; overflow-x: hidden; }
#profileOffcanvas .hero-section { overflow-x: hidden !important; border-radius: 0 !important; }
#profileOffcanvas .row { width: 100%; margin-right: 0 !important; margin-left: 0 !important; }
#profileOffcanvas [class*="col-"] { min-width: 0; }
#profileOffcanvas input,
#profileOffcanvas textarea,
#profileOffcanvas select,
#profileOffcanvas .form-control,
#profileOffcanvas .form-select,
#profileOffcanvas .choices,
#profileOffcanvas .choices__inner,
#profileOffcanvas .choices__list,
#profileOffcanvas .input-group { min-width: 0 !important; max-width: 100% !important; }
#profileOffcanvas textarea { resize: none; }

.profile-save-status { position: sticky; top: 0; z-index: 3; display: none; margin: 0; border-radius: 0; }
.profile-save-status.is-visible { display: block; }
.profile-back-btn,
.profile-close-btn,
.profile-update-close,
.offcanvas-close-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #fff;
    line-height: 1;
    text-decoration: none;
}
.profile-back-btn:hover { color: #fff; }
.profile-back-btn .material-icons,
.profile-update-close .material-icons { display: block; font-size: 32px; line-height: 1; color: inherit; }
.offcanvas-close-btn { top: 14px; left: 14px; z-index: 3000; border-radius: 50%; }
.offcanvas-close-btn.light-mode { color: #222; }

body.profile-cropper-open .modal-backdrop.show { z-index: 2990 !important; }
.profile-cropper-modal { z-index: 3000 !important; }
.profile-cropper-modal .modal-dialog { max-width: 100vw; height: 100vh; margin: 0; }
.profile-cropper-modal .modal-content { height: 100vh; overflow: hidden; border: 0; border-radius: 0; background: #0f1115; color: #fff; }
.profile-cropper-modal .modal-header,
.profile-cropper-modal .modal-footer { flex: 0 0 auto; border-color: rgba(255,255,255,.12); background: rgba(15,17,21,.96); }
.profile-cropper-modal .modal-body { min-height: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 12px; }
.profile-cropper-stage { width: 100%; height: 100%; max-height: calc(100vh - 142px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
#profileCropperImage { display: block; max-width: 100%; max-height: 100%; }
.profile-cropper-modal .cropper-view-box,
.profile-cropper-modal .cropper-face { border-radius: 50%; }
.profile-cropper-modal .cropper-bg { background-image: none; background-color: #111; }
.profile-cropper-modal .btn { border-radius: 999px; padding: .68rem 1rem; font-weight: 700; }
.profile-cropper-help { margin: 0; color: rgba(255,255,255,.68); font-size: .88rem; }
@media (min-width: 992px) {
    .profile-cropper-modal .modal-dialog { max-width: 860px; height: 92vh; margin: 4vh auto; }
    .profile-cropper-modal .modal-content { height: 92vh; border-radius: 24px; }
    .profile-cropper-stage { max-height: calc(92vh - 142px); }
}

.profile-video-section { width: 100%; display: flex; align-items: center; justify-content: center; margin: 28px auto 34px; padding: 0 16px; }
.profile-video-shell { width: 100%; max-width: 640px; overflow: hidden; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 18px 45px rgba(38,48,70,.14); }
.profile-video-card { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0f172a; }
.profile-video-thumb { position: relative; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #0f172a; cursor: pointer; }
.profile-video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-video-static-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-video-meta-note { font-size: .9rem; }
.profile-video-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at top left, rgba(91,63,168,.50), transparent 36%), linear-gradient(135deg, #111827, #0f172a); color: rgba(255,255,255,.86); text-align: center; font-weight: 700; }
.profile-video-processing { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: linear-gradient(135deg, rgba(15,23,42,.88), rgba(79,193,183,.72)); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: #fff; text-align: center; }
.profile-video-processing .spinner-border { width: 2.5rem; height: 2.5rem; }
.profile-video-processing strong { font-size: 1rem; }
.profile-video-processing span { max-width: 420px; font-size: .9rem; line-height: 1.35; opacity: .88; }
.profile-upload-overlay { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(10,15,30,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.profile-upload-overlay.is-visible { display: flex; }
.profile-upload-box { width: min(460px, 100%); padding: 24px; border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(0,0,0,.28); color: #172033; text-align: center; }
.profile-upload-box .spinner-border { width: 3rem; height: 3rem; margin-bottom: 14px; }
.profile-upload-box h5 { margin: 0 0 8px; font-weight: 800; }
.profile-upload-box p { margin: 0; color: rgba(23,32,51,.72); line-height: 1.42; }
.profile-upload-filename { margin-top: 12px; color: rgba(23,32,51,.62); font-size: .88rem; word-break: break-word; }
.profile-video-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.22)); pointer-events: none; }
.profile-video-play { position: absolute; top: 50%; left: 50%; z-index: 2; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; padding-left: 5px; border-radius: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.62); box-shadow: 0 8px 22px rgba(0,0,0,.22); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); color: #fff; font-size: 30px; }
.profile-video-card iframe { display: block; width: 100%; height: 100%; border: 0; }
.profile-video-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
#profileOffcanvas .profile-video-section { width: 100%; display: flex; justify-content: center; }
#profileOffcanvas .profile-video-shell { width: min(100%,640px) !important; max-width: 640px !important; margin-right: auto !important; margin-left: auto !important; }
#profileOffcanvas .profile-video-card { width: 100% !important; }
@media (max-width: 992px) { .profile-video-shell { max-width: 100%; border-radius: 18px; } }
@media (max-width: 576px) {
    .profile-video-section { margin: 18px auto 24px; padding: 0 12px; }
    .profile-video-shell { border-radius: 14px; }
    .profile-video-play { width: 60px; height: 60px; font-size: 25px; }
}

.profile-ad-label { margin-bottom: 5px; color: #856404; font-size: .875rem; }
.profile-ad-top { display: block; width: 728px; height: 90px; }
.profile-ad-side { display: block; width: 300px; height: 250px; }
.profile-image-modal-content { border: 0; background: transparent; }
.profile-image-modal-body { position: relative; }
.profile-image-modal-photo { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.profile-image-modal-close { position: absolute; top: 20px; right: 20px; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; padding: 8px; border: 0 !important; background: #fff; font-size: 1.4rem; }
.profile-tag { display: inline-block; margin: 2px; padding: 4px 8px; border-radius: 5px; background: #6B46C1; color: #fff; font-size: .875rem; }
.profile-teaching-line { display: inline-block; border-radius: 4px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.profile-flow-card { position: relative; height: 250px !important; min-height: 250px; flex: 0 0 auto; cursor: pointer; }
.profile-flow-card .profile-flow-image { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.96) contrast(.98); }
.profile-flow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:linear-gradient(180deg,rgba(0,0,0,.06) 0%,rgba(0,0,0,.08) 44%,rgba(0,0,0,.58) 100%);
}
.profile-flow-gradient { z-index: 2; padding: 1rem; background: transparent; }
.profile-flow-stats { z-index: 2; gap: .25rem; margin: .4rem; padding: .2rem .4rem; border-radius: 6px; background: #fafafa; color: #222; }
.profile-testimonial-slide { padding: 1rem; }
.profile-testimonial-card { padding: 1.5rem; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
