/* Breezy Theme - Custom Styles */

@media (max-width: 768px) {
    .breezy-hero .breezy-hero__heading {
        font-size: 11vw !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }
}

/* Shared block link overlay — used by blocks with a linkUrl attribute */
.breezy-block-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}


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

/* Ensure headings inside all blocks use the theme heading font */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--wp--preset--font-family--space-mono, 'Space Mono', monospace);
    font-weight: var(--wp--custom--typography--heading--font-weight, 700);
    line-height: var(--wp--custom--typography--heading--line-height, 1.2);
    letter-spacing: var(--wp--custom--typography--heading--letter-spacing, 0.05em);
}

/* =====================
   Header
   ===================== */
.breezy-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Prevent WP sticky positioning from overriding fixed */
.breezy-header.is-position-sticky {
    position: fixed !important;
    top: 0 !important;
}

/* Account for WP admin bar when logged in */
.admin-bar .breezy-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .breezy-header {
        top: 46px;
    }
}

/* Make inner flex container full width */
.breezy-header > .wp-block-group {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure nav pushes to the right */
.breezy-header__nav {
    margin-left: auto !important;
}

/* Logo */
.breezy-header__logo img {
    height: 40px;
    width: auto;
    max-height: 40px;
}

/* Nav links - ensure visibility */
.breezy-header .wp-block-navigation a,
.breezy-header .wp-block-navigation-item a,
.breezy-header .wp-block-navigation-item__content {
    color: #fff !important;
    font-family: inherit;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.breezy-header .wp-block-navigation a:hover,
.breezy-header .wp-block-navigation-item a:hover {
    color: var(--wp--preset--color--primary, #36e6f1) !important;
}

/* Site title in header */
.breezy-header .wp-block-site-title a {
    color: #fff !important;
    text-decoration: none;
}

.breezy-header .wp-block-site-title a:hover {
    color: var(--wp--preset--color--primary, #36e6f1) !important;
}

/* Home link - first nav item shows house icon instead of text */
.breezy-header .wp-block-navigation__container > .wp-block-navigation-item:first-child > a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center;
}

.breezy-header .wp-block-navigation__container > .wp-block-navigation-item:first-child > a::before {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    font-size: 1.1rem;
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3l9-8z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3l9-8z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
}

/* Home icon in mobile overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:first-child > a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:first-child > a::before {
    content: '';
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    font-size: 1.4rem;
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3l9-8z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6H11v6H6v-9H3l9-8z'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
}

/* Hamburger icon color */
.wp-block-navigation__responsive-container-open svg {
    fill: #fff !important;
}

/* Remove dark background from nav overlay container when menu is closed */
.breezy-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    background: transparent !important;
    color: inherit !important;
}

/* =====================
   Mobile overlay menu
   ===================== */

/* The overlay container – break out of all parents with fixed positioning */
.wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 100000 !important;
    background: rgba(0, 0, 0, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden !important;
}

/* Intermediate wrappers need to fill the overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close {
    width: 100% !important;
    height: 100% !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

/* Menu content – centered vertically and horizontally */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    width: 100% !important;
}

/* The inner <ul> should also stack vertically */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.25rem !important;
    flex-wrap: nowrap !important;
}

/* Separators between menu items (desktop) */
.breezy-header .wp-block-navigation__container {
    gap: 0 !important;
}

.breezy-header .wp-block-navigation-item + .wp-block-navigation-item::before {
    content: '|';
    color: rgba(255, 255, 255, 0.5);
    margin: 0 1em;
    font-weight: 300;
}

/* Separators between menu items (mobile overlay) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item + .wp-block-navigation-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item + .wp-block-navigation-item::before {
    display: none;
}

/* Menu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    font-size: 1.4rem !important;
    font-family: 'Space Mono', monospace !important;
    color: #fff !important;
    padding: 0.6rem 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover {
    color: var(--wp--preset--color--primary, #36e6f1) !important;
}

/* Close button – top right of overlay */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    top: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 100001 !important;
}

.wp-block-navigation__responsive-container-close svg {
    fill: #fff !important;
}

/* When the first element is NOT a hero, offset for fixed header */
body {
    padding-top: 0 !important;
}

/* Pull header out of document flow so it doesn't push content down */
header.wp-block-template-part {
    position: relative;
    z-index: 999;
    height: 0;
    overflow: visible;
    contain: none !important;
}

/* Remove WP's default 50px block gap on main content area */
.wp-site-blocks > * {
    margin-block-start: 0 !important;
}

/* Hero starts at very top, behind the fixed header */
.breezy-hero {
    margin-top: 0 !important;
    padding-top: 0;
}

/* Remove side padding from hero so it's truly full-width */
.has-global-padding > .alignfull.breezy-hero {
    margin-left: calc(var(--wp--style--root--padding-left, 2rem) * -1) !important;
    margin-right: calc(var(--wp--style--root--padding-right, 2rem) * -1) !important;
}

/* Pages without a hero need spacing so content isn't hidden behind header */
.wp-block-post-content > *:first-child:not(.breezy-hero) {
    margin-top: 120px;
}

/* Admin bar offset */
.admin-bar .wp-block-post-content > *:first-child:not(.breezy-hero) {
    margin-top: 152px;
}

/* =====================
   Footer
   ===================== */
.breezy-footer .wp-block-site-logo {
    line-height: 0;
}

.breezy-footer .wp-block-site-logo img {
    width: 120px !important;
    height: auto !important;
    max-height: 50px;
}

@media (max-width: 768px) {
    .breezy-footer .wp-block-columns {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 1.5rem !important;
    }

    .breezy-footer .wp-block-column {
        flex-basis: 100% !important;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .breezy-footer .wp-block-social-links {
        justify-content: center !important;
    }
}

/* =====================
   Sticky footer
   ===================== */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:has(> main) {
    flex: 1;
}

/* =====================
   General
   ===================== */

/* Subtle card-like backgrounds for post groups */
.wp-block-group.has-subtle-background-color {
    border-radius: 8px;
    transition: background 0.3s ease;
}

/* Smooth link transitions */
a {
    transition: color 0.3s ease;
}

/* Headings that are links should keep heading font */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.wp-block-heading a,
.wp-block-heading.has-link-color a {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-decoration: none !important;
}

/* Button hover lift effect */
.wp-block-button__link {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
}

/* =====================
   Child page sub-navigation
   ===================== */
.breezy-subnav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 100px 1rem 0;
}

.breezy-subnav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breezy-subnav__item a {
    display: block;
    padding: 0.6rem 1.2rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.breezy-subnav__item a:hover {
    color: #fff;
}

.breezy-subnav__item--active a {
    color: var(--wp--preset--color--primary, #36e6f1);
    border-bottom-color: var(--wp--preset--color--primary, #36e6f1);
    font-weight: 700;
}

@media (max-width: 768px) {
    .breezy-subnav {
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .breezy-subnav__list {
        flex-wrap: nowrap;
    }

    .breezy-subnav__item a {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* =====================
   Mobile global
   ===================== */
@media (max-width: 768px) {
    /* Add side padding to page content on mobile */
    .wp-block-post-content {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    /* Full-width blocks break out of the padding */
    .wp-block-post-content > .alignfull,
    .wp-block-post-content > .breezy-hero {
        margin-left: -1.2rem;
        margin-right: -1.2rem;
        max-width: calc(100% + 2.4rem);
    }

    /* Headings and paragraphs need word-wrap */
    h1, h2, h3, h4, h5, h6, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Hero heading smaller on mobile */
    .breezy-hero__heading {
        font-size: clamp(1.2rem, 6vw, 2.5rem) !important;
    }

    /* Header padding tighter on mobile */
    .breezy-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}