@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

.alouatan-custom-header-wrap,
.alouatan-custom-header,
.alouatan-custom-header * {
    box-sizing: border-box;
}

.alouatan-custom-header-wrap {
    width: 100%;
    position: relative;
    z-index: 1000;
    font-family: 'Cairo', sans-serif;
}

.alouatan-custom-header {
    width: 100%;
    background: #0067AC;
    color: #fff;
}

.alouatan-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px;
    position: relative;
}

.alouatan-header-top {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.alouatan-header-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.alouatan-header-logo img {
    display: block;
    width: auto;
    height: 60px;
    max-width: 240px;
    object-fit: contain;
}

.alouatan-main-nav ul {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.alouatan-main-nav li {
    margin: 0;
    padding: 0;
}

.alouatan-main-nav a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 13px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}

.alouatan-main-nav a:hover,
.alouatan-main-nav a:focus-visible,
.alouatan-main-nav li.is-active > a {
    color: #fff;
    background: rgba(255,255,255,.17);
}

.alouatan-menu-toggle {
    display: none;
    width: 42px;
    height: 40px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.alouatan-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    margin: 4px 0;
    border-radius: 3px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease;
}

.alouatan-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.alouatan-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.alouatan-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.alouatan-header-panels {
    position: relative;
}

.alouatan-category-panel {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.alouatan-category-panel.is-visible {
    display: block;
    animation: alouatan-panel-in .18s ease-out;
}

@keyframes alouatan-panel-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.alouatan-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.alouatan-header-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 7px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.alouatan-header-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 16px rgba(0,0,0,.12);
}

.alouatan-header-card a {
    display: block;
    color: #252525;
    text-decoration: none;
}

.alouatan-header-thumb {
    height: 145px;
    position: relative;
    overflow: hidden;
    background: #e8eef2;
}

.alouatan-header-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alouatan-header-no-image {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #0067AC;
    font-size: 20px;
    font-weight: 800;
}

.alouatan-header-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 8px;
    overflow: hidden;
    border-radius: 4px;
    background: #0067AC;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.alouatan-header-title {
    padding: 9px 7px 4px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}

.alouatan-header-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #555;
    text-align: center;
    font-size: 14px;
}

@media (min-width: 769px) {
    .alouatan-custom-header-wrap:has(.alouatan-category-panel:hover) .alouatan-category-panel.is-visible {
        display: block;
    }
}

@media (max-width: 768px) {
    .alouatan-header-inner {
        padding: 9px 15px;
    }

    .alouatan-header-top {
        min-height: 48px;
        gap: 12px;
    }

    .alouatan-header-logo img {
        height: 45px;
        max-width: 190px;
    }

    .alouatan-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .alouatan-main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 9px);
        right: 0;
        left: 0;
        z-index: 1002;
        padding: 6px 0;
        background: #0067AC;
        box-shadow: 0 8px 18px rgba(0,0,0,.18);
    }

    .alouatan-main-nav.is-open {
        display: block;
    }

    .alouatan-main-nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .alouatan-main-nav a {
        min-height: 43px;
        padding: 9px 18px;
        border-radius: 0;
    }

    .alouatan-header-panels {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 980px) {
    .alouatan-header-inner {
        padding-right: 16px;
        padding-left: 16px;
    }
    .alouatan-main-nav ul {
        gap: 4px;
    }
    .alouatan-main-nav a {
        padding-right: 9px;
        padding-left: 9px;
        font-size: 14px;
    }
    .alouatan-category-grid {
        gap: 12px;
    }
}
