/* ==========================================================================
   GreenInt WordPress theme additions (loaded after style.css / custom.css)
   ========================================================================== */

/* Custom logo sizing (matches the brand text fallback) */
.navbar-light .navbar-brand img.brand-logo {
    max-height: 52px;
    width: auto;
    transition: .5s;
}
.sticky-top.navbar-light .navbar-brand img.brand-logo {
    max-height: 40px;
}
@media (max-width: 991.98px) {
    .navbar-light .navbar-brand img.brand-logo {
        max-height: 40px;
    }
}

/* Footer custom logo (white plate so it stays legible on the dark footer) */
.footer-logo {
    max-height: 64px;
    width: auto;
}

/* Accreditations gallery — single clean card */
.accred-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(17, 48, 59, .08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.accred-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(0, 208, 132, .18);
}
.accred-link {
    display: block;
    padding: 24px;
    background: #ffffff;
}
.accred-img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: contain;
    transition: transform .3s ease;
}
.accred-card:hover .accred-img {
    transform: scale(1.04);
}
.accred-title {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid #f0f3f5;
    background: #ffffff;
}

/* Multi-level (sub-service) dropdown — desktop flyout opens to the LEFT so it
   never runs off the right edge of the screen. */
.navbar .dropdown-submenu {
    position: relative;
}
.navbar .dropdown-submenu > a {
    display: flex;
    align-items: center;
}
.navbar .dropdown-submenu > a::after {
    content: "\f104"; /* left chevron */
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    border: none;
    margin-right: 10px;
    order: -1;
}

@media (min-width: 992px) {
    /* Level 3 flyout: hidden by default. */
    .navbar .nav-item .dropdown-menu .dropdown-menu {
        display: block;
        top: 0;
        right: 100%;
        left: auto;
        margin-top: -6px;
        visibility: hidden;
        opacity: 0;
        transform: translateX(10px);
        border: 0;
        border-radius: 10px;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
        transition: .3s;
    }
    /* Keep nested flyouts hidden while only the top item is hovered. */
    .navbar .nav-item:hover .dropdown-menu .dropdown-menu {
        visibility: hidden;
        opacity: 0;
        transform: translateX(10px);
    }
    /* Show only the hovered category's sub-services. */
    .navbar .nav-item .dropdown-menu .dropdown-submenu:hover > .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile: services and sub-services as a static indented list (no JS needed). */
@media (max-width: 991.98px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        padding-left: 1rem;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .navbar .nav-item .dropdown-menu .dropdown-item {
        color: var(--bs-dark);
        padding-left: 0.75rem;
        font-size: 15px;
        white-space: normal;
    }
    .navbar .nav-item .dropdown-submenu .dropdown-menu {
        padding-left: 1.5rem;
    }
    .navbar .dropdown-submenu > a::after {
        display: none;
    }
}
