/*
 * Global styles — Header, Footer, base typography
 * Hello Elementor Child v2.2
 *
 * All color/font/spacing tokens are injected via functions.php (hec_output_custom_vars).
 * Defaults here are fallback only.
 */

:root {
    --hec-font-heading: 'Cormorant Garamond', Georgia, serif;
    --hec-font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hec-text: #1a1a1a;
    --hec-border: #e5e0d8;
    --hec-bg: #ffffff;
    --hec-bg-soft: #f8f6f3;
    --hec-accent: #b08d57;
    --hec-accent-dark: #8a6d3b;
    --hec-section-gap: 4rem;
    --hec-gutter: clamp(1.5rem, 5vw, 4rem);
    --hec-image-grayscale: 0.15;
}

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

body {
    font-family: var(--hec-font-body);
    color: var(--hec-text);
    background: var(--hec-bg);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
    max-width: 100%;
}

/* ========================================================================
   HEADER
   ======================================================================== */
.hec-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--hec-bg);
    border-bottom: 1px solid var(--hec-border);
}

.hec-site-header__inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.25rem var(--hec-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hec-site-header__brand {
    font-family: var(--hec-font-heading);
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    letter-spacing: -0.01em;
    color: var(--hec-text);
    text-decoration: none;
    transition: color 0.25s ease;
}

.hec-site-header__brand:hover {
    color: var(--hec-accent);
}

.hec-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.hec-menu li {
    margin: 0;
    padding: 0;
}

.hec-menu a {
    font-family: var(--hec-font-body);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--hec-text);
    text-decoration: none;
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.25s ease;
}

.hec-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--hec-accent);
    transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.hec-menu a:hover,
.hec-menu .current-menu-item > a,
.hec-menu .current_page_item > a {
    color: var(--hec-accent);
}

.hec-menu a:hover::after,
.hec-menu .current-menu-item > a::after,
.hec-menu .current_page_item > a::after {
    width: 100%;
}

/* ========================================================================
   Dropdown submenu (desktop)
   ======================================================================== */
.hec-menu .menu-item-has-children,
.hec-menu .page_item_has_children {
    position: relative;
}

.hec-menu .menu-item-has-children > a,
.hec-menu .page_item_has_children > a {
    white-space: nowrap;
}

.hec-menu .menu-item-has-children > a::after,
.hec-menu .page_item_has_children > a::after {
    /* override the underline animation pseudo on parents that need the caret */
}

.hec-menu .menu-item-has-children > a .hec-menu__caret,
.hec-menu .page_item_has_children > a .hec-menu__caret {
    display: inline-block;
    margin-left: 0.4em;
    font-size: 0.7em;
    opacity: 0.55;
    transition: transform 0.25s ease, opacity 0.25s ease;
    vertical-align: middle;
    line-height: 1;
}

.hec-menu .menu-item-has-children:hover > a .hec-menu__caret,
.hec-menu .page_item_has_children:hover > a .hec-menu__caret {
    opacity: 1;
    transform: translateY(1px);
}

.hec-menu .sub-menu,
.hec-menu .children {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: var(--hec-bg);
    border: 1px solid var(--hec-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 100;
}

.hec-menu .menu-item-has-children:hover > .sub-menu,
.hec-menu .menu-item-has-children:focus-within > .sub-menu,
.hec-menu .page_item_has_children:hover > .children,
.hec-menu .page_item_has_children:focus-within > .children {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hec-menu .sub-menu li,
.hec-menu .children li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hec-menu .sub-menu a,
.hec-menu .children a {
    display: block;
    padding: 0.7rem 1.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    white-space: nowrap;
    text-align: left;
}

.hec-menu .sub-menu a::after,
.hec-menu .children a::after {
    display: none; /* No underline animation inside dropdown */
}

.hec-menu .sub-menu a:hover,
.hec-menu .children a:hover {
    background: var(--hec-bg-soft);
    color: var(--hec-accent);
}

/* ========================================================================
   BACK TO TOP
   ======================================================================== */
.hec-back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: auto;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--hec-text) !important;
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease, color 0.25s ease, transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.hec-back-to-top.is-visible {
    opacity: 0.45;
    visibility: visible;
}

.hec-back-to-top:hover,
.hec-back-to-top:focus {
    opacity: 1 !important;
    color: var(--hec-accent) !important;
    transform: translateY(-4px);
    outline: none !important;
}

.hec-back-to-top svg {
    display: block;
}

@media (max-width: 768px) {
    .hec-back-to-top {
        bottom: 1.25rem;
        left: 1rem;
        right: auto;
        width: 36px;
        height: 36px;
    }
}
.hec-site-header__toggle,
.hec-site-header__toggle:hover,
.hec-site-header__toggle:focus,
.hec-site-header__toggle:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    outline: none;
}

.hec-site-header__toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hec-site-header__toggle:focus-visible {
    outline: 2px solid var(--hec-accent) !important;
    outline-offset: 2px;
}

.hec-site-header__toggle span,
.hec-site-header__toggle:hover span,
.hec-site-header__toggle:focus span,
.hec-site-header__toggle:active span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--hec-text) !important;
    background-color: var(--hec-text) !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hec-site-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ========================================================================
   MAIN CONTENT WRAPPER
   ======================================================================== */
.hec-site-content {
    min-height: calc(100vh - 180px);
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.hec-site-footer {
    border-top: 1px solid var(--hec-border);
    background: var(--hec-bg);
    margin-top: 4rem;
}

.hec-site-footer__inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem var(--hec-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--hec-text);
    opacity: 0.75;
}

.hec-site-footer__copyright,
.hec-site-footer__vat {
    font-family: var(--hec-font-body);
}

.hec-site-footer__vat {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.72rem;
}

/* ========================================================================
   IMAGE TREATMENT (applied globally)
   ======================================================================== */
.hec-row__media img,
.hec-row__placeholder,
body.single-post .page-content img:not(.hec-hero__img) {
    filter: grayscale(var(--hec-image-grayscale));
    transition: filter 0.5s ease;
}

.hec-hero__img {
    filter: brightness(0.5) grayscale(var(--hec-image-grayscale));
}

body.single-post .page-content img:not(.hec-hero__img):hover,
.hec-row__media:hover img {
    filter: grayscale(0);
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 768px) {
    .hec-site-header__inner {
        padding: 1rem 1.25rem;
    }

    .hec-site-header__toggle {
        display: flex;
    }

    .hec-site-header__nav {
        position: fixed;
        top: 64px;
        right: 0;
        left: 0;
        background: var(--hec-bg);
        border-bottom: 1px solid var(--hec-border);
        padding: 2rem;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .hec-site-header__nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hec-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }

    .hec-menu > li {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }

    .hec-menu .menu-item-has-children,
    .hec-menu .page_item_has_children {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .hec-menu a {
        font-size: 0.9rem;
    }

    /* Mobile submenu: inline list, indented, no dropdown positioning */
    .hec-menu .menu-item-has-children,
    .hec-menu .page_item_has_children {
        position: relative;
        width: 100%;
    }

    .hec-menu .menu-item-has-children > a,
    .hec-menu .page_item_has_children > a {
        white-space: normal; /* on mobile let parent labels wrap */
    }

    .hec-menu .menu-item-has-children > a .hec-menu__caret,
    .hec-menu .page_item_has_children > a .hec-menu__caret {
        margin-left: 0.5em;
        font-size: 1em;
        font-weight: 600;
        opacity: 0.7;
        /* Hide the desktop ▾ content visually so we can replace it with +/− */
        font-size: 0; /* hides the inline text ▾ */
        line-height: 1;
    }

    .hec-menu .menu-item-has-children > a .hec-menu__caret::before,
    .hec-menu .page_item_has_children > a .hec-menu__caret::before {
        content: '+';
        font-size: 1rem; /* restore size for the pseudo */
    }

    .hec-menu .menu-item-has-children.is-open > a .hec-menu__caret::before,
    .hec-menu .page_item_has_children.is-open > a .hec-menu__caret::before {
        content: '−';
    }

    .hec-menu .sub-menu,
    .hec-menu .children {
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 1rem;
        margin: 0.5rem 0 0;
        display: none;
        list-style: none;
        border-left: 1px solid var(--hec-border);
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .hec-menu .menu-item-has-children.is-open > .sub-menu,
    .hec-menu .page_item_has_children.is-open > .children {
        display: block;
    }

    .hec-menu .sub-menu li,
    .hec-menu .children li {
        padding: 0.4rem 0;
        margin: 0;
        list-style: none;
        max-width: 100%;
    }

    .hec-menu .sub-menu a,
    .hec-menu .children a {
        font-size: 0.7rem !important;
        padding: 0.3rem 0;
        opacity: 0.8;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
        letter-spacing: 0.12em;
        max-width: 100%;
        display: block;
    }

    .hec-site-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        padding: 1.75rem 1.25rem;
    }
}

/* ========================================================================
   DISCLAIMER
   ======================================================================== */
.hec-disclaimer {
    text-align: center;
    padding: 0.75rem 2rem;
    max-width: 680px;
    margin: 0 auto;
}

.hec-disclaimer p {
    font-family: var(--hec-font-body);
    font-size: 0.68rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    color: var(--hec-text);
    opacity: 0.38;
    margin: 0;
    font-style: italic;
}

/* Footer placement: sits below the copyright bar */
.hec-site-footer .hec-disclaimer {
    padding-bottom: 1.5rem;
}

/* Inline (single post): subtle separator above */
.hec-disclaimer--inline {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hec-text);
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* Archive: consistent spacing at bottom */
.hec-disclaimer--archive {
    padding: 1.5rem 2rem 2.5rem;
}

@media (max-width: 600px) {
    .hec-disclaimer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}