/* ================== HEADER CSS ================== */
*{
    margin:0px;
    padding:0px;
    box-sizing: border-box;
}
body{
    background: #f5f4f4;
    font-family: 'Tajawal', sans-serif;
}
.site-header {
    background-color: #fff;
    color: #fff;
    padding: 12px 20px;
    font-family: 'Tajawal', sans-serif;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: #aaa 2px 2px 28px;
}
.container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

/* Logo */
.logo h1,
.logo-text {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

#logoo a{
    color: #f39c12;
    text-decoration: none;
    transition: 0.3s;
    font-size: 24px;
    font-weight: bold;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.logo a:hover { color: #e79614; }

/* Hamburger & Search Icon (Mobile) */
#searmenu{
    display: flex;
    gap: 10px;
}
.menu-toggle,
.search-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #000;
    cursor: pointer;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover { color: #f39c12; }

/* Search Box */
.search-box form {
    display: flex;
    align-items: center;
    border-radius: 30px;
    overflow: hidden;
    background: #f5f4f4;
    transition: all 0.3s;
    width: 100%;
}

.search-box input[type="search"] {
    border: none;
    padding: 6px 12px;
    outline: none;
    width: 100%;
    font-size: 14px;
    background: transparent;
    color: #000;
}

.search-box input::placeholder { color: #aaa; }

.search-box button {
    border: none;
    background: #f39c12;
    color: #fff;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    border-radius: 30px;
}

.search-box button:hover { background: #e67e22; }

/* Responsive */
@media (max-width: 992px) {
    .menu-toggle,
    .search-toggle {
        display: block;
    }
    
    .site-header{
        border-radius: 0px 0px 15px 15px;
    }

    .main-nav {
        display: none;
        width: 100%;
        justify-content: center;
    }

    .main-nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;       /* 1. Autorise le passage à la ligne */
    justify-content: center; /* 2. Centre les 3 premiers ET les 2 derniers */
    gap: 20px;
    margin-top: 10px;
    list-style: none;
    padding: 0;            /* Retire le padding par défaut des <ul> */
    
    /* 3. Limite la largeur pour forcer le 4ème élément à descendre */
    /* Ajuste cette valeur selon la taille de tes textes */
    max-width: 400px;      
    margin-left: auto;     /* Centre le bloc <ul> lui-même */
    margin-right: auto;
}

.main-nav ul li {
    /* Optionnel : fixe une largeur min si tes textes sont très courts */
    min-width: 80px; 
}
    
    .main-nav.active{
        display: block;
    }

    .search-box {
        display: none;
        width: 100%;
        margin-top: 10px;
    }

    .search-box.active {
        display: flex;
    }

    .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .search-box input { width: 100%; }
}