/* =========================================================
   HYDRA PROJECT SHOW PAGE — FULL FIXED STYLESHEET (FINAL)
   ========================================================= */

.hydra-project-page-title { margin-bottom: 40px !important; }
.hydra-project-detail { direction: rtl; width: 100%; box-sizing: border-box; padding-top: 0 !important; padding-bottom: 20px !important; }
.hydra-project-detail > .container { padding-top: 0 !important; padding-bottom: 0 !important; }

/* =========================================================
   BACK BUTTON
   ========================================================= */
.hydra-project-back { width: 100%; display: flex; justify-content: flex-end; direction: rtl; margin: 0 0 20px; }
.hydra-project-back-button {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 18px;
    border: 1px solid #f9a305; border-radius: 8px;
    background: #f9a305; color: #ffffff;
    font-family: Tahoma, Arial, sans-serif; font-size: 13px; font-weight: 500;
    line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.hydra-project-back-button:hover, .hydra-project-back-button:focus { background: #ffffff; border-color: #f9a305; color: #f9a305; text-decoration: none; outline: none; transform: translateY(-1px); }
.hydra-project-back-button:focus-visible { outline: 2px solid #f9a305; outline-offset: 3px; }

/* Desktop: hide the arrow, show only text */
.back-arrow { display: none !important; }
.back-text { display: inline-block !important; }

/* Mobile: show only arrow centered, hide text */
@media (max-width: 768px) {
    html[dir="rtl"] .hydra-project-back { justify-content: flex-end !important; }
    html[dir="ltr"] .hydra-project-back { justify-content: flex-start !important; }

    .hydra-project-back-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        border-radius: 50% !important;
        background: #f9a305 !important;
        box-sizing: border-box !important;
        position: relative !important;
    }

    html[dir="ltr"] .hydra-project-back-button .back-arrow,
    html[dir="rtl"] .hydra-project-back-button .back-arrow {
        position: absolute !important;
        top: 7px !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 22px !important;
        line-height: 1 !important;
        font-weight: bold !important;
        color: #ffffff !important;
        direction: ltr !important;
    }

    .hydra-project-back-button .back-text {
        display: none !important;
    }
}

/* =========================================================
   MEDIA GRID & PAGINATION
   ========================================================= */
.hydra-media-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -10px !important;
    width: 100% !important;
}

.hydra-media-item {
    width: 25% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

@media (max-width: 991px) { .hydra-media-item { width: 33.33% !important; } }
@media (max-width: 767px) { .hydra-media-item { width: 50% !important; } }
@media (max-width: 480px) { .hydra-media-item { width: 100% !important; } }

.hydra-media-preview {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.hydra-media-preview img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.hydra-media-preview:hover img {
    transform: scale(1.05) !important;
}

.hydra-media-preview .hydra-project-image-overlay,
.hydra-media-preview .hydra-project-video-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.hydra-media-preview:hover .hydra-project-image-overlay,
.hydra-media-preview:hover .hydra-project-video-overlay {
    opacity: 1 !important;
}

.hydra-media-preview .hydra-project-video-overlay {
    opacity: 0.9 !important;
    background: rgba(249, 163, 5, 0.9) !important;
    color: #171a1d !important;
}

.hydra-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}
.hydra-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #555;
    border: none;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hydra-page-btn:hover:not(:disabled):not(.active) {
    background: #e0e0e0;
}
.hydra-page-btn.active {
    background: #f9a305;
    color: #fff;
}
.hydra-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hydra-project-empty-media {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 300px; padding: 40px; box-sizing: border-box;
    border-radius: 18px; background: #171a1d; color: #ffffff;
    font-family: Tahoma, Arial, sans-serif; font-size: 15px; text-align: center;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
#projectMediaLightbox {
    position: fixed !important; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 999999 !important; display: none; width: 100vw; height: 100vh;
    padding: 30px; box-sizing: border-box; background: rgba(0, 0, 0, 0.94); direction: rtl;
    opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}
#projectMediaLightbox.is-open {
    display: flex !important; align-items: center !important; justify-content: center !important;
    opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
}

.project-lightbox-main {
    position: relative !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    width: auto !important; height: auto !important;
    max-width: calc(100vw - 180px) !important; max-height: calc(100vh - 100px) !important;
    margin: 0 !important; padding: 0 !important; box-sizing: border-box !important;
    background: transparent !important;
}

.project-lightbox-media {
    position: relative !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    width: auto !important; height: auto !important; max-width: 100% !important; max-height: 90vh !important;
    margin: 0 !important; padding: 0 !important; box-sizing: border-box !important; overflow: hidden !important;
    background: transparent !important;
}

.project-lightbox-media img.project-lightbox-image {
    display: block !important; position: relative !important;
    width: auto !important; height: auto !important; max-width: 100% !important; max-height: 90vh !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    object-fit: contain !important; object-position: center center !important;
    visibility: visible !important; opacity: 1 !important;
    background: transparent !important;
}

.project-lightbox-media video,
.project-lightbox-media .media-player,
.project-lightbox-media .media-player .media-media {
    display: block !important; position: relative !important;
    width: auto !important; height: auto !important; max-width: 100% !important; max-height: 90vh !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    background: #000 !important; object-fit: contain !important; object-position: center center !important;
    visibility: visible !important; opacity: 1 !important; line-height: 0 !important;
}

/* Lightbox Buttons */
.project-lightbox-close {
    position: absolute !important; top: 20px !important; right: 20px !important; left: auto !important;
    z-index: 200 !important; display: flex !important; align-items: center !important; justify-content: center !important;
    width: 46px !important; height: 46px !important; padding: 0 !important; margin: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: #f9a305 !important; color: #ffffff !important;
    cursor: pointer !important; box-sizing: border-box !important; transition: background 0.2s ease, transform 0.2s ease;
}
.project-lightbox-close i { font-size: 20px !important; color: #fff !important; pointer-events: none !important; }
.project-lightbox-close:hover { background: #ffb733 !important; transform: scale(1.08) !important; }

.project-lightbox-prev, .project-lightbox-next {
    position: absolute !important; top: 50% !important; z-index: 200 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 50px !important; height: 50px !important; padding: 0 !important; margin: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: rgba(23, 26, 29, 0.92) !important; color: #ffffff !important;
    cursor: pointer !important; box-sizing: border-box !important; transform: translateY(-50%) !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.project-lightbox-prev i, .project-lightbox-next i { font-size: 22px !important; color: #fff !important; pointer-events: none !important; }
.project-lightbox-prev { right: 20px !important; left: auto !important; }
.project-lightbox-next { left: 20px !important; right: auto !important; }
.project-lightbox-prev:hover, .project-lightbox-next:hover { background: #f9a305 !important; color: #171a1d !important; transform: translateY(-50%) scale(1.08) !important; }

.project-lightbox-counter {
    position: absolute !important; right: 50% !important; bottom: 20px !important; z-index: 200 !important;
    padding: 6px 11px !important; border-radius: 8px !important; background: rgba(23, 26, 29, 0.88) !important; color: #ffffff !important;
    font-family: Arial, sans-serif !important; font-size: 12px !important; direction: ltr !important;
    transform: translateX(50%) !important; white-space: nowrap !important; pointer-events: none !important;
}

body.project-lightbox-open { overflow: hidden !important; }
html.project-lightbox-open { overflow: hidden !important; }

/* =========================================================
   BREADCRUMB
   ========================================================= */
.page-title nav[aria-label="breadcrumb"],
.page-title .page-breadcrumb { display: flex !important; justify-content: center !important; align-items: center !important; width: 100% !important; background: transparent !important; padding: 0 !important; margin: 0 !important; }
.page-title .breadcrumb { display: inline-flex !important; align-items: center !important; justify-content: center !important; flex-wrap: wrap !important; width: auto !important; max-width: 100% !important; background: #ffffff !important; margin: 0 auto !important; padding: 8px 18px !important; border-radius: 4px !important; box-shadow: 0 2px 10px rgba(0,0,0,.06) !important; gap: 0 !important; list-style: none !important; }
.page-title .breadcrumb-item { display: inline-flex !important; align-items: center !important; font-size: 14px !important; line-height: 1.5 !important; padding: 0 !important; margin: 0 !important; float: none !important; }
.page-title .breadcrumb-item:not(.active) a { display: inline-flex !important; align-items: center !important; color: inherit !important; text-decoration: none !important; }
.page-title .breadcrumb-item:not(.active) a:hover { color: #f9a305 !important; text-decoration: none !important; }
.page-title .breadcrumb-item.active, .page-title .breadcrumb-item.active a { display: inline-flex !important; align-items: center !important; color: #f9a305 !important; text-decoration: none !important; }
html[dir="ltr"] .page-title .breadcrumb-item + .breadcrumb-item::before,
html[dir="rtl"] .page-title .breadcrumb-item + .breadcrumb-item::before { content: "/" !important; display: inline-block !important; padding: 0 8px !important; color: #999999 !important; font-size: inherit !important; }

@media (max-width: 767.98px) {
    .page-title .breadcrumb { padding: 6px 14px !important; }
    .page-title .breadcrumb-item, .page-title .breadcrumb-item a, .page-title .breadcrumb-item.active, .page-title .breadcrumb-item.active a, .page-title .breadcrumb-item i,
    html[dir="ltr"] .page-title .breadcrumb-item + .breadcrumb-item::before,
    html[dir="rtl"] .page-title .breadcrumb-item + .breadcrumb-item::before { font-size: 12px !important; }
    .project-lightbox-main { max-width: calc(100vw - 30px) !important; max-height: 85vh !important; }
    .project-lightbox-media img.project-lightbox-image,
    .project-lightbox-media video,
    .project-lightbox-media .media-player,
    .project-lightbox-media .media-player .media-media { max-width: 100% !important; max-height: 85vh !important; }
    .project-lightbox-close { top: 12px !important; right: 12px !important; width: 42px !important; height: 42px !important; }
    .project-lightbox-prev, .project-lightbox-next { width: 44px !important; height: 44px !important; }
    .project-lightbox-prev { right: 8px !important; }
    .project-lightbox-next { left: 8px !important; }
    .project-lightbox-counter { bottom: 10px !important; }
}

/* =========================================================
   LTR / RTL FIXES
   ========================================================= */
html[dir="ltr"] .breadcrumb { direction: ltr !important; display: flex !important; flex-direction: row !important; justify-content: center !important; align-items: center !important; padding: 15px !important; margin: 0 !important; text-align: left !important; }
html[dir="ltr"] .breadcrumb-item { display: inline-flex !important; align-items: center !important; float: none !important; padding: 0 !important; margin: 0 !important; direction: ltr !important; order: initial !important; text-align: left !important; }
html[dir="ltr"] .breadcrumb-item a, html[dir="ltr"] .breadcrumb-item.active { direction: ltr !important; display: inline-flex !important; align-items: center !important; padding: 0 !important; }
html[dir="ltr"] .breadcrumb-item + .breadcrumb-item::before { content: "/" !important; display: inline-block !important; padding-left: 10px !important; padding-right: 10px !important; margin: 0 !important; color: inherit !important; float: none !important; order: initial !important; }
html[dir="ltr"] .hydra-project-back { direction: ltr !important; justify-content: flex-start !important; }
html[dir="ltr"] .hydra-project-back-button { flex-direction: row !important; }
html[dir="ltr"] .hydra-project-detail, html[dir="ltr"] .hydra-project-information { direction: ltr !important; }
html[dir="ltr"] .hydra-project-information .section-title, html[dir="ltr"] .hydra-project-information .section-title .title { text-align: left !important; }
html[dir="ltr"] .hydra-project-meta { direction: ltr !important; justify-content: flex-start !important; }
html[dir="ltr"] .hydra-project-meta-item { direction: ltr !important; }
html[dir="ltr"] .hydra-project-description { direction: ltr !important; text-align: left !important; border-right: 0 !important; border-left: 3px solid #f9a305 !important; border-radius: 4px 0 0 4px !important; padding: 0 0 0 24px !important; }
html[dir="ltr"] #projectMediaLightbox { direction: ltr !important; }
html[dir="ltr"] .project-lightbox-close { right: 20px !important; left: auto !important; }
html[dir="ltr"] .project-lightbox-prev { right: 20px !important; left: auto !important; }
html[dir="ltr"] .project-lightbox-next { left: 20px !important; right: auto !important; }
html[dir="ltr"] .project-lightbox-counter { right: 50% !important; left: auto !important; transform: translateX(50%) !important; }

@media (max-width: 768px) {
    html[dir="ltr"] .hydra-project-back { justify-content: flex-start !important; }
    html[dir="ltr"] .project-lightbox-close { right: 12px !important; left: auto !important; }
    html[dir="ltr"] .project-lightbox-prev { right: 8px !important; left: auto !important; }
    html[dir="ltr"] .project-lightbox-next { left: 8px !important; right: auto !important; }
}

/* =========================================================
   ENGLISH PAGES — SWAP FONT (KILL PERSIAN DIGITS)
   ========================================================= */
html[dir="ltr"] body, html[dir="ltr"] body p, html[dir="ltr"] body span, html[dir="ltr"] body h1, html[dir="ltr"] body h2, html[dir="ltr"] body h3, html[dir="ltr"] body h4, html[dir="ltr"] body h5, html[dir="ltr"] body h6, html[dir="ltr"] body a, html[dir="ltr"] body li, html[dir="ltr"] body button, html[dir="ltr"] body div, html[dir="ltr"] .page-title, html[dir="ltr"] .page-title *, html[dir="ltr"] .breadcrumb, html[dir="ltr"] .breadcrumb *, html[dir="ltr"] .hydra-project-detail, html[dir="ltr"] .hydra-project-detail *, html[dir="ltr"] .hydra-project-information, html[dir="ltr"] .hydra-project-information *, html[dir="ltr"] .hydra-project-meta, html[dir="ltr"] .hydra-project-meta *, html[dir="ltr"] .hydra-project-meta-item, html[dir="ltr"] .hydra-project-meta-item *, html[dir="ltr"] .hydra-project-back-button, html[dir="ltr"] .hydra-project-back-button *, html[dir="ltr"] .project-media-lightbox, html[dir="ltr"] .project-media-lightbox * {
    font-family: Arial, Helvetica, sans-serif !important; font-variant-numeric: lining-nums !important; direction: ltr !important; unicode-bidi: isolate !important;
}
html[dir="rtl"] body, html[dir="rtl"] .page-title, html[dir="rtl"] .page-title *, html[dir="rtl"] .breadcrumb, html[dir="rtl"] .breadcrumb *, html[dir="rtl"] .hydra-project-detail, html[dir="rtl"] .hydra-project-detail * {
    font-family: 'Vazirmatn RD FD', sans-serif !important;
}

/* =========================================================
   FORCE HOME ICON TO SHOW
   ========================================================= */
.page-title .breadcrumb-item a i.fas,
.page-title .breadcrumb-item a i.fas::before {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome", "FontAwesome5Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
}
html[dir="rtl"] .page-title .breadcrumb-item a i.fas,
html[dir="rtl"] .page-title .breadcrumb-item a i.fas::before,
html[dir="ltr"] .page-title .breadcrumb-item a i.fas,
html[dir="ltr"] .page-title .breadcrumb-item a i.fas::before {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "FontAwesome", "FontAwesome5Free" !important;
    font-weight: 900 !important;
}

/* =========================================================
   HIDE LIGHTBOX ARROWS ON MOBILE
   ========================================================= */
@media (max-width: 768px) {
    #projectMediaLightbox .project-lightbox-prev,
    #projectMediaLightbox .project-lightbox-next {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* =========================================================
   MATCH MEDIA PLAYER STYLE TO INDEX.PHP EXACTLY
   ========================================================= */
.project-lightbox-media .media-player {
    position: relative !important; display: inline-block !important; width: auto !important; height: auto !important;
    max-width: 100% !important; max-height: 90vh !important; margin: 0 !important; padding: 0 !important; box-sizing: border-box !important;
    background: #000 !important; color: #fff !important; line-height: 0 !important; overflow: hidden !important; border-radius: 8px !important; z-index: 2147483640 !important;
}
.project-lightbox-media .media-player .media-media,
.project-lightbox-media .media-player video.media-media {
    display: block !important; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 90vh !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: #000 !important; object-fit: contain !important; line-height: 0 !important;
}
.project-lightbox-media .media-player .media-toolbar {
    position: absolute !important; right: 0 !important; bottom: 0 !important; left: 0 !important; top: auto !important; z-index: 9999 !important;
    display: flex !important; align-items: center !important; flex-wrap: nowrap !important; width: 100% !important; min-height: 52px !important; height: auto !important;
    margin: 0 !important; padding: 6px 10px !important; box-sizing: border-box !important;
    background: linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .65) 60%, transparent) !important;
    color: #fff !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; line-height: 1 !important; direction: ltr !important; overflow: visible !important;
}
.project-lightbox-media .media-player .media-control {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 auto !important;
    width: 38px !important; min-width: 38px !important; height: 38px !important; margin: 0 !important; padding: 6px !important; border: 0 !important; border-radius: 6px !important;
    background: transparent !important; color: #fff !important; cursor: pointer !important; box-sizing: border-box !important; line-height: 1 !important; opacity: 1 !important; visibility: visible !important;
    transition: background .15s ease, color .15s ease;
}
.project-lightbox-media .media-player .media-control:hover,
.project-lightbox-media .media-player .media-control:focus { background: rgba(249, 163, 5, .9) !important; color: #171a1d !important; outline: none !important; }
.project-lightbox-media .media-player .media-symbol {
    display: block !important; width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;
    color: currentColor !important; fill: currentColor !important; stroke: currentColor !important; visibility: visible !important; opacity: 1 !important; overflow: visible !important;
}
.project-lightbox-media .media-player .media-symbol path,
.project-lightbox-media .media-player .media-symbol polygon,
.project-lightbox-media .media-player .media-symbol circle,
.project-lightbox-media .media-player .media-symbol rect { fill: currentColor !important; stroke: currentColor !important; }
.project-lightbox-media .media-player .media-text {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; flex: 0 0 auto !important;
    min-width: 40px !important; margin: 0 4px !important; padding: 0 !important; color: #fff !important; font-family: Arial, sans-serif !important;
    font-size: 12px !important; line-height: 1 !important; white-space: nowrap !important; direction: ltr !important; opacity: 1 !important; visibility: visible !important;
}
.project-lightbox-media .media-player .media-slider {
    display: inline-flex !important; align-items: center !important; flex: 1 1 auto !important; width: auto !important; min-width: 60px !important;
    height: 38px !important; margin: 0 6px !important; padding: 0 4px !important; border: 0 !important; background: transparent !important;
    cursor: pointer !important; box-sizing: border-box !important; line-height: 1 !important; opacity: 1 !important; visibility: visible !important;
}
.project-lightbox-media .media-player .media-slider:focus { outline: none !important; background: rgba(255, 255, 255, .06) !important; border-radius: 6px !important; }
.project-lightbox-media .media-player .media-slider .media-range {
    display: block !important; position: relative !important; flex: 1 1 auto !important; width: 100% !important; height: 5px !important; margin: 0 !important; padding: 0 !important;
    background: rgba(255, 255, 255, .28) !important; border-radius: 999px !important; overflow: hidden !important; box-sizing: border-box !important; visibility: visible !important; opacity: 1 !important;
}
.project-lightbox-media .media-player .media-slider .media-meter {
    display: block !important; height: 100% !important; width: 0%; margin: 0 !important; padding: 0 !important; background: #f9a305 !important;
    border-radius: 999px !important; box-sizing: border-box !important; visibility: visible !important; opacity: 1 !important; transition: width .12s linear;
}
.project-lightbox-media .media-player .media-volume { flex: 0 0 90px !important; width: 90px !important; min-width: 90px !important; max-width: 90px !important; }

@media (max-width: 767.98px) {
    .project-lightbox-media .media-player .media-toolbar { min-height: 46px !important; padding: 4px 6px !important; padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important; }
    .project-lightbox-media .media-player .media-control { width: 34px !important; min-width: 34px !important; height: 34px !important; padding: 5px !important; }
    .project-lightbox-media .media-player .media-symbol { width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; }
    .project-lightbox-media .media-player .media-text { min-width: 34px !important; margin: 0 2px !important; font-size: 11px !important; }
    .project-lightbox-media .media-player .media-slider { height: 34px !important; margin: 0 4px !important; padding: 0 3px !important; }
    .project-lightbox-media .media-player .media-volume { flex: 0 0 60px !important; width: 60px !important; min-width: 60px !important; max-width: 60px !important; }
}

/* =========================================================
   EXACT MIDDLE ALIGNMENT FOR VIDEO PLAYER (LIKE INDEX.PHP)
   ========================================================= */
@media (max-width: 767.98px) {
    #projectMediaLightbox { display: flex !important; align-items: center !important; justify-content: center !important; padding: 15px !important; }
    #projectMediaLightbox .project-lightbox-main { display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; margin: 0 !important; padding: 0 !important; }
    #projectMediaLightbox .project-lightbox-media { display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; }
    #projectMediaLightbox .project-lightbox-media video,
    #projectMediaLightbox .project-lightbox-media .media-player {
        display: flex !important; align-items: center !important; justify-content: center !important;
        width: auto !important; height: auto !important; max-width: 100% !important; max-height: 85vh !important;
        margin: auto !important; position: relative !important; top: auto !important; bottom: auto !important; left: auto !important; right: auto !important;
    }
    #projectMediaLightbox .project-lightbox-media .media-player .media-media {
        width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 85vh !important; object-fit: contain !important; margin: auto !important;
    }
}

/* =========================================================
   FIX LIGHTBOX BACKGROUND (TRANSPARENT LIKE INDEX.PHP)
   ========================================================= */
#projectMediaLightbox .project-lightbox-main,
#projectMediaLightbox .project-lightbox-media,
#projectMediaLightbox .project-lightbox-media-container {
    background: transparent !important; background-color: transparent !important; box-shadow: none !important; border: none !important;
}
#projectMediaLightbox { background: rgba(0, 0, 0, 0.94) !important; }
#projectMediaLightbox .project-lightbox-media img.project-lightbox-image { background: transparent !important; background-color: transparent !important; }


/* =========================================================
   FIX VIDEO PLAY BUTTON — RTL AND LTR
   ========================================================= */

.hydra-media-preview .hydra-project-video-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: rgba(249, 163, 5, 0.95) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 0.95 !important;
}

/* Remove the broken font-based icon */
.hydra-media-preview .hydra-project-video-overlay > * {
    display: none !important;
}

/* Draw a proper play triangle */
.hydra-media-preview .hydra-project-video-overlay::before {
    content: "" !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    margin-left: 5px !important;
    border-top: 9px solid transparent !important;
    border-bottom: 9px solid transparent !important;
    border-left: 14px solid #171a1d !important;
    border-right: 0 !important;
    font-family: Arial, sans-serif !important;
}

/* Keep the button centered on mobile too */
@media (max-width: 767.98px) {
    .hydra-media-preview .hydra-project-video-overlay {
        width: 50px !important;
        height: 50px !important;
    }
}


/* =========================================================
   FIX LIGHTBOX CLOSE BUTTON ICON
   ========================================================= */

#projectMediaLightbox .project-lightbox-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Hide the broken font-based icon */
#projectMediaLightbox .project-lightbox-close i {
    display: none !important;
}

/* Draw a proper close symbol */
#projectMediaLightbox .project-lightbox-close::before {
    content: "\00D7" !important;
    display: block !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: #ffffff !important;
}

/* Preserve the existing mobile button dimensions */
@media (max-width: 767.98px) {
    #projectMediaLightbox .project-lightbox-close {
        width: 42px !important;
        height: 42px !important;
    }

    #projectMediaLightbox .project-lightbox-close::before {
        font-size: 30px !important;
    }
}


/* =========================================================
   FIX LIGHTBOX LEFT / RIGHT NAVIGATION ARROWS
   ========================================================= */

/* Keep both navigation buttons intact */
#projectMediaLightbox .project-lightbox-prev,
#projectMediaLightbox .project-lightbox-next {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
}

/* Hide broken font icons */
#projectMediaLightbox .project-lightbox-prev i,
#projectMediaLightbox .project-lightbox-next i {
    display: none !important;
}

/* RIGHT ARROW — previous button */
#projectMediaLightbox .project-lightbox-prev::before {
    content: "" !important;
    display: block !important;
    width: 11px !important;
    height: 11px !important;
    border-top: 3px solid #ffffff !important;
    border-right: 3px solid #ffffff !important;
    transform: rotate(45deg) !important;
    margin-left: -5px !important;
    box-sizing: border-box !important;
}

/* LEFT ARROW — next button */
#projectMediaLightbox .project-lightbox-next::before {
    content: "" !important;
    display: block !important;
    width: 11px !important;
    height: 11px !important;
    border-top: 3px solid #ffffff !important;
    border-left: 3px solid #ffffff !important;
    transform: rotate(-45deg) !important;
    margin-right: -5px !important;
    box-sizing: border-box !important;
}

/* Ensure the lightbox main area captures horizontal swipes without page scroll fighting */
.project-lightbox-main {
    touch-action: pan-y pinch-zoom;
    overscroll-behavior: contain;
}

.project-lightbox-media {
    touch-action: pan-y pinch-zoom;
}

/* =========================================================
   FIX MOBILE CENTERING FOR MEDIA GRID
   ========================================================= */
@media (max-width: 480px) {
    /* 1. Reset the grid wrapper completely */
    #projectsMediaGrid {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        direction: rtl !important; /* Reset to match page layout */
    }

    /* 2. Force items to be full width blocks */
    .hydra-media-item {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 15px 0 !important; /* 15px bottom spacing between rows */
        text-align: center !important;
    }

    /* 3. Center the inner button using standard block margins */
    .hydra-media-preview {
        display: block !important;
        width: 90% !important; /* Takes up 90% of the screen width */
        max-width: 320px !important; /* Caps the size so it doesn't get too huge */
        margin: 0 auto !important; /* The magic centering trick */
        padding: 0 !important;
    }
}