@tailwind base;
@tailwind components;
@tailwind utilities;

/* ====== HEADER BAR ====== */
.nik-header{
    margin-bottom: 20px;
    position: relative;
    display: flex;
    /* background: white;
    /* vertically center content */
    align-items: center;
    /* center wrapper as a group */
    justify-content: center;
    /* FIX: lock bar height across pages */
    min-height: 88px;
    box-sizing: border-box;
}

.nik-header-wrapper{
    display: flex;
    flex-direction: row;
    /* vertical alignment */
    align-items: center;
    /* push logo to far left, nav to far right */
    justify-content: space-between;
    width: 100%;
    /* 960px content + 24px padding = 984px. This matches your page content width */
    max-width: 984px;
    /* Matches the padding of your content container */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}


/* Basic container to hold the dimensions */
.nik-styled-header-logo-container {
    flex: 0 0 auto;
    padding: 10px;
    width: fit-content;
    height: fit-content;
}

/* Transparent monogram; preserve its proportions without circular clipping. */
.nik-styled-header-logo-img {
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-sizing: border-box;
    display: block;
}

.nik-logo-container{
    padding: 2px;
    border-radius: 10px;
    color: black;
    font-size: 10px;
    flex: 0 0 auto;
    /* Removed transform to align perfectly with left edge */
}

.nik-page-logo{
    padding: 2px;
    font-size: 45px;
    font-family: "Fragment Mono", monospace;
    text-align: left;
    /* Prevent wrap that changes height */
    white-space: nowrap;
    /* Stable vertical rhythm */
    line-height: 1.05;
}

/* nav container (center with wrapper; no hard-right push) */
.nik-navigation-bar{
    /* anchor mobile panel */
    position: relative;
    /* use px, not pt */
    padding: 20px 0;
    flex: 0 0 auto;
}

/* ====== Nav links list layout ====== */
ol{
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nik-nav-list{
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    /* Prevents items from wrapping to a new line */
    flex-wrap: nowrap;
    /* Keep nav items on one line */
    white-space: nowrap;
}

.nik-nav-list li{
    position: relative;
    display: block;
}
.nik-nav-list li::marker{
    content: "";
}

/* Links formatting */
.nik-link{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .3px;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1.05;
}

/* active route highlight */
.nik-link.nik-header-current{
    color: #782F40;
    border-bottom-color: #782F40;
}

/* SERVICES DROPDOWN */
.nik-dropdown{
    position: relative;
}
.nik-dropdown-trigger{
    /* inherits .nik-link */
}

.nik-dropdown-panel{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    /* visual separation without hover gap */
    margin-top: 8px;
    min-width: 260px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    padding: 6px 0;
    z-index: 50;
}

/* invisible hover bridge */
.nik-dropdown::before{
    content:"";
    position:absolute;
    left:0; right:0;
    top:100%;
    height: 10px;
}

/* open while hovered OR when any child has focus */
.nik-dropdown:hover .nik-dropdown-panel,
.nik-dropdown:focus-within .nik-dropdown-panel{
    display: block;
}

/* dropdown items */
.nik-dropdown-list{
    list-style: none;
    margin: 0;
    padding: 0;
}

.nik-dd-link{
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #2f2f2f;
    border-bottom: 1px solid #f2f2f2;
}
.nik-dd-link:last-child{
    border-bottom: none;
}
.nik-dd-link:hover{
    background: #f4f1ed;
}

/* HAMBURGER / MOBILE */
.nik-menu-toggle{
    display: none;
    background: none;
    border: 0;
    padding: 8px 10px;
    margin-left: 12px;
    cursor: pointer;
    /* ☰ size */
    font-size: 24px;
    line-height: 1;
    color: #fff;
}

/* slightly tighter gaps on small screens */
@media (max-width: 600px){
    .nik-nav-list{
        gap: 16px;
    }
}

/* breakpoint for hamburger menu */
@media (max-width: 600px){
    .nik-menu-toggle{
        display: inline-flex;
    }

    /* hidden by default on mobile */
    .nik-nav-list{
        display: none !important;
    }

    /* SHOW the menu when hovering (or focusing) the hamburger area */
    /* SHOW the menu ONLY when React tells it to open */
    .nik-nav-list.is-open {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start;
        gap: 12px;
        position: absolute;
        right: 16px;
        top: 64px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 12px 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,.08);
        z-index: 60;
        white-space: normal;
    }

    .nik-dropdown-panel{
        position: static;
        display: none;
        box-shadow: none;
        border: 0;
        padding: 0;
        min-width: unset;
        margin-top: 0;
    }

    /* SHOW the menu when hovering (or focusing) the hamburger area */
    .nik-navigation-bar:hover .nik-nav-list,
    .nik-navigation-bar:focus-within .nik-nav-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start;
        gap: 12px;
        position: absolute;
        right: 16px;
        top: 64px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 12px 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,.08);
        z-index: 60;
        white-space: normal;
    }

    .nik-navigation-bar:hover .nik-nav-list .nik-dropdown-panel,
    .nik-navigation-bar:focus-within .nik-nav-list .nik-dropdown-panel{
        display: block;
    }

    .nik-nav-list .nik-link {
        color: #333;
    }

    /* Optional but recommended: Ensure the active link stays blue */
    .nik-nav-list .nik-link.nik-header-current {
        color: #782F40;
    }
}
/* Match the updated homepage */
.nik-header {
    margin-bottom: 0;
    min-height: 96px;
    background: #fff;
    border-bottom: 1px solid #e1d8d3;
}

.nik-header-wrapper {
    width: min(1120px, calc(100% - 48px));
    max-width: none;
}

.nik-styled-header-logo-container {
    padding: 12px 0;
}

.nik-styled-header-logo-img {
    width: 132px;
    height: auto;
}

.nik-link {
    min-height: 44px;
    color: #302727;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.nik-link:hover,
.nik-link.nik-header-current {
    color: #782f40;
    border-bottom-color: #782f40;
}

.nik-menu-toggle {
    color: #302727;
}

.nik-header a:focus-visible,
.nik-menu-toggle:focus-visible {
    outline: 3px solid #782f40;
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .nik-header-wrapper {
        width: calc(100% - 40px);
    }

    .nik-header {
        min-height: 80px;
    }

    .nik-styled-header-logo-img {
        width: 112px;
        height: auto;
    }
}
