/* =====================
   HEADER (GLOBAL)
===================== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    padding: 12px 24px;
    border-radius: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

header.shrink {
    padding: 8px 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* =====================
   BRAND
===================== */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.logo {
    height: 60px;
    transition: height 0.3s ease;
    flex-shrink: 0;
}

header.shrink .logo {
    height: 45px;
}

.company-name {
    color: white;
    font-size: 1.4em;
    font-weight: bold;
    white-space: nowrap;
    transition: font-size 0.3s ease;
}

/* =====================
   NAVIGATION (DESKTOP)
===================== */
.menu {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 22px;
    padding: 0;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    position: relative;
}

/* underline hover */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* =====================
   BURGER
===================== */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.3s;
}

/* =====================
   FOOTER
===================== */
footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.socials a {
    width: 32px;
    height: 32px;
}

.icon {
    width: 100%;
    height: 100%;
    fill: white;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.socials a:hover .icon {
    transform: scale(1.15);
}

.icon.instagram:hover { fill: #E1306C; }
.icon.facebook:hover { fill: #1877F2; }
.icon.tiktok:hover { fill: #000; }

/* =====================
   MOBILE (≤768px)
===================== */
@media (max-width: 768px) {

    header {
        padding: 10px 14px;
        border-radius: 0 0 16px 16px;
    }

    .logo {
        height: 38px;
    }

    .company-name {
        font-size: 1.05em;
        max-width: 65vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .burger {
        display: flex;
        align-items: center;
    }

    .burger div {
        width: 22px;
        height: 2.5px;
        margin: 4px 0;
    }

    /* dropdown menu */
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #333;
        padding: 16px 0;
        border-radius: 0 0 16px 16px;
        display: none;
        box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    }

    .menu.active {
        display: block;
        animation: fadeDown 0.25s ease;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .nav-links a {
        font-size: 1.15em;
    }
}

/* =====================
   ULTRA MOBILE (≤360px)
   “Listog Entreprenør AS” → “Listog AS”
===================== */
@media (max-width: 360px) {

    .company-name {
        font-size: 0; /* hide original text */
        position: relative;
    }

    .company-name::after {
        content: "Listog AS";
        font-size: 1em;
        font-weight: bold;
        color: white;
        white-space: nowrap;
    }

    .logo {
        height: 32px;
    }

    .burger div {
        width: 20px;
        height: 2px;
        margin: 3px 0;
    }
}

/* =====================
   ANIMATION
===================== */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
