/* ========================================
   HEADER.CSS - Unified header styles
   Ensures complete visual uniformity across ALL pages
   ======================================== */

/* ========================================
   Header Container
   ======================================== */
header {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    min-height: 88px;
    contain: layout;
}

/* ========================================
   Brand Name (#name)
   STANDARDIZED: All pages use identical values
   ======================================== */
#name {
    font-family: "Permanent Marker", cursive;
    font-weight: 400;
    font-style: normal;
    font-optical-sizing: auto;
    /* Fluid scale in row layout (1441–1920+) so the title stops clipping
       into the centered links pill on smaller laptops. The pill renders
       ~600px wide at base sizes, so the title needs to shrink to ~40px
       by 1441 to leave a real gap. */
    font-size: clamp(38px, calc(4vw - 18px), 58px);
    margin-top: 15px;
    margin-left: clamp(36px, 4.5vw, 95px);
    display: block;
    color: #3b342d;
}

/* ========================================
   Navigation Links (#links)
   STANDARDIZED: Using consistent margin-top and padding
   - margin-top: 27px (picked for optimal alignment)
   - padding: 7.5px (provides best spacing)
   ======================================== */
#links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    margin-top: 27px;
    font-optical-sizing: auto;
    font-size: 27px;
    font-style: normal;
    background-color: #E8D9CD;
    padding: 7.5px;
    border-radius: 60px;
    font-family: "Delius", cursive;
    font-weight: 600;
}

/* ========================================
   Individual Link Items
   ======================================== */
.link {
    padding: 10px 40px;
    cursor: pointer;
    transition: background-color 0.3s, border-radius 0.3s;
    border-radius: 60px;
}

.link:hover {
    background-color: rgba(244, 242, 239, 0.7);
    border-radius: 60px;
}

/* ========================================
   Responsive Header Styles
   ======================================== */

/* Desktop to Tablet Transition (max-width: 1440px)
   Column-stacked header: title centered, links pill below. Minis floats
   separately at the top-right via specials.css. */
@media (max-width: 1440px) {
    header {
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px;
    }

    #name {
        font-size: 52px;
        margin: 20px 0 15px 0;
        text-align: center;
        width: 100%;
        display: block;
    }

    #links {
        position: relative;
        left: auto;
        transform: none;
        width: auto;
        margin: 0 auto 15px auto;
        font-size: 25px;
    }

    .link {
        padding: 8px 30px;
    }
}

/* Medium Screens (max-width: 1200px) */
@media (max-width: 1200px) {
    #links {
        font-size: 22px;
    }

    .link {
        padding: 8px 25px;
    }
}

/* Medium-Small Screens (max-width: 1024px) */
@media (max-width: 1024px) {
    header {
        margin-bottom: 0;
    }

    #name {
        font-size: 52px;
        margin-left: 0;
    }

    #links {
        position: relative;
        font-size: 22px;
        padding: 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .link {
        padding: 8px 25px;
    }
}

/* Small Screens (max-width: 992px) */
@media (max-width: 992px) {
    #name {
        font-size: 30px;
    }

    #links {
        font-size: 16px;
        padding: 6px 10px;
    }

    .link {
        padding: 8px 18px;
    }
}

/* Mobile Screens (max-width: 768px)
   Title at top, pill below, minis goes inline beneath the pill
   (handled in specials.css). */
@media (max-width: 768px) {
    header {
        margin-bottom: 0px;
        min-height: 140px;
    }

    #name {
        font-size: 40px;
        margin: 22px 0 12px 0;
    }

    #links {
        /* Take most of the viewport width with a small inset, like the
           pre-refactor layout. */
        width: 92%;
        max-width: 720px;
        margin: 0 auto 14px auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 6px;
        text-align: center;
        border-radius: 20px;
        font-size: 22px;
        padding: 9px 14px;
    }

    .link {
        display: flex;
        justify-content: center;
        padding: 10px 24px;
        border-radius: 14px;
    }

    .link:hover {
        border-radius: 10px;
    }
}

/* Extra Small Screens (max-width: 576px) */
@media (max-width: 576px) {
    #name {
        font-size: 34px;
    }

    #links {
        font-size: 19px;
        padding: 8px 12px;
        grid-gap: 5px;
    }

    .link {
        padding: 9px 20px;
        font-size: 19px;
    }
}

/* Very Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    #name {
        font-size: 30px;
        margin: 16px 0 10px 0;
    }

    #links {
        width: 94%;
        margin: 0 auto 12px auto;
        font-size: 17px;
        padding: 7px 11px;
        grid-gap: 4px;
        border-radius: 18px;
    }

    .link {
        padding: 8px 18px;
        font-size: 17px;
        border-radius: 12px;
    }
}

/* Tiny Screens (max-width: 360px) */
@media (max-width: 360px) {
    #name {
        font-size: 26px;
        margin: 14px 0 8px 0;
    }

    #links {
        font-size: 15px;
        padding: 6px 9px;
        grid-gap: 3px;
    }

    .link {
        padding: 7px 14px;
        font-size: 15px;
    }
}

/* Tiny Screens (max-width: 320px) */
@media (max-width: 320px) {
    #name {
        font-size: 22px;
        margin: 10px 0 6px 0;
    }

    #links {
        font-size: 13px;
        padding: 5px 8px;
        grid-gap: 3px;
    }

    .link {
        padding: 6px 11px;
        font-size: 13px;
    }
}
