/* =================================================
   Malak's World — Content Manager UI
================================================= */

.malak-add-btn {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 500;

    width: 56px;
    height: 56px;
    border-radius: 50%;

    border: 1px solid rgba(70, 220, 255, 0.9);

    background: linear-gradient(
        135deg,
        rgba(0, 150, 255, 0.65),
        rgba(0, 80, 180, 0.6)
    );

    color: #ffe56b;
    font-size: 30px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;

    box-shadow:
        0 0 15px rgba(40, 200, 255, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.08);

    transition: 0.3s;
}

.malak-add-btn:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow:
        0 0 25px rgba(40, 200, 255, 0.75),
        inset 0 0 20px rgba(255, 255, 255, 0.12);
}

.malak-add-btn-disabled {
    opacity: 0.5;
}

@media (max-width: 640px) {
    .malak-add-btn {
        bottom: 18px;
        right: 18px;
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
}


/* ---------- Modal ---------- */

.malak-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;

    background: rgba(1, 8, 23, 0.82);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.malak-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.malak-modal {
    width: min(420px, 90vw);
    max-height: 85vh;
    overflow-y: auto;

    padding: 30px 26px;
    border-radius: 18px;

    border: 1px solid rgba(70, 220, 255, 0.35);

    background: linear-gradient(
        160deg,
        rgba(6, 20, 45, 0.96),
        rgba(1, 8, 23, 0.98)
    );

    box-shadow: 0 0 40px rgba(0, 120, 255, 0.25);
    position: relative;
}

.malak-modal h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    color: #ffe56b;
    text-align: center;
    margin-bottom: 20px;
}

.malak-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
}

.malak-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.malak-type-btn {
    flex: 1;
    padding: 8px 6px;
    border-radius: 10px;
    border: 1px solid rgba(70, 220, 255, 0.4);
    background: rgba(0, 100, 200, 0.15);
    color: white;
    font-family: "Montserrat", sans-serif;
    font-size: 12.5px;
    cursor: pointer;
    transition: 0.25s;
}

.malak-type-btn.active {
    background: linear-gradient(
        135deg,
        rgba(0, 150, 255, 0.75),
        rgba(0, 80, 180, 0.7)
    );
    border-color: rgba(70, 220, 255, 1);
    box-shadow: 0 0 12px rgba(40, 200, 255, 0.5);
}

.malak-field {
    margin-bottom: 14px;
}

.malak-field label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.malak-field input,
.malak-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(70, 220, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    resize: vertical;
}

.malak-field input::placeholder,
.malak-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.malak-submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid rgba(70, 220, 255, 0.9);

    background: linear-gradient(
        135deg,
        rgba(0, 150, 255, 0.65),
        rgba(0, 80, 180, 0.6)
    );

    color: #ffe56b;
    font-family: "Cormorant Garamond", serif;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.malak-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(40, 200, 255, 0.6);
}

.malak-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.malak-status {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    min-height: 18px;
    white-space: pre-wrap;
    line-height: 1.5;
}


/* ---------- Dynamically added content ---------- */

.malak-text-memory {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    background: rgba(0, 100, 200, 0.12);
    border: 1px solid rgba(70, 220, 255, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
}

.malak-memory-caption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(1, 8, 23, 0.55);
    padding: 4px 8px;
    border-radius: 8px;
}

.malak-more-surprises {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
    width: min(500px, 92vw);
}

.malak-mini-surprise {
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid rgba(70, 220, 255, 0.35);
    background: rgba(0, 100, 200, 0.12);
    text-align: center;
}

.malak-mini-surprise span {
    color: #ffe56b;
    font-size: 18px;
}

.malak-mini-surprise p {
    margin-top: 6px;
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}


/* ---------- Visible error banner ---------- */

.malak-error-banner {
    position: fixed;
    bottom: 90px;
    right: 20px;
    left: 20px;
    max-width: 420px;
    margin: 0 auto;
    z-index: 700;

    padding: 14px 18px;
    border-radius: 12px;

    border: 1px solid rgba(255, 90, 90, 0.6);
    background: rgba(60, 10, 10, 0.92);
    color: white;

    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.5;

    box-shadow: 0 0 20px rgba(255, 0, 0, 0.25);
}

.malak-error-banner strong {
    color: #ff9a9a;
    font-size: 14px;
}

.malak-error-banner span {
    word-break: break-word;
    direction: ltr;
    text-align: left;
}

.malak-error-banner button {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
}


/* ---------- Generic per-page additions ---------- */

.malak-generic-section {
    padding: 60px 20px;
    text-align: center;
}

.malak-generic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    max-width: 900px;
    margin: 30px auto 0;
}

.malak-generic-card {
    border-radius: 14px;
    border: 1px solid rgba(70, 220, 255, 0.3);
    background: rgba(0, 100, 200, 0.12);
    overflow: hidden;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.malak-generic-card img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    max-height: 220px;
}

.malak-generic-card p {
    font-family: "Cormorant Garamond", serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

/* =================================================
   Remove (×) button on anything added from the site
================================================= */

.malak-added-item {
    position: relative;
}

.malak-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 30;

    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);

    background: rgba(10, 20, 40, 0.75);
    color: #ffdede;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    padding: 0;
    cursor: pointer;

    backdrop-filter: blur(6px);
    transition: 0.2s;
}

.malak-remove-btn:hover {
    background: rgba(200, 40, 60, 0.85);
    color: #fff;
    transform: scale(1.08);
}

.malak-remove-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* =================================================
   Video support for added items (memory / generic
   cards / ocean stack) — shown in a tall 9:16 frame,
   like an Instagram Reel/Story, since that's the
   natural shape of a phone video.
================================================= */

.malak-video-frame {
    width: min(100%, 300px);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.malak-video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

/* A slightly wider variant for spots with more room (like the
   ocean video carousel, which already has its own title/description
   panel underneath). */
.malak-video-frame-wide {
    width: min(100%, 380px);
}

/* A memory grid item holding a video shouldn't be squeezed into the
   square photo aspect ratio — let it take the natural reel shape
   instead so nothing gets cropped away. */
.gallery-item.malak-has-video {
    aspect-ratio: 9 / 16;
}

.gallery-item.malak-has-video .malak-video-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.malak-video-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    padding: 20px;
    border-radius: 10px;

    background: rgba(0, 100, 200, 0.18);
    border: 1px solid rgba(70, 220, 255, 0.35);

    color: #dffbff;
    text-decoration: none;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    text-align: center;
    transition: 0.2s;
}

.malak-video-link:hover {
    background: rgba(0, 130, 220, 0.32);
}

.malak-video-frame .ocean-video {
    max-height: none;
}


.malak-file-hint {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    line-height: 1.45;
}

.malak-field input[type="file"] {
    cursor: pointer;
}


/* Automatic MP3 artwork notice */


.malak-media-viewer{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;background:rgba(0,5,18,.94);backdrop-filter:blur(10px);opacity:0;pointer-events:none;transition:opacity .25s}.malak-media-viewer.open{opacity:1;pointer-events:auto}body.malak-viewer-open{overflow:hidden}.malak-viewer-stage{width:min(88vw,1100px);height:min(86vh,850px);display:flex;align-items:center;justify-content:center}.malak-viewer-stage img,.malak-viewer-stage video{display:none;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:16px;box-shadow:0 18px 70px rgba(0,0,0,.55)}.malak-viewer-stage img.active,.malak-viewer-stage video.active{display:block}.malak-viewer-close,.malak-viewer-prev,.malak-viewer-next{position:absolute;z-index:5;border:1px solid rgba(255,255,255,.25);background:rgba(5,20,45,.65);color:white;cursor:pointer;backdrop-filter:blur(8px);transition:.2s}.malak-viewer-close:hover,.malak-viewer-prev:hover,.malak-viewer-next:hover{background:rgba(0,130,220,.7)}.malak-viewer-close{top:22px;right:26px;width:46px;height:46px;border-radius:50%;font-size:30px}.malak-viewer-prev,.malak-viewer-next{top:50%;transform:translateY(-50%);width:52px;height:70px;border-radius:18px;align-items:center;justify-content:center;font:48px Arial}.malak-viewer-prev{left:24px}.malak-viewer-next{right:24px}.malak-viewer-counter{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);padding:7px 13px;border-radius:20px;background:rgba(5,20,45,.65);color:rgba(255,255,255,.85);font:12px Montserrat,sans-serif}main img,main video{cursor:zoom-in}@media(max-width:640px){.malak-viewer-stage{width:92vw;height:82vh}.malak-viewer-prev,.malak-viewer-next{width:42px;height:58px;font-size:38px}.malak-viewer-prev{left:8px}.malak-viewer-next{right:8px}.malak-viewer-close{top:12px;right:12px}}


/* =================================================
   Words — Ocean-style image carousel
================================================= */
.words-page .words-filters{margin:28px auto 10px;}
.words-page .filter-btn{min-width:120px;}
.words-photo-viewer{
    width:100%;
    margin:34px auto 0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:28px;
    position:relative;
}
.words-photo-stack{
    position:relative;
    width:min(100%,470px);
    height:560px;
    min-height:560px;
    margin:0 auto;
    overflow:visible;
    isolation:isolate;
}
.words-photo-stack .words-card{
    position:absolute;
    inset:0;
    width:min(84%,410px);
    height:510px;
    min-height:510px;
    aspect-ratio:auto;
    padding:0 !important;
    margin:0;
    border:1px solid rgba(175,235,255,.26) !important;
    border-radius:30px !important;
    background:#071426 !important;
    overflow:hidden;
    cursor:pointer;
    opacity:0;
    pointer-events:none;
    transform:translateX(0) rotate(0) scale(.88);
    box-shadow:0 28px 65px rgba(0,0,0,.42),inset 0 0 35px rgba(70,210,255,.04);
    transition:transform .55s cubic-bezier(.2,.8,.2,1),opacity .45s ease,box-shadow .45s ease,filter .45s ease;
}
.words-photo-stack .words-card > img{
    width:100%;height:100%;min-height:0;display:block;object-fit:cover;
}
.words-photo-stack .words-card.is-current{
    z-index:3;opacity:1;pointer-events:auto;transform:translateX(0) rotate(0) scale(1);
    box-shadow:0 38px 85px rgba(0,0,0,.55),0 0 35px rgba(47,190,255,.2);
}
.words-photo-stack .words-card.is-prev{
    z-index:2;opacity:.72;transform:translateX(-110px) rotate(-7deg) scale(.92);filter:brightness(.72) saturate(.85);pointer-events:none;
}
.words-photo-stack .words-card.is-next{
    z-index:2;opacity:.72;transform:translateX(110px) rotate(7deg) scale(.92);filter:brightness(.72) saturate(.85);pointer-events:none;
}
.words-photo-stack .words-card.is-hidden-category{display:none;}
.words-photo-stack .words-card::after{content:'✦';position:absolute;top:16px;right:18px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(175,235,255,.3);background:rgba(2,24,52,.52);color:#bdf5ff;backdrop-filter:blur(10px);box-shadow:0 8px 25px rgba(0,0,0,.22);pointer-events:none;}
.words-photo-stack .malak-remove-btn{z-index:8;}
.words-photo-viewer .ocean-media-arrow{flex:0 0 auto;z-index:10;}
.words-page #wordsDots{margin-top:24px;}
.words-page #wordsCounter{margin-top:10px;}
.words-empty-state{display:grid;place-items:center;width:100%;height:100%;border:1px dashed rgba(175,235,255,.22);border-radius:30px;background:rgba(7,20,38,.55);color:rgba(235,250,255,.8);text-align:center;padding:30px;}
.words-empty-state strong{font-family:'Cormorant Garamond',serif;font-size:28px;display:block;}
.words-empty-state small{display:block;margin-top:8px;font-family:'Montserrat',sans-serif;opacity:.7;}
@media(max-width:900px){
    .words-photo-viewer{gap:10px;}
    .words-photo-stack{height:540px;min-height:540px;width:min(100%,470px);}
    .words-photo-stack .words-card.is-prev{transform:translateX(-55px) rotate(-5deg) scale(.9);}
    .words-photo-stack .words-card.is-next{transform:translateX(55px) rotate(5deg) scale(.9);}
}
@media(max-width:700px){
    .words-photo-viewer{gap:5px;}
    .words-photo-stack{height:530px;min-height:530px;width:min(100%,430px);}
    .words-photo-stack .words-card.is-prev{transform:translateX(-42px) rotate(-4deg) scale(.91);}
    .words-photo-stack .words-card.is-next{transform:translateX(42px) rotate(4deg) scale(.91);}
}

.malak-field select.malak-select{
    width:100%;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid rgba(70,220,255,.3);
    background:rgba(6,20,45,.96);
    color:white;
    font-family:"Montserrat",sans-serif;
    font-size:14px;
}


/* Words — direct writing Notes */
.words-notes{width:min(100%,760px);margin:55px auto 25px;padding:24px;border:1px solid rgba(175,235,255,.18);border-radius:28px;background:rgba(4,18,38,.48);box-shadow:0 25px 65px rgba(0,0,0,.28),inset 0 0 35px rgba(70,210,255,.035);backdrop-filter:blur(12px)}
.words-notes-heading{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:20px;color:#bdf5ff}.words-notes-heading h3{margin:0;font:600 30px 'Cormorant Garamond',serif;color:#fff}.words-note-list{display:grid;gap:16px}.words-note-card{position:relative;padding:18px 20px 20px;border-radius:22px;background:rgba(255,255,255,.055);border:1px solid rgba(175,235,255,.14);box-shadow:0 14px 35px rgba(0,0,0,.2)}.words-note-top{display:flex;gap:8px;margin-bottom:8px;color:#bdf5ff;font:12px Montserrat,sans-serif}.words-note-saved{margin-left:auto;opacity:.55;font-size:10px}.words-note-editor{width:100%;min-height:180px;resize:vertical;border:0;outline:0;background:transparent;color:#fff;padding:8px 4px;font:400 22px/1.45 'Cormorant Garamond',serif}.words-note-editor::placeholder{color:rgba(235,250,255,.4)}.words-new-note{display:block;margin:18px auto 0;padding:10px 18px;border-radius:999px;border:1px solid rgba(175,235,255,.22);background:rgba(2,24,52,.5);color:#d9f8ff;cursor:pointer;font:500 12px Montserrat,sans-serif;transition:.2s}.words-new-note:hover{transform:translateY(-2px);background:rgba(10,65,105,.55)}
@media(max-width:700px){.words-notes{padding:18px;margin-top:42px}.words-note-editor{font-size:21px;min-height:210px}.words-notes-heading h3{font-size:27px}}

/* Words: keep Notes as an independent tab/panel */
#wordsMediaPanel[hidden], #wordsNotes[hidden]{display:none !important;}

/* =================================================
   Generic compact stack carousel — reusable version
   of the Words/Ocean stack, for any page (used by the
   Messages/About page's Photos + Videos tabs). Fixed
   height regardless of how many items exist, so it
   never grows into a big page-filling grid.
================================================= */
.malak-stack-viewer{
    width:100%;
    margin:34px auto 0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:28px;
    position:relative;
}
.malak-stack{
    position:relative;
    width:min(100%,470px);
    height:560px;
    min-height:560px;
    margin:0 auto;
    overflow:visible;
    isolation:isolate;
}
.malak-stack .malak-stack-card{
    position:absolute;
    inset:0;
    width:min(84%,410px);
    height:510px;
    min-height:510px;
    margin:0;
    border:1px solid rgba(175,235,255,.26);
    border-radius:30px;
    background:#071426;
    overflow:hidden;
    cursor:pointer;
    opacity:0;
    pointer-events:none;
    transform:translateX(0) rotate(0) scale(.88);
    box-shadow:0 28px 65px rgba(0,0,0,.42),inset 0 0 35px rgba(70,210,255,.04);
    transition:transform .55s cubic-bezier(.2,.8,.2,1),opacity .45s ease,box-shadow .45s ease,filter .45s ease;
}
.malak-stack .malak-stack-card > img,
.malak-stack .malak-stack-card > video{
    width:100%;height:100%;min-height:0;display:block;object-fit:cover;
}
.malak-stack .malak-stack-card.is-current{
    z-index:3;opacity:1;pointer-events:auto;transform:translateX(0) rotate(0) scale(1);
    box-shadow:0 38px 85px rgba(0,0,0,.55),0 0 35px rgba(47,190,255,.2);
}
.malak-stack .malak-stack-card.is-prev{
    z-index:2;opacity:.72;transform:translateX(-110px) rotate(-7deg) scale(.92);filter:brightness(.72) saturate(.85);pointer-events:none;
}
.malak-stack .malak-stack-card.is-next{
    z-index:2;opacity:.72;transform:translateX(110px) rotate(7deg) scale(.92);filter:brightness(.72) saturate(.85);pointer-events:none;
}
.malak-stack .malak-remove-btn{z-index:8;}
.malak-stack-viewer .ocean-media-arrow{flex:0 0 auto;z-index:10;}
.malak-media-panel #aboutPhotoDots,
.malak-media-panel #aboutVideoDots{margin-top:24px;}
.malak-media-panel #aboutPhotoCounter,
.malak-media-panel #aboutVideoCounter{margin-top:10px;}
.malak-stack-empty{display:grid;place-items:center;width:100%;height:100%;border:1px dashed rgba(175,235,255,.22);border-radius:30px;background:rgba(7,20,38,.55);color:rgba(235,250,255,.8);text-align:center;padding:30px;}
.malak-stack-empty strong{font-family:'Cormorant Garamond',serif;font-size:28px;display:block;}
.malak-stack-empty small{display:block;margin-top:8px;font-family:'Montserrat',sans-serif;opacity:.7;}
@media(max-width:900px){
    .malak-stack-viewer{gap:10px;}
    .malak-stack{height:540px;min-height:540px;width:min(100%,470px);}
    .malak-stack .malak-stack-card.is-prev{transform:translateX(-55px) rotate(-5deg) scale(.9);}
    .malak-stack .malak-stack-card.is-next{transform:translateX(55px) rotate(5deg) scale(.9);}
}
@media(max-width:700px){
    .malak-stack-viewer{gap:5px;}
    .malak-stack{height:530px;min-height:530px;width:min(100%,430px);}
    .malak-stack .malak-stack-card.is-prev{transform:translateX(-42px) rotate(-4deg) scale(.91);}
    .malak-stack .malak-stack-card.is-next{transform:translateX(42px) rotate(4deg) scale(.91);}
}

/* =================================================
   Photo/Video switch — reusable tab UI (used on the
   Messages/About page; same visual language as the
   Ocean page's Photos/Videos switch).
================================================= */

.malak-switch-wrap {
    display: flex;
    justify-content: center;
    margin: 34px auto 10px;
}

.malak-switch {
    display: flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(120, 220, 255, 0.22);
    background: rgba(2, 18, 42, 0.56);
    backdrop-filter: blur(18px);
    border-radius: 999px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24), inset 0 0 22px rgba(70, 190, 255, 0.05);
}

.malak-switch-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 23px;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: 0.35s ease;
}

.malak-switch-btn.active,
.malak-switch-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(26, 152, 255, 0.72), rgba(0, 74, 170, 0.68));
    box-shadow: 0 0 22px rgba(47, 188, 255, 0.28);
}

.malak-switch-btn .switch-icon {
    margin-right: 7px;
    color: #9eeeff;
}

.malak-media-panel {
    display: none;
}

.malak-media-panel.active {
    display: block;
}

/* Video inside a compact stack card should fill the card exactly,
   not use its own separate reel-frame sizing. */
.malak-stack .malak-stack-card .malak-video-frame {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}
.malak-stack .malak-stack-card .malak-video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   MESSAGES — switch + media side-by-side
   Photos/videos use an Instagram-like portrait card (4:5),
   while the whole area stays compact and centered.
========================================================= */
.about-section{
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:100%;
    box-sizing:border-box;
    padding:90px 5% 70px !important;
}

.about-section .about-card{
    width:min(100%, 680px);
    flex:0 0 auto;
}

/* The switch and the selected media sit beside each other. */
.about-section .malak-switch-wrap{
    width:min(100%, 980px);
    display:flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    margin:26px auto 0;
    padding:0;
}

.about-section .malak-media-panel{
    width:min(100%, 980px);
    box-sizing:border-box;
    margin:0 auto;
}

/* Turn the panel itself into the horizontal row. */
.about-section .malak-switch-wrap + .malak-media-panel{
    margin-top:-48px;
    padding-left:300px;
}

.about-section .malak-switch-wrap{
    position:relative;
    z-index:20;
}

.about-section .malak-stack-viewer{
    width:100%;
    margin:0 auto;
    gap:16px;
    min-height:0;
}

/* Instagram-style 4:5 media card, but kept reasonably small. */
.about-section .malak-stack{
    width:min(100%, 360px);
    height:450px;
    min-height:450px;
    flex:0 0 360px;
}

.about-section .malak-stack .malak-stack-card{
    width:100%;
    height:100%;
    min-height:0;
    left:50%;
    right:auto;
    inset-inline-start:50%;
    border-radius:24px;
    overflow:hidden;
    transform:translateX(-50%) rotate(0) scale(.90);
}

.about-section .malak-stack .malak-stack-card.is-current{
    transform:translateX(-50%) rotate(0) scale(1);
    z-index:4;
    opacity:1;
    filter:none;
    pointer-events:auto;
}

.about-section .malak-stack .malak-stack-card.is-prev{
    transform:translateX(calc(-50% - 70px)) rotate(-4deg) scale(.91);
}

.about-section .malak-stack .malak-stack-card.is-next{
    transform:translateX(calc(-50% + 70px)) rotate(4deg) scale(.91);
}

.about-section .malak-stack .malak-stack-card > img,
.about-section .malak-stack .malak-stack-card > video,
.about-section .malak-stack .malak-stack-card .malak-video-frame,
.about-section .malak-stack .malak-stack-card .malak-video-frame video{
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
    display:block;
    object-fit:cover;
}

/* Keep the video controls usable. */
.about-section .malak-stack .malak-stack-card .malak-video-frame video{
    pointer-events:auto;
    background:#000;
}

.about-section .malak-media-panel #aboutPhotoDots,
.about-section .malak-media-panel #aboutVideoDots{
    margin-top:14px;
}

.about-section .malak-media-panel #aboutPhotoCounter,
.about-section .malak-media-panel #aboutVideoCounter{
    margin-top:7px;
}

@media(max-width:850px){
    .about-section .malak-switch-wrap + .malak-media-panel{
        margin-top:18px;
        padding-left:0;
    }
    .about-section .malak-switch-wrap{
        justify-content:center;
    }
    .about-section .malak-stack{
        width:min(100%, 350px);
        flex-basis:350px;
        height:438px;
        min-height:438px;
    }
}

@media(max-width:520px){
    .about-section{padding:80px 14px 60px !important;}
    .about-section .malak-stack-viewer{gap:6px;}
    .about-section .malak-stack{
        width:min(100%, 320px);
        flex-basis:320px;
        height:400px;
        min-height:400px;
    }
    .about-section .malak-stack .malak-stack-card.is-prev{
        transform:translateX(calc(-50% - 40px)) rotate(-3deg) scale(.90);
    }
    .about-section .malak-stack .malak-stack-card.is-next{
        transform:translateX(calc(-50% + 40px)) rotate(3deg) scale(.90);
    }
}

