/* =====================================================
   Shelley Starr Design — Header Redesign Overrides
   Replaces vertical sidebar layout with horizontal nav
   ===================================================== */

/* ---- Site Header ---- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0B1F2C;
    height: 70px;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 30px;
}
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.header-logo:hover,
.header-logo:focus {
    opacity: 0.8;
    text-decoration: none;
}
.header-logo-img {
    width: 300px;
    height: auto;
    display: block;
}

/* ---- Site Header Navigation ---- */
#site-header nav { padding: 0; }
#site-header #main-nav > ul {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    list-style: none;
}
#site-header nav li {
    position: relative;
    list-style: none;
}
#site-header nav li a {
    display: block;
    color: #fff;
    padding: 8px 10px;
    text-transform: uppercase;
    font-size: 84%;
    letter-spacing: 1px;
    white-space: nowrap;
    border-bottom: none;
    font-weight: 300;
}
#site-header nav li a:hover,
#site-header nav li a:focus {
    color: #C6C6C6;
    text-decoration: none;
}
#site-header li.active > a:before { display: none; }

/* Dropdown submenu */
#site-header .child-pages {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0B1F2C;
    min-width: 210px;
    z-index: 1001;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
}
#site-header li.has-submenu:hover > .child-pages { display: block; }
#site-header .child-pages li a {
    padding: 9px 15px;
    font-size: 74%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

/* Hamburger button — hidden on desktop */
#site-header #open-nav {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 6px 13px;
    margin-bottom: 0;
    font-size: 90%;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

/* ---- Page Offset for Fixed Header ---- */
/* flex column on pagewrap — mainbody grows from content, footer pushed down with margin-top:auto */
#pagewrap {
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
}
/* mainbody must NOT have flex:1 — let it be as tall as its content.
   flex:1 would constrain its height and cause the footer to appear inside the hero. */
#mainbody {
    height: auto !important;
    overflow-y: visible !important;
}
/* margin-top:auto pushes footer to the bottom when content is short */
#site-footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* ---- Site Footer ---- */
#site-footer {
    background: #0B1F2C;
    color: #fff;
    padding: 28px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-brand p { margin: 0; font-size: 78%; color: #C6C6C6; }
.footer-brand strong { color: #fff; }
.footer-contact a { color: #C6C6C6; font-weight: 300; margin: 0 8px; }
.footer-contact a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a { color: #C6C6C6; font-size: 115%; margin: 0; }
.footer-social a:hover { color: #fff; }
.footer-copy p { color: #C6C6C6; font-size: 73%; margin: 0; }

/* ---- Recent Work Section ---- */
.recent-work { padding: 60px 0; background: #fff; }
.recent-work .container-fluid {
    padding-left: 60px;
    padding-right: 60px;
}
.recent-work-title {
    margin-bottom: 40px;
    letter-spacing: 4px;
    font-size: 130%;
}
.recent-work-item { margin-bottom: 30px; }
.recent-work-item > a { display: block; text-decoration: none; }
.recent-work-img {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
}
.recent-work-item a:hover .recent-work-img { opacity: 0.85; }
.recent-work-label {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 14px;
    margin-bottom: 0;
    font-size: 78%;
    color: #0B1F2C;
    font-weight: 600;
}
.recent-work-arrow {
    display: block;
    text-align: center;
    color: #0B1F2C;
    font-size: 130%;
    margin-top: 4px;
    line-height: 1;
}

/* ---- Desktop spacing tweaks ---- */
@media (min-width: 768px) {
    .header-inner { padding: 0 40px; }
    #site-header nav li a { padding: 8px 9px; }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
    .header-inner { padding: 0 15px; }
    .header-logo-img { width: 180px; }

    /* Show hamburger */
    #site-header #open-nav { display: block; }

    /* Dropdown nav panel */
    #site-header #main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #0B1F2C;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    #site-header #main-nav > ul { flex-direction: column; }
    #site-header nav li a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        white-space: normal;
        font-size: 85%;
    }

    /* ---- Hero slideshow fix ----
       style.min.css (old bundle) has .slideshow{position:relative!important} on mobile.
       Override it here — our file loads after the bundle so we win. */
    .hero-section .slideshow {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    /* Cancel old bundle's homepage mainbody absolute positioning */
    #mainbody.homepage {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
        height: auto !important;
        width: auto !important;
    }

    /* Mobile footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 16px;
    }
    .footer-contact a { display: inline-block; }

    /* Recent Work */
    .recent-work { padding: 40px 0; }
    .recent-work .container-fluid { padding-left: 15px; padding-right: 15px; }
    .recent-work-img { height: 220px; }
}

@media (max-width: 480px) {
    .recent-work-img { height: 180px; }
    /* Smaller hero on very small phones */
    .hero-section { height: 50vh; }
}
