/* ============================================================
   HEADER  +  TOPBAR  +  FOOTER
   Single source of truth. No duplicate rules.

   LAYOUT STRATEGY
   ------------------------------------------------------------
   - .navbar          : max-width 1400px, centered. Owns
                         Company Logo + Navigation.
   - .navbar-credentials : absolutely anchored inside <header>
                         the topbar bar, far-left edge, vertically
                         centered. Always visible on desktop so
                         they are pinned to the topbar on every
                         reasonable viewport. Mobile hides them.
                        Per project priority:
                          1. Company Logo
                          2. Navigation
                          3. Certification Logos
   ============================================================ */

/* ---------- HEADER (the bar) ---------- */
header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    background:#fff;
    z-index:9999;
    transition:
        transform .4s ease,
        background .4s ease,
        box-shadow .4s ease;
}
header.scrolled{ box-shadow:0 10px 30px rgba(0,0,0,.08); }
header.hide{ transform:translateY(-100%); }

/* ---------- NAVBAR (Company Logo + Navigation row) ---------- */
.navbar{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    padding:0 40px 0 170px;
    height:85px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-sizing:border-box;
}

/* ---------- LOGO ---------- */
.logo{
    display:flex;
    align-items:center;
    gap:15px;
}
.logo-link{
    display:inline-flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:inherit;
}
.logo-link,
.logo-link:hover,
.logo-link:focus-visible,
.logo-link:active{ text-decoration:none; }
.logo-img{ height:55px; }
.logo-text{
    font-size:17px;
    font-weight:700;
    color:#222;
    letter-spacing:.5px;
    line-height:1.2;
}

/* ---------- MENU ---------- */
.navbar ul{
    display:flex;
    list-style:none;
    gap:24px;
}
.navbar ul li{ list-style:none; }
.navbar ul li a{
    text-decoration:none;
    color:#222;
    font-weight:500;
    transition:.3s;
    position:relative;
}
.navbar ul li a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;
    width:0;
    height:2px;
    background:#A58A5A;
    transition:.3s;
}
.navbar ul li a:hover{ color:#A58A5A; }
.navbar ul li a:hover::after{ width:100%; }
.navbar ul li.active a{ color:#A58A5A; font-weight:700; }
.navbar ul li.active a::after{ width:100%; }

/* ---------- NAV ACTIONS (right side: menu + e-learning) ---------- */
.nav-actions{
    display:flex;
    align-items:center;
    gap:22px;
}
.elearning-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:11px 20px;
    background:#f7f3ec;
    color:#333;
    border:1px solid #d8cdba;
    text-decoration:none;
    border-radius:999px;
    font-size:15px;
    font-weight:500;
    transition:all .3s ease;
    white-space:nowrap;
}
.elearning-link:hover{
    background:#a58a5a;
    color:#fff;
    border-color:#a58a5a;
    transform:translateY(-2px);
}

/* ---------- MOBILE NAV TOGGLE (hidden on desktop) ---------- */
.nav-toggle{
    display:none;
    width:44px;
    height:44px;
    padding:10px;
    border:1px solid #d8cdba;
    border-radius:10px;
    background:#fff;
    cursor:pointer;
}
.nav-toggle span{
    display:block;
    height:2px;
    margin:5px 0;
    background:#222;
}

/* ============================================================
   NAVBAR CREDENTIALS
   Pinned to the topbar (inside <header>), far-left edge,
   vertically centered. Always visible on desktop.
   ============================================================ */
.navbar-credentials{
    position:absolute;
    left:24px;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    gap:10px;
    margin:0;
    padding:0;
    z-index:2;
}
.navbar-cred-logo{
    height:46px;
    width:auto;
    opacity:.85;
    transition:opacity .3s ease, transform .3s ease;
}
.navbar-cred-logo:hover{
    opacity:1;
    transform:translateY(-2px);
}

/* ============================================================
   FOOTER  (untouched, single source of truth)
   ============================================================ */
.footer{
    background:#f8f6f2;
    border-top:1px solid #e5e5e5;
    padding:80px 8% 30px;
}
.footer-container{
    display:grid;
    grid-template-columns:2.2fr 1fr 1.5fr 1fr;
    gap:50px;
    align-items:start;
}
.footer-box h2,
.footer-box h3{
    font-size:22px;
    font-weight:600;
    color:#222;
    margin-bottom:25px;
    letter-spacing:.5px;
}
.footer-box p{
    color:#666;
    line-height:1.9;
    font-size:15px;
    max-width:330px;
}
.footer-box ul{ list-style:none; margin:0; padding:0; }
.footer-box ul li{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:15px;
    color:#666;
    line-height:1.8;
    word-break:break-word;
}
.footer-box ul li span{ flex:1; }
.footer-box ul li i{
    color:#A58A5A;
    font-size:16px;
    min-width:18px;
    margin-top:5px;
}
.footer-box a{
    display:inline-block;
    text-decoration:none;
    color:#666;
    transition:all .3s ease;
}
.footer-box a:hover{
    color:#A58A5A;
    transform:translateX(5px);
}
.social-links{
    display:flex;
    gap:15px;
    margin-top:5px;
}
.social-links a{
    width:42px;
    height:42px;
    border:1px solid #ddd;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    color:#555;
    font-size:17px;
    transition:all .3s ease;
}
.social-links a:hover{
    background:#A58A5A;
    color:#fff;
    border-color:#A58A5A;
    transform:translateY(-5px);
}
.footer-credentials{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:22px;
    padding:38px 0 22px;
    margin-top:48px;
    border-top:1px solid #ececec;
    text-align:center;
}
.credentials-title{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:14px;
    font-size:12px;
    font-weight:500;
    color:#8a8a8a;
    letter-spacing:2.4px;
    text-transform:uppercase;
    margin:0;
    line-height:1;
}
.credentials-title::before,
.credentials-title::after{
    content:"";
    display:block;
    width:34px;
    height:1px;
    background:#d8d2c5;
}
.credentials-logos{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:36px;
    flex-wrap:wrap;
}
.credential-logo{
    display:block;
    height:56px;
    width:auto;
    max-width:200px;
    object-fit:contain;
    filter:grayscale(15%);
    opacity:.9;
    transition:filter .3s ease, opacity .3s ease, transform .3s ease;
}
.credential-logo:hover{
    filter:grayscale(0%);
    opacity:1;
    transform:translateY(-2px);
}
.footer-bottom{
    margin-top:70px;
    padding-top:25px;
    border-top:1px solid #ddd;
    text-align:center;
    color:#777;
    font-size:14px;
    letter-spacing:.5px;
}

/* ---------- TABLET (footer only) ---------- */
@media (max-width:992px){
    .footer-container{
        grid-template-columns:repeat(2,1fr);
        gap:40px;
    }
}

/* ============================================================
   MOBILE  (single breakpoint, no duplicates)
   ============================================================ */
@media (max-width:768px){
    header{ position:sticky; transform:none !important; }

    .navbar{
        position:relative;
        height:72px;
        padding:0 18px;
        justify-content:space-between;
    }
    .logo{
        width:auto;
        justify-content:flex-start;
        gap:10px;
    }
    .logo-img{ height:44px; }
    .logo-text{
        max-width:210px;
        font-size:11px;
        text-align:left;
        line-height:1.4;
    }
    .nav-toggle{ display:block; }

    .nav-actions{
        position:absolute;
        top:72px;
        left:0;
        right:0;
        display:none;
        flex-direction:column;
        align-items:stretch;
        gap:18px;
        padding:20px;
        background:#fff;
        border-top:1px solid #eee;
        border-bottom:1px solid #eee;
        box-shadow:0 12px 22px rgba(0,0,0,.08);
    }
    .nav-actions.is-open{ display:flex; }

    .navbar ul{
        width:100%;
        flex-direction:column;
        gap:0;
    }
    .navbar ul li a{
        display:block;
        padding:11px 0;
        font-size:16px;
    }
    .navbar ul li a::after{ bottom:6px; }
    .elearning-link{ width:100%; }

    /* Mobile never shows the topbar cert logos. */
    .navbar-credentials{ display:none; }
    .navbar-cred-logo{ height:42px; }

    /* Footer mobile */
    .footer{ padding:60px 30px 25px; }
    .footer-container{
        grid-template-columns:1fr;
        gap:40px;
    }
    .footer-box p{ max-width:100%; }
    .social-links{ justify-content:flex-start; }
    .footer-credentials{
        padding:28px 16px 14px;
        margin-top:36px;
        gap:18px;
    }
    .credentials-title{
        font-size:11px;
        letter-spacing:2px;
    }
    .credentials-title::before,
    .credentials-title::after{
        width:22px;
    }
    .credentials-logos{
        gap:22px;
    }
    .credential-logo{
        height:42px;
        max-width:150px;
    }
}
