/*
    * Ampliz Blog Theme – HEADER + FOOTER styles (single file)
    * Header values mirror the Next.js <SiteHeader /> Tailwind classes.
    * Load after the main stylesheet (uses its --ab-* variables).
    * Breakpoint: Tailwind "xl" = 1280px  (desktop nav ≥1280px, mobile drawer below)
*/

/* =====================================================
   BASE (font + resets scoped to header / drawer)
===================================================== */
.ab-header,
.abm-menu,
.ab-demo-bar {
    font-family: "Instrument Sans", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.ab-header *,
.abm-menu *,
.ab-demo-bar * { box-sizing: border-box; }

.ab-header button,
.abm-menu button { font-family: inherit; line-height: inherit; }

.ab-header a,
.abm-menu a,
.ab-demo-bar a { text-decoration: none; }

.ab-header p,
.abm-menu p { margin: 0; }

/* =====================================================
   HEADER BAR   (fixed inset-x-0 top-0 z-40 h-[61px])
===================================================== */
.ab-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 61px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: #fff;
}

/* WordPress admin bar offset */
.admin-bar .ab-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ab-header { top: 46px; } }

/* Initial bg + scrolled bg (shadow + blur fades in over .5s) */
.ab-header-bg {
    position: absolute;
    inset: 0;
    z-index: -20;
    background: #471F25;
    pointer-events: none;
}
.ab-header-bg-scrolled {
    position: absolute;
    inset: 0;
    z-index: -10;
    background: #471F25;
    box-shadow: 0 .25rem 1.25rem rgba(0,0,0,.1);
    -webkit-backdrop-filter: blur(.625rem);
    backdrop-filter: blur(.625rem);
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
}
.ab-header.is-scrolled .ab-header-bg-scrolled { opacity: 1; }

/* Container */
.ab-header-inner {
    display: flex;
    align-items: center;
    width: min(1240px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
}

/* =====================================================
   LOGO   (h-9, border-r white/20, pr-7, img 84px)
===================================================== */
.ab-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 36px;
    padding-right: 28px;
    border-right: 1px solid rgba(255,255,255,.2);
}
.ab-logo img { display: block; width: 84px; height: auto; }

/* =====================================================
   DESKTOP NAV   (ml-6 gap-8 text-[15px] text-white/90, xl:flex)
===================================================== */
.ab-desktop-nav {
    display: none;
    align-items: center;
    gap: 32px;
    height: 100%;
    margin-left: 24px;
    font-size: 15px;
    color: rgba(255,255,255,.9);
}

.ab-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.ab-nav-trigger,
.ab-desktop-nav .ab-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.9);
    font: inherit;
    cursor: pointer;
    transition: color .15s;
}
.ab-nav-trigger:hover,
.ab-desktop-nav .ab-nav-link:hover { color: #fff; }

.ab-nav-trigger:focus-visible { outline: 2px solid #f9f7f2; outline-offset: -5px; }
.ab-desktop-nav .ab-nav-link:focus-visible { outline: 2px solid #f9f7f2; outline-offset: 4px; }

.ab-nav-trigger img {
    width: 12px;
    height: 12px;
    transition: transform .15s;
}
.ab-nav-item.is-open .ab-nav-trigger img,
.ab-nav-item:hover .ab-nav-trigger img { transform: rotate(180deg); }

/* =====================================================
   MEGA MENU DROPDOWNS
===================================================== */
.ab-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    z-index: 50;
    margin-top: 9px;
    border-radius: 12px;
    background: #f1efe0;
    color: #201a17;
    box-shadow: 0 20px 50px rgba(16,5,10,.28);
}
.ab-mega-menu::before {            /* hover bridge */
    content: "";
    position: absolute;
    top: -9px;
    left: 0;
    width: 100%;
    height: 9px;
}
.ab-nav-item.is-open > .ab-mega-menu,
.ab-nav-item:hover > .ab-mega-menu { display: block; }

.ab-products-menu { left: 0; width: 326px; padding: 28px; }

.ab-solutions-menu {
    left: -112px;
    width: min(1040px, calc(100vw - 2rem));
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px;
}
.ab-nav-item.is-open > .ab-solutions-menu,
.ab-nav-item:hover > .ab-solutions-menu { display: grid; }

.ab-solution-column { min-width: 0; }

.ab-products-list,
.ab-solution-list { display: flex; flex-direction: column; gap: 8px; }

.ab-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px 12px;
}

/* Column title: text-xs font-semibold uppercase tracking-[0.12em] #8b7d73 */
.ab-menu-title {
    margin: 0 0 16px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8b7d73;
}

/* =====================================================
   MENU ITEM   (<MenuItem compact />)
===================================================== */
.ab-mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 8px;
    border-radius: 12px;
    color: #201a17;
    transition: background-color .2s;
}
.ab-mega-item:hover { background: #f36253; }
.ab-mega-item:focus-visible { outline: 2px solid #f36253; outline-offset: 2px; }

.ab-mega-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
}
.ab-mega-icon img { display: block; width: 20px; height: 20px; }

.ab-mega-content { flex: 1; min-width: 0; }

.ab-mega-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #201a17;
    transition: color .15s;
}
.ab-mega-arrow {
    display: inline-flex;
    opacity: 0;
    transition: opacity .2s;
}
.ab-mega-item:hover .ab-mega-arrow { opacity: 1; }

.ab-mega-description {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.45;
    color: #625954;
    transition: color .15s;
}
.ab-mega-item:hover .ab-mega-title,
.ab-mega-item:hover .ab-mega-description { color: #fff; }

/* =====================================================
   DESKTOP ACTIONS   (ml-auto gap-3, xl:flex)
===================================================== */
.ab-desktop-actions {
    display: none;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.ab-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255,255,255,.9);
    transition: background-color .15s, border-color .15s, color .15s;
}
.ab-login-btn:hover {
    border-color: rgba(255,255,255,.35);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.ab-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 4px 4px 4px 18px;
    border-radius: 8px;
    background: #fffdf1;
    color: #28131c;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    transition: background-color .15s;
}
.ab-start-btn:hover { background: #fff; color: #28131c; }

.ab-btn-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #f36253;
    color: #fff;
}

/* =====================================================
   MOBILE ACTIONS   (ml-auto gap-2, xl:hidden)
===================================================== */
.abm-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.abm-start {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffdf1;
    color: #28131c;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
}
.abm-start:hover { color: #28131c; background: #fff; }

.abm-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color .15s;
}
.abm-toggle:hover { background: rgba(255,255,255,.1); }
.abm-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.abm-toggle img { display: block; width: 20px; height: 20px; filter: invert(1); }

/* =====================================================
   MOBILE MENU   (fixed inset-0 z-[60] h-[100dvh], bg #f1efe0)
===================================================== */
.abm-menu { display: none; }

.abm-menu.is-open,
.abm-menu:target {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    background: #f1efe0;
    color: #201a17;
}

.admin-bar .abm-menu.is-open,
.admin-bar .abm-menu:target { top: 32px; height: calc(100dvh - 32px); }
@media (max-width: 782px) {
    .admin-bar .abm-menu.is-open,
    .admin-bar .abm-menu:target { top: 46px; height: calc(100dvh - 46px); }
}

body.abm-menu-open { overflow: hidden; }

/* Mobile header */
.abm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 61px;
    padding: 0 5%;
    border-bottom: 1px solid rgba(40,19,28,.1);
}
.abm-logo {
    display: flex;
    align-items: center;
    height: 36px;
    padding-right: 24px;
    border-right: 1px solid rgba(40,19,28,.2);
}
.abm-logo img { display: block; width: 84px; height: auto; filter: brightness(0); }

#abm-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(40,19,28,.25);
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
#abm-close img { display: block; width: 20px; height: 20px; }

/* Mobile nav */
.abm-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 5% 32px;
}

.abm-section {
    padding: 4px 0;
    border-bottom: 1px solid rgba(40,19,28,.15);
}

.abm-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    cursor: pointer;
}
.abm-trigger img { width: 12px; height: 12px; transition: transform .15s; }
.abm-section.is-open .abm-trigger img { transform: rotate(180deg); }

.abm-submenu { display: none; padding-bottom: 12px; }
.abm-section.is-open .abm-submenu,
.abm-menu:target .abm-submenu { display: block; }

.abm-submenu.is-columns { padding: 4px 0 16px; }
.abm-solution-column + .abm-solution-column { margin-top: 12px; }

.abm-solution-column .ab-menu-title {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.5;
}

.abm-demo {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid rgba(40,19,28,.15);
    color: #201a17;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}
.abm-demo:hover { color: #201a17; }

/* Mobile bottom actions */
.abm-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px 5% max(1rem, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(40,19,28,.1);
}

.abm-login,
.abm-free {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}
.abm-login {
    flex: 1;
    border: 1px solid rgba(40,19,28,.25);
    color: #201a17;
}
.abm-login:hover { color: #201a17; }
.abm-free {
    flex: 1.5;
    gap: 8px;
    padding: 0 16px;
    background: #28131c;
    color: #fff;
}
.abm-free:hover { color: #fff; }

/* =====================================================
   DEMO PAGE HEADER (static bar, not fixed)
===================================================== */
.ab-demo-bar {
    border-bottom: 1px solid #3E1A25;
    background: #27121B;
    color: #fff;
}
.ab-demo-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1240px, calc(100% - 48px));
    min-height: 68px;
    margin: 0 auto;
}
.ab-demo-logo { display: flex; flex-shrink: 0; align-items: center; }
.ab-demo-logo img { display: block; width: 84px; height: auto; }

.ab-demo-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    line-height: 20px;
}
.ab-demo-phone { display: none; color: #fff; transition: color .15s; }
.ab-demo-phone span { color: rgba(255,255,255,.65); }
.ab-demo-phone:hover { color: #F36152; }
.ab-demo-login { color: rgba(255,255,255,.75); transition: color .15s; }
.ab-demo-login:hover { color: #fff; }

@media (min-width: 640px) {
    .ab-demo-actions { gap: 28px; }
    .ab-demo-phone { display: inline; }
}

/* =====================================================
   RESPONSIVE
===================================================== */

/* Desktop (Tailwind xl) */
@media (min-width: 1280px) {
    .ab-desktop-nav     { display: flex; }
    .ab-desktop-actions { display: flex; }
    .abm-actions  { display: none; }
    .abm-menu,
    .abm-menu.is-open,
    .abm-menu:target { display: none !important; }
}

/* Small phones */
@media (max-width: 520px) {
    .ab-header-inner,
    .ab-demo-bar-inner { width: calc(100% - 32px); }
}

@media (max-width: 379px) {
    .abm-start { display: none; }   /* max-[379px]:hidden */
}


/* =====================================================
   UPDATED AMPLIZ FOOTER
   Matches Next.js Footer Design
===================================================== */

.ab-footer {
    position: relative;
    overflow: hidden;
    background: #250712;
    color: #fff;
    padding: 44px 0 0;
    font-family: "Instrument Sans", Arial, sans-serif;
}

.ab-footer .ab-wrap {
    position: relative;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

/* TOP FOOTER GRID */

.ab-footer-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(5, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 32px;
}

/* LOGO */

.ab-footer-brand {
    display: flex;
    align-items: flex-start;
    min-width: 0;
}

.ab-footer-brand > a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ab-footer-brand img {
    display: block;
    width: 112px;
    height: auto;
    object-fit: contain;
}

/* FOOTER COLUMNS */

.ab-footer-col {
    min-width: 0;
}

.ab-footer-col h4 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.ab-footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ab-footer-links li {
    margin: 0;
    padding: 0;
}

.ab-footer-links a {
    display: inline-block;
    color: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: color .2s ease;
}

.ab-footer-links a:hover {
    color: #fff;
}

/* SOCIAL LINKS */

.ab-footer-social {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 0;
    margin-bottom: 80px;
}

.ab-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.ab-footer-social img {
    display: block;
    width: auto;
    height: auto;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    opacity: .7;
    transition: opacity .2s ease;
}

.ab-footer-social a:hover img {
    opacity: 1;
}

/* BOTTOM FOOTER */

.ab-footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    /* flex-direction: column; */
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ADDRESS / CONTACT / POLICIES */

.ab-footer-address,
.ab-footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.ab-footer-bottom a {
    color: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: color .2s ease;
}

.ab-footer-bottom a:hover {
    color: #fff;
}

/* POLICY LINKS */

.ab-footer-policies {
    display: flex;
    /* flex-wrap: wrap; */
    align-items: flex-start;
    gap: 8px 24px;
}

.ab-footer-policies a {
    white-space: nowrap;
}

/* COPYRIGHT */
.ab-footer-row {
    display: flex;
    gap: 24px;
    /* min-width: 27%; */
}
.ab-copyright {
    /* width: 100%; */
    color: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-align: right;
}

/* BOTTOM WATERMARK IMAGE */

.ab-footer-watermark {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    margin-bottom: -32px;
    pointer-events: none;
}

.ab-footer-watermark img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
}


/* =====================================================
   FOOTER RESPONSIVE
===================================================== */

/* TABLET */
@media(max-width:1000px){

    .ab-footer-grid {
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .ab-footer-brand {
        grid-column:1/-1;
    }

    .ab-footer-social {
        margin-bottom:40px;
    }

    .ab-footer-bottom {
        flex-direction:row;
        flex-wrap:wrap;
        gap:28px;
    }

    .ab-copyright {
        width:100%;
        text-align:left;
    }

}

/* MOBILE */
@media(max-width:520px){

    .ab-footer {
        padding-top:36px;
    }

    .ab-footer .ab-wrap {
        width:calc(100% - 32px);
    }

    .ab-footer-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:28px 18px;
        padding-top:0;
        margin-bottom:30px;
    }

    .ab-footer-brand {
        grid-column:1/-1;
    }

    .ab-footer-brand img {
        width:112px;
    }

    .ab-footer-col h4 {
        margin-bottom:12px;
        font-size:15px;
    }

    .ab-footer-links {
        gap:13px;
    }

    .ab-footer-links a {
        font-size:14px;
        line-height:1.5;
    }

    .ab-footer-social {
        gap:18px;
        margin-bottom:30px;
    }

    .ab-footer-bottom {
        flex-direction:column;
        align-items:flex-start;
        gap:22px;
        padding-top:22px;
    }

    .ab-footer-bottom > div:not(.ab-copyright) {
        font-size:14px;
    }

    .ab-footer-bottom a {
        font-size:14px;
    }

    .ab-footer-policies {
        flex-direction:column;
        flex-wrap:wrap;
        gap:10px;
    }

    .ab-footer-policies a {
        white-space:normal;
    }

    .ab-copyright {
        /* width:100%; */
        margin-left:0;
        font-size:14px;
        text-align:left;
    }

    .ab-footer-watermark {
        margin-bottom:-16px;
    }

}

/* SMALL MOBILE */
@media(max-width:380px){

    .ab-footer-grid {
        column-gap:14px;
    }

    .ab-footer-col h4 {
        font-size:14px;
    }

    .ab-footer-links a {
        font-size:13px;
    }

}


/* =====================================================
   FOOTER ROW RESPONSIVE FIX
   Desktop design remains unchanged
===================================================== */

/* TABLET */
@media (max-width: 1000px) {

    .ab-footer-bottom {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .ab-footer-row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 20px 24px;
        width: 100%;
    }

    .ab-footer-address,
    .ab-footer-contact {
        min-width: 180px;
        /* flex: 1 1 180px; */
    }

    .ab-footer-policies {
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .ab-copyright {
        width: 100%;
        text-align: left;
    }

}

/* MOBILE */
@media (max-width: 600px) {

    .ab-footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ab-footer-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
    }

    .ab-footer-address,
    .ab-footer-contact {
        width: 100%;
        min-width: 0;
        font-size: 14px;
        line-height: 1.6;
    }

    .ab-footer-policies {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .ab-footer-policies a {
        white-space: normal;
        font-size: 14px;
    }

    .ab-copyright {
        width: 100%;
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
        text-align: left;
    }

}

/* SMALL MOBILE */
@media (max-width: 380px) {

    .ab-footer-row {
        gap: 16px;
    }

    .ab-footer-address,
    .ab-footer-contact,
    .ab-footer-bottom a,
    .ab-copyright {
        font-size: 13px;
    }

}