/**
 * Tawreed Laravel frontend overrides (dynamic nav, scroll menus).
 * Loaded after public/tawreed-static/style.css.
 */

/* Scrollable long dropdown lists */
.showHiddenLinks {
    position: relative;
    scroll-behavior: smooth;
}

.showHiddenLinks2 {
    scroll-behavior: smooth;
}

.dd-menu.showHiddenLinks {
    width: 310px;
    height: 370px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.has-dd-menu-options ul.showHiddenLinks2 {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0;
    width: 260px;
    max-height: 370px;
    overflow-y: auto;
    scrollbar-width: thin;
    z-index: 2;
}

.moveicon {
    background: black;
    width: 5px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
}

.moveiconimg {
    position: sticky;
    bottom: 10px;
    right: 10px;
    margin-left: 270px;
}

.moveicon2 {
    background: black;
    width: 5px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    transform: rotate(180deg);
}

.moveiconimg2 {
    position: sticky;
    bottom: -300px;
    right: 10px;
    margin-left: 270px;
}

.showHiddenLinks2 .moveicon3 {
    background: black;
    width: 20px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 200px;
}

.showHiddenLinks2 .moveiconimg3 {
    position: sticky;
    bottom: 0 !important;
    right: 100px;
}

.showHiddenLinks2 .moveiconimg3:hover {
    background: transparent !important;
}

.moveicon4 {
    background: black;
    width: 5px;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    transform: rotate(180deg);
    margin-left: 200px;
}

.moveiconimg4 {
    position: sticky;
    bottom: -260px;
    right: 10px;
}

.moveiconimg4:hover {
    background: transparent !important;
}

/* Desktop nav — dynamic CMS menu */
/* .fj-navbar > ul:first-of-type {
    flex-wrap: nowrap;
    align-items: center;
    padding-left: 0;
    margin-left: 0;
} */

/* .fj-navbar > ul:first-of-type > li {
    white-space: nowrap;
    position: relative;
} */

/* .fj-navbar > ul:first-of-type > li > a {
    padding: 8px 10px;
    line-height: 1.2;
} */

.fj-navbar > ul:first-of-type > li.has-menu > a,
.fj-navbar > ul:first-of-type > li.has-dd-menu > a {
    cursor: default;
}

.fj-navbar > ul:first-of-type > li.has-menu > a img,
.fj-navbar > ul:first-of-type > li.has-dd-menu > a img {
    width: 10px;
    height: auto;
    vertical-align: middle;
    margin-left: 10px;
}

/* Nested flyout rows: right chevron (7px) */
.dd-menu .has-dd-menu-options > a.nav-flyout-parent {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 17px !important;
    padding-right: 10px !important;
}

.dd-menu .has-dd-menu-options > a.nav-flyout-parent .nav-flyout-label {
    flex: 1;
    min-width: 0;
}

.dd-menu .has-dd-menu-options > a.nav-flyout-parent img.nav-flyout-arrow,
.has-dd-menu-options ul .has-dd-menu-options > a.nav-flyout-parent img.nav-flyout-arrow {
    width: 7px !important;
    height: auto !important;
    flex-shrink: 0;
    margin-left: 8px;
    margin-right: 0;
    vertical-align: middle;
}

/* Keep dropdowns open while moving cursor to submenu */
.fj-navbar > ul:first-of-type > li.has-dd-menu .dd-menu,
.fj-navbar > ul:first-of-type > li.has-menu .dd-mega-menu {
    top: 100%;
    margin-top: 0;
}

.fj-navbar > ul:first-of-type > li.has-menu .dd-mega-menu {
    padding-top: 12px;
}

.fj-navbar > ul:first-of-type > li.has-dd-menu .dd-menu::before,
.fj-navbar > ul:first-of-type > li.has-menu .dd-mega-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.has-dd-menu-options .has-dd-menu-options ul.showHiddenLinks2 {
    z-index: 3;
}

.has-dd-menu-options ul.showHiddenLinks2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    width: 12px;
    height: 100%;
}

/* Mobile nav */
@media screen and (max-width: 1199px) {
    html,
    body {
        overflow-x: hidden;
    }

    /* Pin the drawer to the viewport. Without left:0, position:fixed
       uses the in-flow spot inside .container and the panel peeks on the left. */
    .fj-navbar-mobile .mb-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: -110% !important;
        z-index: 10000;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .fj-navbar-mobile .mb-menu.show-mobile-nav {
        margin-left: 0 !important;
    }

    .fj-navbar-mobile .mb-menu .row {
        --bs-gutter-x: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .fj-navbar-mobile .mb-menu .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

@media screen and (max-width: 359px) {
    .fj-navbar-mobile .mb-menu {
        width: 280px;
    }
}

.fj-navbar-mobile .mb-menu .mobile-dd-mega-menu .mobile-heading-img h4 a {
    border-bottom: none;
    margin-left: -11px;
}

.fj-navbar-mobile .mb-menu .mobile-dd-mega-menu .mobile-heading-img img.nav-mobile-sub-arrow {
    width: 10px !important;
    height: auto !important;
    margin-right: 18px;
    flex-shrink: 0;
}

/* Home about section (page ID 1) */
.home-about-container {
    padding: 50px 0;
}

.home-about-video {
    text-decoration: none;
}


@media screen and (max-width: 991px) {
    .about-us .about-us-img-box .img-box {
        min-height: 300px;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 767px) {
    .about-us .about-us-img-box .img-box {
        min-height: 250px;
    }

    .about-us .about-us-img-box {
        padding-right: 0;
    }
}

@media screen and (max-width: 575px) {
    .about-us .about-us-img-box .img-box {
        min-height: 220px;
    }
}

/* Home MEP category cards — dynamic backgrounds from category picture */
.mep-section .mep-icon-dynamic {
    width: 100%;
    height: 450px;
    background-image: linear-gradient(180deg, rgba(73, 96, 118, 0.35) 0%, rgba(28, 26, 54, 0.55) 100%), var(--mep-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.col-mp:hover .mep-icon-dynamic {
    background-image: var(--mep-bg);
}

@media screen and (max-width: 991px) {
    .mep-section .mep-icon-dynamic {
        height: 350px;
    }
}

@media screen and (max-width: 767px) {
    .mep-section .mep-icon-dynamic {
        height: 300px;
    }
}

/* News detail — show full article image (avoid background cover crop) */
.news-detail-image {
    height: auto;
    background: none;
    line-height: 0;
}

.news-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* About Us — facility carousel cards from CMS uploads */
.facility-card-dynamic {
    height: 450px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.facility-card-dynamic:hover,
.card-position:hover .facility-card-dynamic {
    transform: scale(1.3);
}

/* Feedback page */
.feedback-form-panel {
    background-color: #efefef;
    padding: 40px 30px;
}

.feedback-form-panel form {
    padding: 20px;
}

.feedback-rating-label {
    font-size: 20px;
}

.feedback-rating {
    display: inline-flex;
    direction: rtl;
    font-size: 40px;
}

.feedback-rating input {
    display: none;
}

.feedback-rating label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
}

.feedback-rating label:hover,
.feedback-rating label:hover ~ label {
    color: gold;
}

.feedback-rating input:checked ~ label {
    color: gold;
}

/* Facilities page cards */
.facility-card-body {
    position: relative;
}

.facility-card-body .map-link img {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0;
    margin-right: 10px;
    width: 20px !important;
    max-width: 20px !important;
    height: auto !important;
    max-height: 20px !important;
}

.facility-card-body a.map-link {
    text-decoration: none;
    color: #101214;
}

.facility-card-body .map-link {
    padding-top: 20px;
}

/* Divisions page (page id 8) — CMS content uses .card / division classes */
.divisions-page .card {
    width: 100%;
    margin-left: 0;
    transform: none;
    height: 100%;
}

.divisions-page .divParent:hover .division-card-image,
.divisions-page .divParent:hover [class*="division-card-image"] {
    transform: scale(1.2);
}

