/* Moghavemat 2.5.1 — navigation and footer regression fixes.
   Loaded after main/navigation/presets; selectors are scoped to avoid changing
   mega-menu, sidebar links, story cards, or user-defined color variables. */

/* HEADER: The menu design uses a pill/background state, not a moving underline.
   Disable all legacy underlines, including the 'line' menu style and the
   minimal homepage demo's hover border. Hover/focus remain visible by color. */
.mnt-header::before,
.mnt-header::after { content: none !important; display: none !important; }
.mnt-header .mnt-header__nav > ul > li > a,
.mnt-header .mnt-header__nav > ul > li > a:hover,
.mnt-header .mnt-header__nav > ul > li > a:focus-visible {
    border-bottom: 0 !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
}
.mnt-header .mnt-header__nav > ul > li > a::after,
.mnt-header .mnt-header__nav > ul > li > a::before {
    /* ::before is only a redundant arrow: separate toggle buttons still work. */
    content: none !important;
    display: none !important;
}
.mnt-header .mnt-header__nav > ul > li > a:hover::after,
.mnt-header .mnt-header__nav > ul > li.current-menu-item > a::after,
.mnt-header .mnt-header__nav > ul > li.current-menu-ancestor > a::after {
    content: none !important;
    display: none !important;
    transform: none !important;
}
/* The theme's menu_style=line option should no longer draw a line. */
body.mnt-menu-style-line .mnt-header__nav > ul > li > a:hover,
body.mnt-demo-minimal .mnt-header__nav > ul > li > a:hover {
    border-bottom: 0 !important;
    text-decoration: none !important;
}

/* FOOTER: No homepage-demo class may change the admin-selected footer style.
   Style-specific palette and graphical treatment are retained from main.css.
   The grid is based on the exact number of actual, enabled columns. */
.mnt-footer .mnt-footer__grid {
    display: grid;
    align-items: start;
    gap: var(--mnt-footer-gap, 28px);
    min-width: 0;
    max-width: 100%;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-1 .mnt-footer__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 720px;
    margin-inline: auto;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-2 .mnt-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-3 .mnt-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-4 .mnt-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-5 .mnt-footer__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}
.mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-6 .mnt-footer__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
.mnt-footer.mnt-footer--minimal .mnt-footer__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 720px;
    margin-inline: auto;
}
/* Legacy count-5/6 rules spanned the first column across two tracks, leaving
   incomplete, irregular rows. Every footer item now occupies one track. */
.mnt-footer.mnt-footer--count-5 .mnt-footer__col--about,
.mnt-footer.mnt-footer--count-6 .mnt-footer__col--about {
    grid-column: auto !important;
}
.mnt-footer .mnt-footer__col {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}
.mnt-footer .mnt-footer__nav,
.mnt-footer .mnt-footer__list,
.mnt-footer .mnt-footer__contact { min-width: 0; }
.mnt-footer .mnt-footer__nav a,
.mnt-footer .mnt-footer__list a {
    max-width: 100%;
    text-decoration: none;
}
.mnt-footer.mnt-footer--count-0 .mnt-footer__grid { display: none !important; }

/* Preserve the intended card look instead of the generic demo's radius. */
.mnt-footer.mnt-footer--modern .mnt-footer__col,
.mnt-footer.mnt-footer--cards .mnt-footer__col {
    border-radius: 16px !important;
    min-width: 0;
}
.mnt-footer.mnt-footer--modern .mnt-footer__col {
    padding: clamp(16px, 2vw, 25px);
}
.mnt-footer.mnt-footer--corporate .mnt-footer__col--about,
.mnt-footer.mnt-footer--magazine .mnt-footer__col--about {
    min-width: 0;
}
/* Don't put a second line under the title of every newspaper-demo footer. */
body.mnt-demo-newspaper .mnt-footer__title { border-bottom: 0; }

/* If the footer only shows the copyright, don't leave a large empty band. */
.mnt-footer.mnt-footer--count-0 {
    padding-top: 0 !important;
}
.mnt-footer.mnt-footer--count-0 .mnt-footer__bottom { min-height: 56px; }

@media (max-width: 1380px) and (min-width: 1101px) {
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-5 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-6 .mnt-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 1100px) and (min-width: 701px) {
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-3 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-4 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-5 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-6 .mnt-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 700px) {
    .mnt-footer .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-1 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-2 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-3 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-4 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-5 .mnt-footer__grid,
    .mnt-footer:not(.mnt-footer--minimal).mnt-footer--count-6 .mnt-footer__grid {
        grid-template-columns: minmax(0, 1fr) !important;
        max-width: 650px;
        gap: clamp(18px, 4vw, var(--mnt-footer-gap, 28px));
        margin-inline: auto;
    }
    .mnt-footer .mnt-footer__col--mobile-hidden { display: none !important; }
    .mnt-footer:not(.mnt-footer--mobile-start) .mnt-footer__col { text-align: center; }
    .mnt-footer.mnt-footer--mobile-start .mnt-footer__col { text-align: right; }
    .mnt-footer.mnt-footer--cards .mnt-footer__col,
    .mnt-footer.mnt-footer--modern .mnt-footer__col { padding: 20px !important; }
    .mnt-footer .mnt-footer__bottom { text-align: center; }
}
