/*
 * File: /public_html/test/wp-content/themes/Samundri-theme/assets/header/header.css
 * Fast Header CSS — RTL, CLS-safe, lightweight
 */

.site-header {
    direction: rtl;
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    contain: layout paint;
}

body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.smd-header-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 6px 12px 8px;
}

/* Skip link */
.visually-hidden,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    width: auto;
    height: auto;
    clip-path: none;
    top: 8px;
    right: 8px;
    z-index: 10000;
    background: #fff;
    color: #1d4ed8;
    padding: 10px 14px;
    border: 2px solid #1d4ed8;
    border-radius: 8px;
}

/* =========================
   Main Nav
========================= */

.category-bar {
    background: #1d4ed8;
    border-radius: 14px;
    overflow: hidden;
}

.smd-nav-top {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
}

.smd-home-fixed,
.smd-menu-toggle {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smd-home-fixed {
    color: #fff;
    text-decoration: none;
}

.smd-home-fixed svg {
    width: 38px;
    height: 38px;
    display: block;
}

.smd-menu-toggle {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.menu-scroll-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
}

.menu-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.category-bar .menu {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: max-content;
}

.category-bar .menu > li {
    flex: 0 0 auto;
}

.category-bar .menu > li > a {
    min-height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    white-space: nowrap;
}

.category-bar .menu > li > a:hover,
.category-bar .menu > li > a:focus,
.smd-home-fixed:hover,
.smd-home-fixed:focus,
.smd-menu-toggle:hover,
.smd-menu-toggle:focus {
    background: rgba(255, 255, 255, .14);
    outline: none;
}

/* =========================
   Social Bar
========================= */

.header-socials {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.header-socials .soc {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.header-socials .soc:hover,
.header-socials .soc:focus {
    border-color: #1d4ed8;
    outline: none;
}

.header-socials img {
    width: 24px;
    height: 24px;
    display: block;
}

/* =========================
   News Bar
========================= */

.header-news {
    --news-speed-desktop: 34s;
    --news-speed-tablet: 30s;
    --news-speed-mobile: 26s;

    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    overflow: hidden;
    padding: 0 12px;
    width: 100%;
    direction: rtl;
}

.header-news__label {
    flex: 0 0 auto;
    background: #1d4ed8;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    padding: 10px 13px;
    border-radius: 999px;
}

.header-news__track-wrap {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    direction: ltr;
}

.header-news__track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: smdHeaderTickerLTR var(--news-speed-desktop) linear infinite;
    transform: translateX(-50%);
}

.header-news__group {
    display: flex;
    align-items: center;
    gap: 34px;
    flex: 0 0 auto;
    padding-inline-end: 34px;
    direction: rtl;
}

.header-news__item {
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
    position: relative;
    padding-inline-start: 15px;
}

.header-news__item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #1d4ed8;
    transform: translateY(-50%);
}

.header-news__item:hover,
.header-news__item:focus {
    color: #1d4ed8;
    outline: none;
}

@keyframes smdHeaderTickerLTR {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

/* =========================
   Mega Menu
========================= */

.smd-mega-menu {
    display: none;
    background: #1d4ed8;
    color: #fff;
    width: 100%;
    direction: rtl;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.smd-mega-menu.is-open {
    display: block;
}

.smd-mega-wrap {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 26px 20px 20px;
}

.smd-mega-col:not(:last-child) {
    border-left: 1px solid rgba(255, 255, 255, .16);
    padding-left: 28px;
}

.smd-mega-col:not(:first-child) {
    padding-right: 28px;
}

.smd-mega-col h3 {
    font-size: 19px;
    margin: 0 0 14px;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.smd-col-icon {
    font-size: 21px;
    line-height: 1;
    flex: 0 0 auto;
}

.smd-mega-col a {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
    padding: 7px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.smd-mega-col a:last-child {
    border-bottom: 0;
}

.smd-mega-col a:hover,
.smd-mega-col a:focus {
    color: #fff;
    background: rgba(255, 255, 255, .10);
    outline: none;
}

.smd-link-icon {
    font-size: 17px;
    flex: 0 0 auto;
    line-height: 1;
    width: 24px;
    text-align: center;
}

.smd-mega-bottom {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .8);
    font-weight: 600;
}

.smd-mega-close {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
}

/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
    .header-news__track {
        animation: none;
        transform: none;
        width: auto;
        flex-wrap: wrap;
    }

    .header-news__group {
        flex-wrap: wrap;
    }
}

/* =========================
   Tablet
========================= */

@media (max-width: 1024px) {
    .header-news__track {
        animation-duration: var(--news-speed-tablet);
    }

    .smd-mega-wrap {
        padding: 22px 16px 18px;
    }

    .smd-mega-col h3 {
        font-size: 18px;
    }

    .smd-mega-col a {
        font-size: 15px;
    }
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {
    .smd-header-wrap {
        padding: 5px 8px 7px;
    }

    .smd-nav-top {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: center;
        min-height: 56px;
        padding: 0 8px;
        gap: 6px;
    }

    .smd-home-fixed {
        grid-column: 1;
        justify-self: start;
        width: 42px;
        min-width: 42px;
        height: 56px;
    }

    .smd-home-fixed svg {
        width: 34px;
        height: 34px;
    }

    .menu-scroll-wrapper {
        grid-column: 2;
        width: 100%;
        min-width: 0;
        display: block;
    }

    .category-bar .menu > li > a {
        min-height: 44px;
        padding: 0 13px;
        font-size: 15px;
    }

    .smd-menu-toggle {
        grid-column: 3;
        justify-self: end;
        width: 42px;
        min-width: 42px;
        height: 56px;
        font-size: 29px;
        padding: 0;
    }

    .header-socials {
        min-height: 48px;
        gap: 9px;
        padding: 6px 0;
    }

    .header-socials .soc {
        width: 39px;
        height: 39px;
    }

    .header-socials img {
        width: 22px;
        height: 22px;
    }

    .header-news {
        min-height: 54px;
        gap: 8px;
        padding: 8px;
        border-radius: 12px;
    }

    .header-news__label {
        font-size: 12px;
        padding: 9px 10px;
    }

    .header-news__track {
        animation-duration: var(--news-speed-mobile);
    }

    .header-news__group {
        gap: 26px;
        padding-inline-end: 26px;
    }

    .header-news__item {
        font-size: 13.5px;
        padding-inline-start: 14px;
    }

    .smd-mega-wrap {
        grid-template-columns: 1fr;
        padding: 18px 16px 14px;
    }

    .smd-mega-col:not(:last-child) {
        border-left: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .16);
        padding-left: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .smd-mega-col:not(:first-child) {
        padding-right: 0;
    }

    .smd-mega-col h3 {
        font-size: 17px;
        margin-bottom: 9px;
        padding-bottom: 8px;
    }

    .smd-mega-col a {
        font-size: 14.5px;
        padding: 7px 0;
    }

    .smd-mega-bottom {
        flex-direction: column;
        text-align: center;
        padding: 13px 16px;
    }
}