/*
Theme Name: Hilderman Modern
Author: OmniOnline
Description: Editable, responsive construction portfolio theme for Hilderman Construction Ltd.
Version: 1.0.1
Requires at least: 6.0
Text Domain: hilderman-modern
*/

:root {
    --ink: #17252b;
    --muted: #52646a;
    --cream: #f4f2eb;
    --accent: #b7773e;
    --deep: #122b31;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   STANDARD SITE WIDTH
   ========================================================= */

.wrap {
    width: min(1200px, 90%);
    margin: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    background: var(--deep);
    color: #fff;
    position: relative;
}

/*
 * Navigation needs more room than normal page content.
 */
.site-header .wrap {
    width: min(1500px, 96%);
    max-width: 1500px;
}

.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.brand {
    text-decoration: none;
    font-size: 1.17rem;
    font-weight: 750;
    letter-spacing: .025em;
    flex: 0 0 auto;
}

.brand small {
    display: block;
    color: #d5dfdf;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .16em;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.nav {
    margin-left: auto;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/*
 * Only the TOP level is horizontal.
 * This is important so submenu levels don't inherit flex.
 */
.nav > ul {
    display: flex;
    align-items: center;
    gap: clamp(.65rem, 1vw, 1.1rem);
}

.nav li {
    position: relative;
    margin: 0;
    padding: 0;
}

.nav a {
    display: block;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 650;
    white-space: nowrap;
}

.nav a:hover,
.nav a:focus {
    color: #e6b17b;
}


/* =========================================================
   SECOND LEVEL DROPDOWN
   ========================================================= */

.nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 270px;

    margin: 0;
    padding: .45rem 0;

    background: var(--deep);

    border-top: 3px solid var(--accent);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, .22);

    z-index: 9999;
}

.nav .sub-menu li {
    width: 100%;
}

.nav .sub-menu a {
    width: 100%;
    padding: .65rem 1rem;
    color: #fff;
    white-space: nowrap;
}

.nav .sub-menu a:hover,
.nav .sub-menu a:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}


/*
 * Display immediate child submenu only.
 */
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu {
    display: block;
}


/* =========================================================
   THIRD LEVEL FLYOUT
   ========================================================= */

.nav .sub-menu .sub-menu {
    top: -3px;
    left: 100%;
    margin-left: 1px;

    border-top: 0;
    border-left: 3px solid var(--accent);
}


/*
 * On the last few main navigation items, fly level 3
 * to the LEFT so it doesn't disappear off the screen.
 */
.nav > ul > li:nth-last-child(-n+2) .sub-menu .sub-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 1px;

    border-left: 0;
    border-right: 3px solid var(--accent);
}


/* =========================================================
   NAVIGATION ARROWS
   ========================================================= */

/*
 * Down arrow for top-level items containing children.
 */
.nav > ul > .menu-item-has-children > a::after {
    content: " ▾";
    font-size: .7em;
    opacity: .8;
    margin-left: .2rem;
}


/*
 * Right arrow for submenu items containing another level.
 */
.nav .sub-menu .menu-item-has-children > a::after {
    content: "›";
    float: right;
    margin-left: 1rem;
    font-size: 1.15em;
    line-height: 1.2;
}


/*
 * Reverse arrow on menus that fly left.
 */
.nav > ul > li:nth-last-child(-n+2)
.sub-menu
.menu-item-has-children > a::after {
    content: "‹";
}


/* =========================================================
   MENU TOGGLE
   ========================================================= */

.menu-toggle {
    display: none;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    min-height: 550px;
    display: grid;
    place-items: center;
    color: #fff;

    background:
        linear-gradient(
            100deg,
            rgba(13, 35, 41, .92),
            rgba(13, 35, 41, .48)
        ),
        linear-gradient(
            135deg,
            #354c4d,
            #69736c
        );
}

.hero-inner {
    padding: 7rem 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .19em;
    font-weight: 750;
    color: #e7ae76;
    font-size: .78rem;
}

.hero h1 {
    font: clamp(2.8rem, 6vw, 5.4rem) / 1.07 Georgia, serif;
    max-width: 800px;
    margin: .5rem 0 1.3rem;
}

.hero p {
    max-width: 630px;
    font-size: 1.2rem;
    color: #e5eaea;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: .85rem 1.4rem;
    border-radius: 3px;
    font-weight: 700;
    margin-top: 1rem;
}

.button:hover {
    background: #945d2b;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
    padding: 5rem 0;
}

.section.alt {
    background: var(--cream);
}

.section h2,
.page-title {
    font: clamp(2.2rem, 4vw, 3.5rem) / 1.15 Georgia, serif;
    margin: .25rem 0 1rem;
}

.intro {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.1rem;
}


/* =========================================================
   CARDS
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.3rem;
    margin-top: 2rem;
}

.card {
    background: #fff;
    border: 1px solid #e1e5e3;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform .2s;
    box-shadow: 0 1px 3px #102c3020;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px #102c3020;
}

.card-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #516763, #203f45);
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 1.4rem;
}

.card h3 {
    font: 1.5rem / 1.2 Georgia, serif;
    margin: .2rem 0 .6rem;
}

.card p {
    color: var(--muted);
    margin: 0;
}

.card-link {
    color: #915a2d;
    font-weight: 700;
    margin-top: 1rem;
    display: block;
}


/* =========================================================
   INNER PAGES
   ========================================================= */

.page-banner {
    background: var(--cream);
    padding: 4rem 0;
}

.breadcrumbs {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 250px;
    gap: 5rem;
    padding: 4rem 0 6rem;
}

.entry-content {
    font-size: 1.08rem;
}

.entry-content p {
    margin: 0 0 1.3rem;
}

.entry-content img {
    border-radius: 3px;
}

.entry-content h2,
.entry-content h3 {
    line-height: 1.2;
    margin-top: 2rem;
}

.entry-content a {
    color: #945d2b;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    border-left: 1px solid #ddd;
    padding-left: 1.5rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: .55rem 0;
    border-bottom: 1px solid #e1e5e3;
}

.sidebar a {
    text-decoration: none;
}


/* =========================================================
   CTA + FOOTER
   ========================================================= */

.cta {
    background: var(--deep);
    color: #fff;
    padding: 4rem 0;
}

.cta h2 {
    font: 2.7rem Georgia, serif;
    margin: 0;
}

.site-footer {
    background: #0b2025;
    color: #dce5e5;
    padding: 3rem 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.site-footer a {
    color: inherit;
}

.wp-block-gallery {
    margin: 2rem 0;
}


/* =========================================================
   TABLET / NARROW DESKTOP NAVIGATION
   ========================================================= */

@media (max-width: 1680px) {

    .site-header {
        position: relative;
    }

    .header-inner {
        position: relative;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .35);
        border-radius: 3px;
        padding: .6rem .8rem;
        font: inherit;
        cursor: pointer;
        margin-left: auto;
    }

    .nav {
        display: none;
        position: absolute;

        top: 86px;
        left: 0;
        right: 0;

        width: 100%;
        margin: 0;

        background: var(--deep);
        padding: 1rem 5%;

        z-index: 9999;
    }

    .nav.open {
        display: block;
    }

    .nav > ul {
        display: block;
    }

    .nav li {
        width: 100%;
        padding: .3rem 0;
    }

    .nav a {
        display: block;
        width: 100%;
        white-space: normal;
        padding: .4rem 0;
    }


    /* -----------------------------------------------------
       MOBILE SUBMENUS
       All navigation levels stack vertically.
       ----------------------------------------------------- */

    .nav .sub-menu,
    .nav .sub-menu .sub-menu,
    .nav > ul > li:nth-last-child(-n+2) .sub-menu .sub-menu {
        display: block;

        position: static;

        width: 100%;
        min-width: 0;

        margin: .2rem 0 0 0;

        padding: 0 0 0 1rem;

        background: transparent;

        border: 0;

        box-shadow: none;
    }

    .nav .sub-menu li {
        padding: .15rem 0;
    }

    .nav .sub-menu a {
        padding: .4rem .75rem;
        white-space: normal;
    }


    /*
     * Indent third level a little further.
     */
    .nav .sub-menu .sub-menu {
        padding-left: 1.25rem;
    }


    /*
     * Remove desktop arrows on mobile.
     */
    .nav > ul > .menu-item-has-children > a::after,
    .nav .sub-menu .menu-item-has-children > a::after,
    .nav > ul > li:nth-last-child(-n+2)
    .sub-menu
    .menu-item-has-children > a::after {
        content: "";
    }


    /* General responsive layout */
    .grid {
        grid-template-columns: 1fr;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-left: 0;
        border-top: 1px solid #ddd;
        padding: 1.5rem 0;
    }

    .footer-grid {
        display: block;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 550px) {

    .wrap {
        width: 90%;
    }

    .site-header .wrap {
        width: 92%;
    }

    .header-inner {
        gap: 1rem;
    }

    .brand {
        font-size: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 470px;
    }

    .hero-inner {
        padding: 5rem 0;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 13vw, 4rem);
    }
}