/* =========================================================
   Mal Home final delivery polish
   - removes logo shine artefacts
   - keeps profile download title on one line
   - removes footer upper divider and reduces top spacing
   ========================================================= */

/* Remove every possible moving shine/flash around the desktop logo. */
.desktop-navbar .navbar-brand::before,
.desktop-navbar .navbar-brand::after,
.desktop-navbar .navbar-brand:hover::before,
.desktop-navbar .navbar-brand:hover::after,
.header-glow-line::before,
.header-glow-line::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 0 !important;
}

.header-glow-line {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Keep the Arabic profile-download label together and compact. */
.floating-profile-download {
    width: auto !important;
    min-width: 158px !important;
    max-width: calc(100vw - 24px) !important;
    flex-wrap: nowrap !important;
}

.floating-profile-download__content {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    align-items: flex-start !important;
}

.floating-profile-download__content strong,
.floating-profile-download__content small {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

@media (max-width: 420px) {
    .floating-profile-download {
        min-width: 150px !important;
        max-width: calc(100vw - 20px) !important;
        padding-inline: 9px !important;
    }

    .floating-profile-download__content strong {
        font-size: 11.5px !important;
    }
}

/* Remove the long upper footer line and tighten the top breathing space. */
.official-reference-footer {
    padding-top: 20px !important;
}

.official-reference-footer .footer-top-line {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}

.official-reference-footer .footer-grid {
    margin-top: 0 !important;
}

@media (max-width: 991.98px) {
    .official-reference-footer {
        padding-top: 18px !important;
    }
}

@media (max-width: 575.98px) {
    .official-reference-footer {
        padding-top: 16px !important;
    }
}

/* =========================================================
   Final client handoff: project gallery + news comments/social
   ========================================================= */
.project-detail-page .project-featured-media {
    overflow: hidden;
    border-radius: 26px;
    background: #eef4fb;
    border: 1px solid rgba(6, 39, 95, .08);
    box-shadow: 0 18px 42px rgba(7, 39, 91, .12);
}
.project-detail-page .project-featured-media .featured-photo {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}
.project-detail-page .project-rich-content {
    color: #435873;
    line-height: 2;
}
.project-detail-page .project-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.project-detail-page .project-section-heading h2 {
    margin: 2px 0 0 !important;
}
.project-detail-page .project-section-kicker {
    display: block;
    color: #1768c2;
    font-size: 13px;
    font-weight: 800;
}
.project-detail-page .project-gallery-count {
    flex: 0 0 auto;
    padding: 8px 13px;
    border-radius: 999px;
    background: #edf5ff;
    color: #0b4d99;
    font-size: 13px;
    font-weight: 800;
}
.project-detail-page .project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.project-detail-page .project-gallery-card {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 22px;
    background: #f5f8fc;
    border: 1px solid rgba(6, 39, 95, .09);
    box-shadow: 0 14px 32px rgba(7, 39, 91, .09);
}
.project-detail-page .project-gallery-card--featured:nth-last-child(n+3) {
    grid-column: span 2;
}
.project-detail-page .project-gallery-card a {
    position: relative;
    display: block;
    overflow: hidden;
}
.project-detail-page .project-gallery-card img {
    display: block;
    width: 100%;
    height: 280px !important;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}
.project-detail-page .project-gallery-card--featured:nth-last-child(n+3) img {
    height: 420px !important;
}
.project-detail-page .project-gallery-card:hover img {
    transform: scale(1.035);
    filter: brightness(.82);
}
.project-detail-page .project-gallery-zoom {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #06275f;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    opacity: 0;
    transform: translate(-50%, -40%);
    transition: opacity .25s ease, transform .25s ease;
}
.project-detail-page .project-gallery-card:hover .project-gallery-zoom {
    opacity: 1;
    transform: translate(-50%, -50%);
}
.project-detail-page .project-gallery-card figcaption {
    padding: 13px 16px 15px;
    color: #274562;
    font-size: 14px;
    font-weight: 700;
}
.project-detail-page .project-video-section .iframe-container {
    aspect-ratio: 16 / 9;
    background: #061a3c;
}
.project-detail-page .project-video-section iframe {
    display: block;
    width: 100%;
    height: 100%;
}

.news-detail-page {
    padding: 34px 0 80px;
    background: linear-gradient(180deg, #f6f9fd 0%, #fff 100%);
}
.news-detail-page .news-detail-card {
    padding: 28px;
    border: 1px solid rgba(6,39,95,.08);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 22px 52px rgba(7,39,91,.08);
}
.news-detail-page .featured-photo {
    overflow: hidden;
    border-radius: 22px;
}
.news-detail-page .featured-photo img {
    display: block;
    width: 100%;
    max-height: 580px;
    object-fit: cover;
}
.news-detail-page .news-publish-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    color: #60738c;
    font-size: 14px;
}
.news-detail-page .news-rich-content {
    color: #435873;
    line-height: 2;
}
.news-follow-section {
    padding: 24px 26px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: #06275f;
    box-shadow: 0 16px 34px rgba(6,39,95,.16);
}
.news-follow-section h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 24px;
}
.news-follow-section .news-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-follow-section .news-social-list li {
    margin: 0;
}
.news-follow-section .news-social-list a {
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    transition: transform .28s ease, color .28s ease, text-shadow .28s ease;
}
.news-follow-section .news-social-list a::after {
    content: "";
    position: absolute;
    right: 2px;
    left: 2px;
    bottom: -5px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(270deg,#fff 0%,#7aa8d6 52%,rgba(122,168,214,0) 100%);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .35s ease;
}
.news-follow-section .news-social-list a:hover {
    transform: translateY(-4px);
    color: #7aa8d6;
    text-shadow: 0 8px 20px rgba(0,0,0,.22);
}
.news-follow-section .news-social-list a:hover::after {
    transform: scaleX(1);
}
.news-detail-page .comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.news-detail-page .comments-heading h2 {
    margin: 0;
}
.news-detail-page .comments-heading span {
    display: grid;
    min-width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #06275f;
    color: #fff;
    font-weight: 800;
}
.news-detail-page .comments-empty {
    padding: 24px;
    border-radius: 18px;
    background: #f7f9fc;
    color: #62748c;
    text-align: center;
}
.news-detail-page .comment-item {
    margin-bottom: 14px;
    padding: 20px;
    border: 1px solid #e7edf5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(7,39,91,.05);
}
.news-detail-page .comment-item .text h4 {
    margin: 0 0 7px;
    color: #082d5e;
}
.news-detail-page .comment-item .date {
    margin-bottom: 12px;
    color: #8290a3;
    font-size: 13px;
}
.news-detail-page .comment-item .des p {
    margin: 0;
    color: #425873;
    line-height: 1.9;
}
.news-detail-page .comment-form-card {
    padding: 24px;
    border-radius: 22px;
    background: #f7faff;
    border: 1px solid #e4ecf7;
}
.news-detail-page .comment-form-card h2 {
    margin: 0 0 20px;
    color: #082d5e;
}
.news-detail-page .comment-form-card .form-control {
    min-height: 48px;
    border-color: #dbe5f1;
    border-radius: 13px;
    text-align: right;
}
.news-detail-page .comment-form-card textarea.form-control {
    min-height: 160px;
}
.comment-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

@media (max-width: 767.98px) {
    .project-detail-page .project-gallery-grid {
        grid-template-columns: 1fr;
    }
    .project-detail-page .project-gallery-card--featured:nth-last-child(n+3) {
        grid-column: auto;
    }
    .project-detail-page .project-gallery-card img,
    .project-detail-page .project-gallery-card--featured:nth-last-child(n+3) img {
        height: 250px !important;
    }
    .project-detail-page .project-section-heading {
        align-items: flex-start;
    }
    .news-detail-page .news-detail-card {
        padding: 18px;
        border-radius: 21px;
    }
    .news-follow-section {
        padding: 18px;
    }
    .news-follow-section .news-social-list a {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}

/* =========================================================
   Final reveal motion for all public pages
   - lightweight and independent from external animation CDNs
   - uses individual translate/scale properties to avoid clashes
     with existing hover transforms and carousels
   ========================================================= */
body.mh-reveal-ready .mh-reveal {
    --mh-reveal-delay: 0ms;
    opacity: 0;
    translate: 0 28px;
    scale: .985;
    filter: blur(2px);
    transition:
        opacity .74s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        translate .82s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        scale .82s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        filter .68s ease var(--mh-reveal-delay);
    will-change: opacity, translate, scale, filter;
}

body.mh-reveal-ready .mh-reveal[data-mh-motion="zoom"] {
    translate: 0 22px;
    scale: .94;
}

body.mh-reveal-ready .mh-reveal[data-mh-motion="soft"] {
    translate: 0 18px;
    scale: .992;
    filter: blur(1.5px);
}

body.mh-reveal-ready .mh-reveal[data-mh-motion="right"] {
    translate: 30px 0;
}

body.mh-reveal-ready .mh-reveal[data-mh-motion="left"] {
    translate: -30px 0;
}

body.mh-reveal-ready .mh-reveal.is-revealed {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
}

/* The local reveal engine owns selected elements and prevents double motion with AOS. */
body.mh-reveal-ready .mh-reveal[data-aos] {
    transform: none !important;
}

body.mh-reveal-ready .mh-reveal[data-aos]:not(.is-revealed) {
    opacity: 0 !important;
}

body.mh-reveal-ready .mh-reveal[data-aos].is-revealed {
    opacity: 1 !important;
}

/* Why-us cards: clear, smooth staggered entrance without affecting hover motion. */
body.mh-reveal-ready .why-us-final-section .about-card.mh-reveal {
    transition:
        opacity .82s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        translate .9s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        scale .9s cubic-bezier(.22, 1, .36, 1) var(--mh-reveal-delay),
        filter .72s ease var(--mh-reveal-delay),
        transform .45s ease,
        box-shadow .45s ease,
        background .45s ease,
        border-color .45s ease !important;
}

/* Remove the generic page-content tick image from the social icons list. */
.page-content .news-follow-section .news-social-list li {
    margin: 0 !important;
    padding: 0 !important;
    padding-inline: 0 !important;
    list-style: none !important;
    background-image: none !important;
    background: transparent !important;
}

.page-content .news-follow-section .news-social-list li::before,
.page-content .news-follow-section .news-social-list li::after {
    content: none !important;
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    body.mh-reveal-ready .mh-reveal,
    body.mh-reveal-ready .mh-reveal.is-revealed {
        opacity: 1 !important;
        translate: none !important;
        scale: 1 !important;
        filter: none !important;
        transition: none !important;
        animation: none !important;
    }
}
