/* Hona Misr — layout fixes, 2026-11-21.
 * Loaded after theme/option styles. Keep existing fonts, logo and palette.
 */

/* Undo global arrow geometry that also affected pagination and small widgets. */
#tie-body .tie-icon-angle-left,
#tie-body .tie-icon-angle-right {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    border-radius: 0 !important;
    transition: color .2s ease;
}

#tie-body .tie-icon-angle-left::before,
#tie-body .tie-icon-angle-right::before {
    position: static;
    display: inline-block;
    width: auto;
    height: auto;
    top: auto;
    left: auto !important;
    border: 0;
    transform: none;
    transform-origin: center;
    animation: none !important;
}

#tie-body .tie-icon-angle-left::before { content: "\f104"; }
#tie-body .tie-icon-angle-right::before { content: "\f106"; }
#tie-body .tie-icon-angle-left::after,
#tie-body .tie-icon-angle-right::after { content: none; }

#tie-body .slider-arrow-nav li {
    padding: 0;
}

#tie-body .slider-arrow-nav a {
    min-width: 32px;
    min-height: 32px;
    line-height: 30px;
    text-align: center;
}

#tie-body .fullwidth-slider-wrapper .tie-slick-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

/* These controls already contain their own correct icons. */
#tie-body a.tie-search-trigger::before,
#tie-body li.side-aside-nav-icon.menu-item.custom-menu-link > a::before,
#tie-body ul.social > li > a::before {
    content: none !important;
    border: 0 !important;
}

#tie-body ul.social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

#tie-body ul.social > li {
    margin: 0 6px;
}

#tie-body ul.social > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 32px;
}

/* Four columns on wide screens; two readable columns on tablets. */
@media (min-width: 670px) {
    #tie-body .full-width .big-posts-box .posts-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        margin: 0;
    }
    #tie-body .full-width .big-posts-box .posts-items::before,
    #tie-body .full-width .big-posts-box .posts-items::after {
        content: none;
    }
    #tie-body .full-width .big-posts-box .posts-items > li:nth-child(n) {
        float: none;
        clear: none !important;
        width: auto;
        min-width: 0;
        padding: 0;
        margin: 0 !important;
        text-align: center;
    }
}

@media (min-width: 1024px) {
    #tie-body .full-width .big-posts-box .posts-items {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Preserve natural image proportions. Crop only dedicated news thumbnails. */
#tie-body img.attachment-jannah.size-jannah.wp-post-image {
    height: auto;
}

#tie-body .big-posts-box .post-thumb img,
#tie-body .scrolling-box .slide-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

#tie-body .main-content,
#tie-body .sidebar,
#tie-body .post-details,
#tie-body .post-widget-body {
    min-width: 0;
}

#tie-body .post-title,
#tie-body .entry-title,
#tie-body .entry-sub-title,
#tie-body .post-widget-body a,
#tie-body .mag-box-title h3 {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Publication dates follow the containing title, including centered cards.
 * single.min.css contains a global floated date badge; contain that styling
 * to the main article metadata and let narrow dates wrap instead of clipping.
 */
#tie-body .post-meta .date,
#tie-body .post-meta .last-updated,
#tie-body .thumb-meta > .date {
    display: inline-block;
    float: none;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    line-height: 1.8;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    unicode-bidi: isolate;
}

#tie-body .post-meta .date:not(:last-child),
#tie-body .post-meta .last-updated:not(:last-child),
#tie-body .thumb-meta > .date:not(:last-child) {
    margin-inline-end: 8px;
}

#tie-body .post-meta:not(.single-post-meta) .date,
#tie-body .thumb-meta > .date {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: inherit !important;
}

#tie-body .single-post-meta .date {
    padding: 3px 8px;
    border: 1px solid rgba(128, 128, 128, .2);
    border-radius: 14px;
    background: rgba(128, 128, 128, .06);
    color: inherit !important;
}

#tie-body .timeline-widget li .date {
    float: none;
    box-sizing: border-box;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #666 !important;
    line-height: 1.8;
    white-space: normal;
    overflow-wrap: break-word;
    unicode-bidi: isolate;
}

#tie-body.dark-skin .timeline-widget li .date,
#tie-body .dark-skin .timeline-widget li .date {
    color: #aaa !important;
}

#tie-body .timeline-widget li .date::before {
    top: calc(.9em - 6px);
}

@media (min-width: 768px) {
    #tie-body.post-meta-column #post-extra-info .single-post-meta .date,
    #tie-body.post-meta-column #post-extra-info .single-post-meta .last-updated {
        display: block;
        margin-inline: 0;
    }
}

/* Article category headings share the section-title underline, not badge hover.
 * The original global title is fixed at 50px; keep that minimum but allow growth
 * and center the original logo and label within the available content height.
 */
#tie-body.single-post span.mag-box-title.the-global-title {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 50px;
    padding: 8px 10px;
    font-size: 18px;
    line-height: 1.6;
    text-align: start;
    color: inherit;
}
#tie-body.single-post span.mag-box-title.the-global-title::before {
    position: static;
    flex: 0 0 40px;
    width: 40px;
    height: 30px;
    margin: 0;
    top: auto;
    bottom: auto;
    left: auto !important;
    right: auto !important;
}
#tie-body.single-post span.mag-box-title.the-global-title::after {
    left: auto !important;
    right: auto !important;
    inset-inline-start: 10px !important;
    width: 40px;
    background: var(--brand-color, #ee1a22);
}
#tie-body.single-post span.mag-box-title.the-global-title > .post-cat {
    --s: .1em;
    --_p: 0%;
    display: inline-block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    float: none;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 0 var(--s) !important;
    border: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    color: inherit !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    text-decoration: none !important;
    box-shadow: none !important;
    background: linear-gradient(90deg, transparent 90%, currentColor 0) calc(0% - var(--_p))/200% 100%,
        linear-gradient(currentColor 0 0) 0 100%/var(--_p) var(--s) no-repeat !important;
    -webkit-background-clip: text, padding-box !important;
    background-clip: text, padding-box !important;
    transition: background-position .5s ease, background-size .5s ease;
}
#tie-body.single-post span.mag-box-title.the-global-title > .post-cat::before {
    content: none !important;
}
#tie-body.single-post span.mag-box-title.the-global-title > a.post-cat:hover,
#tie-body.single-post span.mag-box-title.the-global-title > a.post-cat:focus-visible {
    --_p: 100%;
}
#tie-body.single-post span.mag-box-title.the-global-title > a.post-cat:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    #tie-body.single-post span.mag-box-title.the-global-title > .post-cat { transition: none; }
}

#tie-body.single-post .entry-header .post-title {
    line-height: 1.65;
}

#tie-body.single-post .entry-content {
    overflow-wrap: anywhere;
    word-break: normal;
}

#tie-body.single-post .entry-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    overflow-wrap: normal;
}

#tie-body.single-post .entry-content video,
#tie-body.single-post .entry-content iframe,
#tie-body.single-post .entry-content .wp-caption {
    max-width: 100%;
}

#tie-body.single-post .entry-content video {
    height: auto;
}

#tie-body.single-post .entry-content .post-tags a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Related topics stay distinct from the article's own lists. */
#tie-body .hm-related-topics {
    margin: 24px 0;
    padding: 16px 18px;
    border: 1px solid rgba(128, 128, 128, .22);
    border-inline-start: 3px solid #ef2d34;
    border-radius: 6px;
}

#tie-body .hm-related-topics h2 {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.6;
}

#tie-body .hm-related-topics ul {
    margin-block: 0;
    padding-inline-start: 20px;
}

#tie-body .hm-related-topics li + li { margin-top: 8px; }

#tie-body .container-wrapper2 {
    max-width: 100%;
    box-sizing: border-box;
}

#tie-body #hm-footer-cats .hm-footer-list a {
    min-width: 0;
    overflow-wrap: anywhere;
}

#tie-body #hm-footer-cats .hm-footer-list a::before { flex-shrink: 0; }

#tie-body .slider-arrow-nav a:focus-visible,
#tie-body .tie-search-trigger:focus-visible,
#tie-body .icon-navicon-content:focus-visible,
#tie-body ul.social a:focus-visible,
#tie-body .hm-related-topics a:focus-visible {
    outline: 2px solid #ef2d34;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    /* Anchor long Arabic headlines inside the image instead of a fixed top. */
    #tie-body .wide-slider-wrapper .thumb-overlay {
        display: flex;
        align-items: flex-end;
        padding: 14px 32px 20px;
    }
    #tie-body .wide-slider-wrapper .thumb-overlay > .container {
        position: static;
        top: auto !important;
        transform: none;
        width: 100%;
        margin: 0;
    }
    #tie-body .wide-slider-wrapper .thumb-content {
        position: static;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    #tie-body .wide-slider-wrapper .post-cat-wrap {
        position: static;
        margin-bottom: 8px;
    }
    #tie-body .wide-slider-wrapper .thumb-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        max-height: none;
        font-size: 18px;
        line-height: 1.6;
        margin: 0;
    }
    #tie-body.single-post .entry-header .post-title {
        font-size: clamp(22px, 5.5vw, 27px);
    }
    #tie-body .container-wrapper2 { width: 100%; }
    #tie-body .slider-arrow-nav a { min-width: 36px; min-height: 36px; line-height: 34px; }
    #tie-body #hm-footer-cats .hm-footer-list { column-gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    #tie-body .post-cat::before,
    #tie-body .cat-style2::before { animation: none !important; }
    #tie-body .post-title a,
    #tie-body .mag-box-title h3 a,
    #tie-body ul.social a,
    #tie-body ul.social a::before,
    #tie-body #hm-footer-cats .hm-footer-list a { transition: none !important; }
}

/* Footer sections live in the theme; no option-panel CSS is required. */
#hm-footer-cats {
    --hm-accent: var(--hm-footer-accent, #ee2028);
    --hm-border: rgba(128, 128, 128, .22);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    color: inherit;
    container: hm-cats / inline-size;
}
#hm-footer-cats .hm-footer-title {
    position: relative;
    margin: 0 0 16px !important;
    padding: 0 0 13px !important;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
    color: inherit;
    border: 0;
    border-bottom: 1px solid var(--hm-border);
}
#hm-footer-cats .hm-footer-title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: -1px;
    width: 36px;
    height: 3px;
    background: var(--hm-accent);
    border-radius: 2px;
}
#hm-footer-cats .hm-footer-list {
    display: block;
    column-count: 2;
    column-gap: 16px;
    column-fill: balance;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
#hm-footer-cats .hm-footer-list > li {
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: 0 !important;
}
#hm-footer-cats .hm-footer-list > li::before,
#hm-footer-cats .hm-footer-list > li::after { content: none !important; }
#hm-footer-cats .hm-footer-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 7px 5px;
    box-sizing: border-box;
    color: inherit !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
    text-align: start;
    text-decoration: none !important;
    background: transparent;
    border: 0 !important;
    border-radius: 5px;
    transition: color .18s ease, background-color .18s ease;
}
#hm-footer-cats .hm-footer-list a::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 12px;
    background: var(--hm-accent);
    border-radius: 2px;
}
#hm-footer-cats .hm-footer-list a:hover,
#hm-footer-cats .hm-footer-list a:focus-visible {
    color: var(--hm-accent) !important;
    background: rgba(128, 128, 128, .09);
}
#hm-footer-cats .hm-footer-list a:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 2px; }
@container hm-cats (min-width: 480px) {
    #hm-footer-cats .hm-footer-list { column-count: 3; column-gap: 24px; }
    #hm-footer-cats .hm-footer-list a { font-size: 14px; }
}
@container hm-cats (max-width: 239px) {
    #hm-footer-cats .hm-footer-list { column-count: 1; }
}
#tie-body #footer.hm-footer-modern {
    --hm-footer-accent: #ee2028;
    --base-color: #252930;
    --dark-base-color: #626a76;
    background: #f6f7f9;
    color: #252930;
    border-top: 3px solid var(--hm-footer-accent);
}
#tie-body #footer.hm-footer-modern #footer-widgets-container {
    padding-top: 38px;
    padding-bottom: 28px;
    border: 0;
    box-shadow: none;
}
#tie-body #footer.hm-footer-modern .widget {
    padding: 0;
    margin-bottom: 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
}
#tie-body #footer.hm-footer-modern .about-author-img {
    width: 156px !important;
    max-width: 100%;
    height: auto !important;
    max-height: 156px;
    object-fit: contain;
    margin-bottom: 16px;
}
#tie-body #footer.hm-footer-modern .aboutme-widget-content {
    color: #626a76;
    font-size: 14px;
    line-height: 1.9;
}
#tie-body #footer.hm-footer-modern #site-info {
    padding: 20px 0;
    background: #fff;
    color: #525a66;
    border-top: 1px solid rgba(128, 128, 128, .15);
}
#tie-body #footer.hm-footer-modern .copyright-text { line-height: 1.9; }
#tie-body #footer.hm-footer-modern .widget a:not(.button),
#tie-body #footer.hm-footer-modern #site-info a { color: #343b45; }
#tie-body #footer.hm-footer-modern .widget a:not(.button):hover,
#tie-body #footer.hm-footer-modern #site-info a:hover { color: #ee2028; }
#tie-body #footer.hm-footer-modern a:focus-visible { outline: 2px solid #ee2028; outline-offset: 2px; }
#tie-body #footer.hm-footer-modern .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    color: #343b45;
}
#tie-body #footer.hm-footer-modern .social-icons a:hover,
#tie-body #footer.hm-footer-modern .social-icons a:focus-visible { color: #ee2028; background: #f3f4f6; }
#tie-body #footer.hm-footer-modern .social-icons a:focus-visible { outline: 2px solid #ee2028; outline-offset: 2px; }
.hm-footer-sections-standalone { padding-top: 24px; padding-bottom: 30px; }
@media (min-width: 768px) {
    #tie-body #footer.hm-footer-modern .hm-footer-layout-narrow-wide-2c > .tie-row {
        display: grid;
        grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
        gap: 38px;
        margin: 0;
    }
    #tie-body #footer.hm-footer-modern .hm-footer-layout-narrow-wide-2c > .tie-row::before,
    #tie-body #footer.hm-footer-modern .hm-footer-layout-narrow-wide-2c > .tie-row::after { content: none; }
    #tie-body #footer.hm-footer-modern .hm-footer-layout-narrow-wide-2c > .tie-row > div {
        width: auto;
        float: none;
        min-width: 0;
        padding: 0;
    }
}
@media (max-width: 767px) {
    #tie-body #footer.hm-footer-modern #footer-widgets-container { padding-top: 28px; padding-bottom: 18px; }
    #tie-body #footer.hm-footer-modern .about-author-img { width: 128px !important; }
    #hm-footer-cats .hm-footer-list a { min-height: 42px; font-size: 14px; }
}

/* One desktop row; utility controls and the sticky logo retain their space. */
@media (min-width: 992px) {
    #main-nav .main-menu-wrapper.hm-nav-row { display: flex; align-items: center; width: 100%; min-width: 0; }
    #main-nav .hm-nav-row > .header-layout-1-logo { display: block; flex: 0 0 auto; }
    #main-nav .hm-nav-row > #menu-components-wrap { flex: 1 1 0%; }
    #main-nav #menu-components-wrap.hm-nav-managed {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }
    #main-nav .hm-nav-managed > .main-menu-wrap { flex: 1 1 auto; min-width: 0; float: none; }
    #main-nav .hm-nav-managed > .components,
    #main-nav .hm-nav-managed > #sticky-logo { flex: 0 0 auto; float: none; }
    #main-nav .hm-nav-managed #main-nav-menu { width: 100%; min-width: 0; float: none; }
    #main-nav .hm-nav-managed #main-nav-menu > ul {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }
    #main-nav .hm-nav-managed #main-nav-menu > ul > li { flex: 0 0 auto; float: none; white-space: nowrap; }
    #main-nav .hm-nav-managed #main-nav-menu > ul > li.hm-menu-more { position: relative; max-width: 100%; }
    #main-nav .hm-more-active > .hm-overflow-submenu {
        position: absolute;
        top: 100%;
        inset-inline-end: 0;
        inset-inline-start: auto;
        transform: translateX(var(--hm-more-shift, 0px));
        width: 280px;
        max-width: calc(100vw - 32px);
        max-height: min(70vh, 540px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        padding: 8px;
        z-index: 25;
        text-align: start;
    }
    #main-nav .hm-more-active:not(.hm-overflow-open) > .hm-overflow-submenu { display: none !important; }
    #main-nav .hm-more-active.hm-overflow-open > .hm-overflow-submenu { display: block !important; }
    #main-nav .hm-overflow-submenu li { float: none; width: 100%; white-space: normal; }
    #main-nav .hm-overflow-submenu a { width: auto; max-width: 100%; white-space: normal; line-height: 1.6; }
    #main-nav .hm-overflow-submenu .menu-sub-content,
    #main-nav .hm-overflow-submenu .mega-menu-block {
        position: static;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        padding: 6px;
        margin: 0;
    }
    #main-nav .hm-overflow-original > .mega-menu-block { display: block; min-height: 0; }
    #main-nav .hm-overflow-submenu .sub-menu-columns { margin: 0; }
    #main-nav .hm-overflow-submenu .mega-menu-content,
    #main-nav .hm-overflow-submenu .mega-cat-wrapper,
    #main-nav .hm-overflow-submenu .mega-cat-content { width: 100%; min-width: 0; float: none; }
    #main-nav .hm-overflow-submenu li:focus-within > .menu-sub-content { display: block; }
    #main-nav [data-hm-more-control]:focus-visible { outline: 2px solid #ee2028; outline-offset: -3px; }
    #main-nav .hm-more-has-toggle { display: flex; align-items: center; }
    #main-nav .hm-more-has-toggle > a::before { display: none; }
    #main-nav .hm-more-separate-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 28px;
        width: 28px;
        height: 36px;
        padding: 0;
        color: inherit;
        background: transparent;
        border: 0;
        cursor: pointer;
    }
    #main-nav .hm-more-separate-toggle span {
        width: 7px;
        height: 7px;
        border-inline-end: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    #hm-footer-cats .hm-footer-list a { transition: none; transform: none !important; }
}
