/* FONTS */
@font-face {
    font-family: 'Avenir Next';
    src: url('assets/fonts/AVENIR-NEXT/AvenirNext.ttf');
}

@font-face {
    font-family: 'Avenir Next Condensed';
    src: url('assets/fonts/AVENIR-NEXT-CONDENSED/Avenir-Next-Condensed.ttf');
}

@font-face {
    font-family: 'Avenir Next Condensed Bold';
    src: url('assets/fonts/AVENIR-NEXT-CONDENSED/Avenir-Next-Condensed-Bold.ttf');
}

@font-face {
    font-family: 'Avenir Next Condensed Heavy';
    src: url('assets/fonts/AVENIR-NEXT-CONDENSED/AvenirNextCondensed-Heavy-09.ttf');
    font-weight: 900;
}


/* VARIABLES */
:root {
    --helamalmo_purple: #543177;
    --helamalmo_purple_second: #705197;
    --helamalmo_purple_third: #9e86be;
    --helamalmo_purple_fourth: #dbcbe5;

    --helamalmo_black: #000000;
    --helamalmo_white: #ffffff;

    --hamburger_menu_bg: #2d2648;
    --phoneMenu-bg: #2b1f4b;
    --hover_phone: #8569ac;

    --font-main: 'Avenir Next', sans-serif;
    --font-condensed: 'Avenir Next Condensed', sans-serif;

    --max_width_center: 1200px;
    --menuShadow: 0 16px 28px -6px rgba(0, 0, 0, 0.65);
}


/* RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    background: url("assets/body-bg.jpg") fixed;
    background-size: cover;
    font-family: var(--font-main);
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================================
   GLOBAL ANIMATED UNDERLINE
   Applies to all text links with underlines.
   Underline is always visible; on hover it
   slides out right→left then back left→right.
   ========================================= */
@keyframes underline-slide {
    0%   { transform: scaleX(1); transform-origin: right; }
    49%  { transform: scaleX(0); transform-origin: right; }
    50%  { transform: scaleX(0); transform-origin: left; }
    100% { transform: scaleX(1); transform-origin: left; }
}

.animated-underline {
    position: relative;
    text-decoration: none !important;
    display: inline-flex;
    flex-direction: column;
}

.animated-underline::after {
    content: '';
    display: block;
    height: 1px;
    background-color: currentColor;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.animated-underline:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

/* TOP BAR */
:root {
    --top-bar-item-gap: 15px; /* Unified gap for all top bar elements */
}

.top-bar {
    background-color: var(--helamalmo_purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    z-index: 30;
    position: relative;
    gap: var(--top-bar-item-gap);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}


.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--top-bar-item-gap);
}

/* Slash separator between top bar items */
.top-bar-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    font-weight: 200;
    user-select: none;
    transform: scaleY(1.4);
    display: inline-block;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-bar-logo-img {
    width: 36px;
    height: auto;
}

.top-bar-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Don't block clicks to links underneath if any */
}

.top-bar-symbol-img {
    height: 28px;
    width: auto;
}

/* TOP BAR RESPONSIVE STAGING */
@media (max-width: 1150px) {
    .top-bar-socials {
        display: none !important;
    }
}

@media (max-width: 950px) {
    .top-bar-center {
        display: none !important;
    }
    .top-bar-link {
        font-size: 0.78rem;
    }
    .top-bar-btn-white {
        font-size: 0.78rem;
        padding: 0 10px;
        height: 30px;
    }
    .top-bar {
        padding: 6px 12px;
        gap: 8px;
    }
    .top-bar-left, .top-bar-right {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    /* Hide secondary text links from top-bar on mobile/tablet so header never overflows */
    .top-bar-left .top-bar-link,
    .top-bar-right .top-bar-link,
    .top-bar-left .top-bar-separator,
    .top-bar-right .top-bar-separator {
        display: none !important;
    }
    .top-bar {
        justify-content: space-between;
        padding: 8px 16px;
    }
    .top-bar-logo-img {
        width: 32px;
    }
    .top-bar-btn-white {
        font-size: 0.75rem;
        height: 30px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 6px 10px;
    }
    .top-bar-btn-white {
        font-size: 0.7rem;
        padding: 0 8px;
        height: 28px;
    }
    .top-bar .hamburger-toggle {
        min-width: auto !important;
        padding: 0 8px !important;
        font-size: 0.75rem !important;
        height: 28px !important;
    }
}

/* White Button for Top Bar (Swisha oss) */
.top-bar-btn-white {
    background-color: white;
    color: var(--helamalmo_purple) !important;
    text-decoration: none;
    font-family: var(--font-condensed);
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0 16px;
    border-radius: 4px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s, background-color 0.2s;
    white-space: nowrap;
}

.top-bar-btn-white:hover {
    transform: scale(1.02);
    background-color: #c9a8e8;
    color: white !important;
}

.top-bar-link {
    color: white;
    text-decoration: none;
    font-family: var(--font-condensed);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
    transition: opacity 0.2s;
    white-space: nowrap;
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

/* Always-visible underline via ::after */
.top-bar-link::after {
    content: '';
    display: block;
    height: 1px;
    background-color: white;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.0s;
}

/* On hover: shrink to 0 from right, then grow back from left */
.top-bar-link:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.top-bar-link:hover {
    opacity: 1;
}

.top-bar-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-social-icon {
    color: white;
    display: flex;
    align-items: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.top-bar-social-icon:hover {
    opacity: 1;
}

/* Move hamburger into top bar - reset its container styles */
.top-bar .hamburger-nav-container {
    background-color: transparent;
    padding: 0;
    z-index: auto;
    justify-content: flex-end;
}

.top-bar .hamburger-toggle {
    margin: 0;
    padding: 0 12px;
    font-size: 0.85rem;
    width: auto;
    min-width: 140px;
    height: 32px;
    border-radius: 4px;
    font-family: var(--font-condensed);
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar .hamburger-toggle:hover {
    background: #c9a8e8;
    color: white;
}

/* DESKTOP NAVIGATION (Stacked Bars) */
.desktop-nav {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    margin-bottom: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}



/* Wrapper to position button relative to the 1200px content area */
.desktop-toggle-wrapper {
    display: none; /* toggle is now in the top bar */
}

/* Desktop Menu Toggle Button — chevron in top bar */
.desktop-menu-toggle {
    background: #040405;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    transition: background 0.2s;
    font-family: var(--font-condensed);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.desktop-menu-toggle:hover {
    background: #c9a8e8;
    color: white;
}

.toggle-chevron {
    display: inline-block;
    font-size: 0.85rem;
    transition: transform var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1));
    transform: rotate(180deg);
}

.toggle-label {
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.desktop-menu-toggle.collapsed .toggle-chevron {
    transform: rotate(0deg);
}

/* Collapsed State — whole menu collapses */
.desktop-nav.collapsed .desktop-menu-content-wrapper {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

/* Also hide dropdown when nav is collapsed and ensure it takes no space */
.desktop-nav.collapsed .desktop-menu-dropdown {
    display: none;
}

/* Expanded State (default) — wrapper for level 1 */
.desktop-menu-content-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1)),
                opacity var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1));
}

/* Inner div — wraps level 1 row only */
.desktop-menu-content-wrapper > .desktop-menu-rows-inner {
    overflow: hidden;
}

/* -------------------------------------------------------
   Dropdown container for levels 2+.
   Relatively positioned below the nav — pushes page
   content down. Height transitions are smooth and expand
   the document flow natively.
   ------------------------------------------------------- */
.desktop-menu-dropdown {
    position: relative;
    z-index: 9;
    width: 100%;
}

/* Shadow below the dropdown — unified bold shadow for cascading levels over hero image */
.desktop-menu-dropdown:has(.desktop-menu-family) {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
}



/* --- Sub-row height slide animation --- */
.desktop-menu-dropdown .desktop-menu-family {
    transition: height var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1));
}

/* --- Row inner layout (shared by all levels) --- */
.desktop-nav .desktop-menu-family > .desktop-menu-row-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 100%;

}

.desktop-menu-family a {
    text-decoration: none;
}

.desktop-menu-family button {
    border: none;
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 12px;
    min-width: 140px;
    cursor: pointer;
    font-family: var(--font-condensed);
    background: transparent;
    /* Flat background */
    color: white;
    transition: background 0.2s;
    text-shadow: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 2px;
}

.desktop-menu-family button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-chevron {
    font-size: 0.8em;
    margin-left: 5px;
    display: inline-block;
}

/* Active State: White Background, Black Text */
.desktop-menu-family a.active button,
.desktop-menu-family button.active-btn {
    background-color: white !important;
    color: black !important;
    /* Removed shadow */
    transform: none;
    /* Removed lift */
}

/* =========================================
   SCALABLE MENU LEVELS
   ========================================= */

/* --- GROUP 1: Floating Buttons (Levels 1, 3, 5) --- */
/* Used for: Main menu, Sub-menus like "Nydalamodellen", "Spelande Lag" */
/* 1. RESET GENERIC HOVER 
   (Prevents the "ghost" white transparency from your old CSS) */
.desktop-menu-family button:hover {
    background-color: inherit;
}


/* --- GROUP 1: Floating Buttons (Levels 1, 3, 5) --- */
/* Design: Purple Buttons on White Bar */
.desktop-menu-level-1 > .desktop-menu-row-inner,
.desktop-menu-level-3 > .desktop-menu-row-inner,
.desktop-menu-level-5 > .desktop-menu-row-inner {
    background-color: white;
    padding: 10px 0;
}

/* Default Button */
.desktop-menu-level-1 button {
    background-color: var(--helamalmo_purple);
    color: white;
    border: 2px solid transparent;
    font-size: 16px;
    padding: 17px 19px;
    min-width: 160px;
}

.desktop-menu-level-3 button,
.desktop-menu-level-5 button {
    background-color: var(--helamalmo_purple);
    color: white;
    border: 2px solid transparent;
}

/* Hover: Light Purple — consistent across all levels */
.desktop-menu-level-1 button:hover,
.desktop-menu-level-3 button:hover,
.desktop-menu-level-5 button:hover {
    background-color: #c9a8e8;
    color: white;
}


/* --- GROUP 2: Black Bar (Levels 2, 6) --- */
/* Design: White Buttons on Black Bar */
.desktop-menu-level-2 > .desktop-menu-row-inner,
.desktop-menu-level-6 > .desktop-menu-row-inner {
    background-color: black;
    padding: 8px 0;
}

/* Default Button */
.desktop-menu-level-2 button,
.desktop-menu-level-6 button {
    background-color: white;
    color: black;
    border: 2px solid transparent;
}

/* Hover: Light Purple */
.desktop-menu-level-2 button:hover,
.desktop-menu-level-6 button:hover {
    background-color: #c9a8e8;
    color: white;
}


/* --- GROUP 3: Purple Bar (Levels 4, 7) --- */
/* Design: White Buttons on Purple Bar */
.desktop-menu-level-4 > .desktop-menu-row-inner,
.desktop-menu-level-7 > .desktop-menu-row-inner {
    background-color: var(--helamalmo_purple);
    padding: 8px 0;
}

/* Default Button */
.desktop-menu-level-4 button,
.desktop-menu-level-7 button {
    background-color: white;
    color: var(--helamalmo_purple);
    border: 2px solid transparent;
}

/* Hover: Light Purple */
.desktop-menu-level-4 button:hover,
.desktop-menu-level-7 button:hover {
    background-color: #c9a8e8;
    color: white;
}


/* --- GLOBAL ACTIVE STATE (Black Button) --- */
.desktop-menu-family a.active button,
.desktop-menu-family button.active-btn {
    background-color: black !important;
    color: white !important;
    border: 2px solid white !important;
}

/* Active Button Hover: Light Purple (#c9a8e8) */
.desktop-menu-family a.active button:hover,
.desktop-menu-family button.active-btn:hover {
    background-color: #c9a8e8 !important;
    color: white !important;
    border-color: transparent !important;
}


/* HAMBURGER NAVIGATION (Mobile & Desktop side menu) */
.hamburger-nav-container {
    display: flex;
    /* Use Flexbox for alignment */
    justify-content: flex-end;
    /* Align button to the RIGHT */
    align-items: center;
    background-color: #040405;
    /* padding: 10px; Removed padding to allow full-width blocks if needed */
    color: white;
    position: relative;
    z-index: 20;
    /* padding-right: 15px;  <- Handled by wrapper now */
}

/* Wrapper for stacked buttons */
.hamburger-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
    /* Spacing from right edge essentially */
}

.hamburger-toggle {
    background: #040405;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 4px 15px;
    font-family: var(--font-condensed);
    font-size: 14px;
    cursor: pointer;
    margin: 5px;
    /* Reduced margin for stacking */
    width: auto;
    /* Fixed width for alignment */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.chevron-toggle {
    font-size: 14px;
    /* Slightly smaller for the arrow */
    height: 30px;
    /* Shorter height */
    padding: 0;
    transition: transform 0.3s ease;
}

/* Rotate chevron when open */
.hamburger-nav-container.open .chevron-toggle {
    transform: rotate(180deg);
}

/* The Menu Drawer
   Slide animation is driven by .anim-slide-right / .is-open
   from animations.css.  We duplicate the critical closed-state
   properties here as a fallback so the drawer is never visible
   before animations.css loads. */
.hamburger-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--helamalmo_purple);
    padding-bottom: 20px;
    padding-top: 60px; /* Just enough for the close button */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    overflow-y: auto;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 0;

    /* Closed state — off-screen to the right, invisible */
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1)),
                visibility 0s linear var(--anim-duration, 300ms);
}

/* Open state — slide in, become visible immediately */
.hamburger-menu-content.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1)),
                visibility 0s linear 0s;
}

.hamburger-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    position: absolute;
    top: 6px; /* Matched exactly to top-bar top offset (6px) */
    right: 20px; /* Matched exactly to top-bar right offset (20px) */
    z-index: 2100;
}

.hamburger-control-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 16px;
    border-radius: 4px;
    cursor: pointer;
    height: 32px;
    font-family: var(--font-condensed);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.hamburger-control-btn .icon,
.hamburger-toggle .icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.hamburger-close-btn {
    background: #040405 !important;
    border: 1px solid #fff !important;
    min-width: 140px; /* Match toggle button width logic */
    padding: 4px 10px; /* Exact match to .top-bar .hamburger-toggle */
}

.hamburger-expand-all {
    background: white !important;
    color: var(--helamalmo_purple) !important;
    border: 1px solid #fff;
}

.hamburger-collapse-all {
    background: transparent;
    color: white !important;
    border: 1px solid #fff;
}

.hamburger-close-btn:hover,
.hamburger-expand-all:hover,
.hamburger-collapse-all:hover {
    background: #c9a8e8 !important;
    color: white !important;
}

.hamburger-close-btn:active,
.hamburger-expand-all:active,
.hamburger-collapse-all:active {
    transform: scale(0.95);
    background: var(--helamalmo_purple) !important;
    color: white !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Persistent Active / Toggled Indicator for Level Control Buttons */
.hamburger-expand-all.active,
.hamburger-collapse-all.active {
    background: #705197 !important;
    color: white !important;
    border: 2px solid white !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

.hamburger-expand-all.active span:first-child::before,
.hamburger-collapse-all.active span:first-child::before {
    content: "✓ ";
    font-weight: 900;
}


/* Level controls container — sits lower down, flush above .hamburger-list-container */
.hamburger-level-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 0 20px 4px 0; /* Lower down, flush against list container */
    margin-top: 48px; /* Offset below close button */
}

.hamburger-list {
    list-style: none;
    padding: 10px;
    padding-top: 0px;


    /* Level 1 Shadow: The entire main list casts a shadow */
    /* Using drop-shadow on the list ensures the complex shape (if spaced) has a shadow, 
       but here strictly stacking means a box shadow on the UL might work or drop-shadow filters down. 
       Let's use drop-shadow on the parent container or just box-shadow on the UL block?
       Since items are flush, the UL is a rectangle. 
    */
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.85));
    background: transparent;
}


/* Individual Items (Blocks) */
.hamburger-item {
    margin-bottom: 0px;
}

.hamburger-item-header {
    display: flex;
    padding: 6px;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    margin-bottom: 0;
    /* border: none prevents transparent gaps that cause drop-shadow to bleed through */
    border: none;
    box-sizing: border-box;
    /* Subtle white outline makes each item visually distinct */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    transition: background-color 0.2s;
}

/* Depth-based coloring - Strict Hex Scale */
.hamburger-item.depth-1 > .hamburger-item-header { background-color: #20193e; }
.hamburger-item.depth-2 > .hamburger-item-header { background-color: #3c2563; }
.hamburger-item.depth-3 > .hamburger-item-header { background-color: #533278; }
.hamburger-item.depth-4 > .hamburger-item-header { background-color: #674c8c; }
.hamburger-item.depth-5 > .hamburger-item-header { background-color: #8569ac; }
.hamburger-item.depth-6 > .hamburger-item-header { background-color: #9e86be; }
.hamburger-item.depth-7 > .hamburger-item-header { background-color: #dbcbe5; }

/* Text color based on depth for contrast */
.hamburger-item.depth-1 > .hamburger-item-header a,
.hamburger-item.depth-2 > .hamburger-item-header a,
.hamburger-item.depth-3 > .hamburger-item-header a,
.hamburger-item.depth-4 > .hamburger-item-header a,
.hamburger-item.depth-5 > .hamburger-item-header a {
    color: #FFFFFF !important;
}

.hamburger-item.depth-6 > .hamburger-item-header a,
.hamburger-item.depth-7 > .hamburger-item-header a {
    color: #040405 !important;
}

/* Hover effects - light purple */
.hamburger-item-header:hover {
    background-color: #c9a8e8 !important;
}

/* Active State override — inset box-shadow avoids layout shifts and gap-bleed */
.hamburger-item.active > .hamburger-item-header,
.hamburger-item.active-branch > .hamburger-item-header {
    background-color: #000000 !important;
    /* Solid white on black bg (override the semi-transparent default) */
    box-shadow: inset 0 0 0 2px #FFFFFF !important;
}

/* Force white text on ALL active/active-branch link text */
.hamburger-item.active > .hamburger-item-header a,
.hamburger-item.active-branch > .hamburger-item-header a {
    color: #FFFFFF !important;
}

/* Link Styling */
.hamburger-item-header a {
    text-decoration: none;
    font-size: 16px;
    font-family: var(--font-condensed);
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    flex-grow: 1;
    text-transform: uppercase;
}

/* Toggle Button Styling — matches .card-expand-btn exactly */
.hamburger-accordion-toggle {
    background: white;
    color: var(--helamalmo_purple);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-left: 10px;
    margin-right: 7px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.hamburger-accordion-toggle:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

.hamburger-accordion-toggle.active {
    background: var(--helamalmo_purple);
    color: white;
}

.hamburger-accordion-toggle.active:hover {
    background: #3b2254;
}

/* Fix +/− glyph centering: collapse the text line-box to the em square */
.hamburger-accordion-toggle .icon {
    display: block;
    line-height: 1;
}

/* Icon logic handled by JS textContent to match cards exactly */

/* Sub-lists (Accordion Content)
   Uses JS-driven height for a clean slide-down / slide-up.
   z-index: 1 creates a positive stacking context so ::after sits above the
   inline z-indexes on <li> elements without going negative. */
.hamburger-sublist {
    list-style: none;
    padding: 0;
    margin-left: 15px; /* indent shifts the whole box, not a transparent gap */
    position: relative;
    z-index: 1;

    /* Collapsed state */
    height: 0;
    overflow: hidden;
    transition: height var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1));
}

/* Carved-in shadow overlay — TWO thin horizontal bars (no corners = no side bleed) */
.hamburger-sublist::before,
.hamburger-sublist::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    pointer-events: none;
    z-index: 9999;
}

/* Top inner shadow */
.hamburger-sublist::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

/* Bottom inner shadow */
.hamburger-sublist::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}


/* Legacy depth styles removed for strict hex scale */

/* DESKTOP NAV LAPTOP RESPONSIVE SCALE (951px - 1200px) */
@media (min-width: 951px) and (max-width: 1200px) {
    .desktop-menu-level-1 button {
        font-size: 14px;
        padding: 12px 10px;
        min-width: 130px;
    }
    .desktop-menu-family button {
        font-size: 13px;
        padding: 6px 8px;
        min-width: 120px;
    }
    .desktop-menu-family > .desktop-menu-row-inner {
        gap: 2px;
    }
}

/* RESPONSIVE */
@media (max-width: 950px) {
    .desktop-nav,
    .desktop-menu-toggle,
    .top-bar-left .top-bar-separator:last-of-type {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hamburger-menu-content {
        width: 100vw;
        max-width: 100%;
        border-radius: 0;
        padding-top: 55px;
    }
    .hamburger-controls {
        top: 8px;
        right: 12px;
    }
    .hamburger-close-btn {
        min-width: 110px;
        height: 36px;
    }
    .hamburger-item-header a {
        font-size: 14px;
        padding: 10px 12px;
    }
    .hamburger-accordion-toggle {
        width: 40px;
        height: 40px;
    }
}

/* LAYOUT & COMPONENTS */
main {
    max-width: var(--max_width_center);
    margin: 0 auto;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    /* Slight readability background */
    min-height: 80vh;
    box-shadow: -14px 16px 45px rgba(0, 0, 0, 0.85), 14px 16px 45px rgba(0, 0, 0, 0.85);
}

.hero {
    position: relative;
    width: 100%;
    height: 300px; /* Increased for premium feel */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.hero-bottom {
    margin-top: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
}


.hero-no-image {
    background-color: var(--helamalmo_purple);
}

.content-article {
    padding: 60px 40px;
    font-family: var(--font-main);
    line-height: 1.8;
    color: #222;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.article-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* BREADCRUMB LINKS & TEXT */
.hero-top .breadcrumbs {
    position: absolute;
    top: 40px;
    width: 100%;
    z-index: 10;
}

.hero-bottom .breadcrumbs {
    position: absolute;
    bottom: 40px;
    width: 100%;
    z-index: 10;
}

.hero-title {
    color: white;
    font-size: clamp(2.5rem, 5.5vw, 5.5rem);
    font-family: 'Avenir Next Condensed Heavy', 'Avenir Next Condensed Bold', 'Avenir Next Condensed', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.7);
    margin: 0;
    position: absolute;
    bottom: 25px;
    text-align: center;
    padding: 0 20px;
    z-index: 10;
    line-height: 1.05;
    word-break: break-word;
    max-width: 95%;
}

@media (max-width: 768px) {
    .hero {
        height: 220px;
    }
    .hero-title {
        font-size: clamp(1.8rem, 6.5vw, 3.2rem);
        bottom: 15px;
        padding: 0 12px;
    }
    .hero-top .breadcrumbs {
        top: 15px;
    }
    .hero-bottom .breadcrumbs {
        bottom: 15px;
    }
    .breadcrumbs a {
        font-size: 13px;
    }
    .breadcrumbs li:first-child a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 180px;
    }
    .hero-title {
        font-size: clamp(1.4rem, 6vw, 2.2rem);
        bottom: 10px;
        padding: 0 8px;
    }
    .breadcrumbs a {
        font-size: 11px;
    }
    .breadcrumbs li:first-child a {
        font-size: 12px;
    }
}


.breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    color: white; /* Make slashes text white too */
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

/* The separator slashes */
.breadcrumbs li::after {
    content: "/";
    margin-left: 10px;
    font-weight: normal;
    opacity: 0.5;
}

/* Remove separator from the very last item */
.breadcrumbs li:last-child::after {
    content: "";
}

/* Base Link Style */
.breadcrumbs a {
    color: white;
    text-decoration: none;
    text-underline-offset: 4px;
    font-size: 16px;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.breadcrumbs a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: white;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.breadcrumbs a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

/* RULE 1: First Item (HOME) -> Uppercase, Bold, Underline */
.breadcrumbs li:first-child a {
    text-transform: uppercase;
    font-weight: bold;
    font-size: 18px;
}

/* RULE 2: Items 2 & 3 -> Uppercase, Normal, Underline */
.breadcrumbs li:nth-child(2) a,
.breadcrumbs li:nth-child(3) a {
    text-transform: uppercase;
    font-weight: normal;
}

/* RULE 3: Items 4 and up -> Capitalized, Normal, Underline */
.breadcrumbs li:nth-child(n+4) a {
    text-transform: capitalize;
    font-weight: normal;
}

/* RULE 4: Last Item (Current Page) -> Bold, NO Underline, not clickable */
.breadcrumbs li:last-child,
.breadcrumbs li:last-child a {
    font-weight: bold;
    text-transform: capitalize;
    color: white;
    cursor: default;
}

.breadcrumbs li:last-child a::after {
    display: none;
}

/* CARD GRID */

.card-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

.card-column:empty {
    display: none !important;
}

/* Home Page, Single-card & Two-card Grids: Center all card grids and columns horizontally */
.home-page-container .card-grid,
.card-grid--single-card,
.card-grid--two-cards {
    justify-content: center !important;
}

.home-page-container .card-column,
.card-grid--single-card .card-column,
.card-grid--two-cards .card-column {
    max-width: 365px !important;
    flex: 0 1 365px !important;
}


.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

@media (min-width: 650px) and (max-width: 950px) {
    .card-grid {
        flex-wrap: wrap;
        gap: 20px;
        padding: 20px 24px;
    }
    .card-column {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    .card-column:nth-child(3) {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .card-image-wrapper,
    .card-partner-image-wrapper {
        height: 240px;
        min-height: 240px;
    }
    .home-page-container .card-column {
        max-width: calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
    }
}

@media (max-width: 649px) {
    .card-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px 16px;
    }
    .card-column {
        display: contents !important;
    }
    .home-page-container .card-column {
        display: contents !important;
    }
    .card-image-wrapper,
    .card-partner-image-wrapper {
        height: 220px;
        min-height: 220px;
    }
    .card-title-overlay {
        font-size: 1.2rem;
        left: 15px;
        bottom: 12px;
    }
    .card-expand-btn {
        bottom: 12px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    .card-text-wrapper {
        padding: 0 16px;
    }
    .card.expanded .card-text-wrapper {
        padding: 0 16px;
    }
    .card-cta-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

.card-image-wrapper {
    width: 100%;
    height: 280px; /* Fixed image height so all cards look uniform */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image {
    transform: scale(1.05); 
}

.card-title-overlay {
    position: absolute;
    bottom: 15px;
    left: 20px;
    color: white;
    font-size: 1.4rem;
    font-family: var(--font-condensed, sans-serif);
    text-transform: uppercase;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
    margin: 0;
    z-index: 5;
    pointer-events: none;
    max-width: 75%;
}

.card-expand-btn {
    position: absolute;
    bottom: 15px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: white;
    color: var(--helamalmo_purple);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 5;
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.card-expand-btn:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

.card-expand-btn.active {
    background: var(--helamalmo_purple);
    color: white;
}

.card-expand-btn.active:hover {
    background: #3b2254;
}

.card-text-wrapper {
    height: 0;
    padding: 0 25px;
    overflow: hidden;
    background: white;
    transition: height var(--anim-duration, 300ms) var(--anim-easing, cubic-bezier(0.4,0,0.2,1));
    display: flex;
    flex-direction: column;
}

.card.expanded .card-text-wrapper {
    padding: 0 25px;
}

.card-text-wrapper-inner {
    padding: 20px 0 25px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-text {
    margin: 0;
    margin-bottom: 15px;
    line-height: 1.5;
    color: #444;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card.expanded .card-text {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.card--always-open .card-text-wrapper {
    height: auto !important;
    padding: 0 25px !important;
    overflow: visible !important;
}

.card--always-open .card-text {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    overflow: visible !important;
    margin-bottom: 0 !important;
}
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.card-footer {
    padding: 0;
    background: white;
    margin-top: auto;
}

.card-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--helamalmo_purple);
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    font-family: var(--font-condensed);
    letter-spacing: 1px;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
}

.card-cta-btn:hover {
    background: #c9a8e8;
    transform: scale(0.98);
}

/* Partner Card Variant */
.card-partner {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-partner-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    min-height: 280px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-partner-image-wrapper .card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-partner-logo {
    position: relative;
    z-index: 1;
    max-width: 60%;
    max-height: 150px;
    width: auto;
    height: auto;
    filter: brightness(0) invert(1);
}

.card-partner-logo--large {
    max-height: 240px;
}

.card-partner-body {
    padding: 16px 20px;
    height: 115px;
    min-height: 115px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-partner-subtitle {
    font-family: var(--font-condensed);
    font-size: 0.9rem;
    font-weight: 400;
    font-style: italic;
    text-transform: uppercase;
    color: #333;
    margin: 0 0 4px 0;
}

.card-partner-hero-text {
    position: relative;
    z-index: 1;
    color: white;
    font-family: var(--font-condensed);
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    text-align: center;
    padding: 20px 15px;
    word-break: break-word;
}

.card-partner-title {
    font-family: var(--font-condensed);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #111;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.card-partner-email {
    font-family: var(--font-main);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.3;
}

.card-partner-email a,
.home-section--purple .card-partner-email a {
    color: var(--helamalmo_purple, #602080) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.card-partner-email a:hover,
.home-section--purple .card-partner-email a:hover {
    color: #3b2254 !important;
}

.card-partner-text {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #444;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.hidden {
    display: none;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   SITEMAP
   ========================================= */
.sitemap {
    padding: 40px;
    max-width: var(--max_width_center);
    margin: 0 auto;
}

.sitemap-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sitemap-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 50px;
}

.sitemap-heading {
    font-family: var(--font-condensed);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--helamalmo_purple);
    text-decoration: none;
    letter-spacing: 1px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 0;
}

.sitemap-heading:hover {
    opacity: 0.75;
}

/* ---- Tree structure ---- */
.sitemap-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

/*
 * ALL nested child lists (any ul.sitemap-tree that holds children):
 * - indent from parent via margin-left + padding-left
 * - small top gap so line doesn't touch parent text
 */
.sitemap-node > .sitemap-tree,
.sitemap-section > .sitemap-tree {
    margin-left: 8px;
    padding-left: 20px;
    padding-top: 4px;
    position: relative;
}

/* Each node */
.sitemap-node {
    position: relative;
    padding: 3px 0;
}

/*
 * Horizontal branch dash — on every li inside any child list.
 * Starts flush with the vertical line, ends with a gap before text.
 * Vertically centered on the text baseline (~0.6em).
 */
.sitemap-node > .sitemap-tree > .sitemap-node::before,
.sitemap-section > .sitemap-tree > .sitemap-node::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0.6em;
    width: 14px;
    height: 0;
    border-top: 1.5px solid var(--helamalmo_purple);
}

/*
 * Vertical connector line — on non-last children.
 * Runs full height of the li, connecting to the next sibling.
 */
.sitemap-node > .sitemap-tree > .sitemap-node:not(:last-child)::after,
.sitemap-section > .sitemap-tree > .sitemap-node:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1.5px solid var(--helamalmo_purple);
}

/*
 * Last child: short vertical stub from top down to the horizontal dash.
 * No line extends past it.
 */
.sitemap-node > .sitemap-tree > .sitemap-node:last-child::after,
.sitemap-section > .sitemap-tree > .sitemap-node:last-child::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    height: 0.6em;
    width: 0;
    border-left: 1.5px solid var(--helamalmo_purple);
}

/* Links */
.sitemap-node > a {
    text-decoration: none;
    font-family: var(--font-condensed);
    color: var(--helamalmo_purple);
    transition: opacity 0.2s;
}

.sitemap-node > a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Depth-based text sizing */
.sitemap-node[data-depth="1"] > a {
    font-size: 1.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sitemap-node[data-depth="2"] > a {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sitemap-node[data-depth="3"] > a {
    font-size: 1.25rem;
    font-weight: 500;
}

.sitemap-node[data-depth="4"] > a {
    font-size: 1.125rem;
    font-weight: 400;
}

.sitemap-node[data-depth="5"] > a {
    font-size: 1rem;
    font-weight: 400;
}

.sitemap-node[data-depth="6"] > a {
    font-size: 0.875rem;
    font-weight: 300;
}

@media (max-width: 600px) {
    .sitemap {
        padding: 20px;
    }

    .sitemap-heading {
        font-size: 1.5rem;
    }

    .sitemap-node > .sitemap-tree,
    .sitemap-section > .sitemap-tree {
        margin-left: 6px;
        padding-left: 14px;
    }

    .sitemap-node > .sitemap-tree > .sitemap-node::before,
    .sitemap-section > .sitemap-tree > .sitemap-node::before {
        left: -14px;
        width: 10px;
    }

    .sitemap-node > .sitemap-tree > .sitemap-node:not(:last-child)::after,
    .sitemap-section > .sitemap-tree > .sitemap-node:not(:last-child)::after {
        left: -14px;
    }

    .sitemap-node > .sitemap-tree > .sitemap-node:last-child::after,
    .sitemap-section > .sitemap-tree > .sitemap-node:last-child::after {
        left: -14px;
    }
}

/* =========================================
   SITE FOOTER (REDESIGN)
   ========================================= */
.site-footer {
    background-color: var(--helamalmo_white);
    padding: 60px 40px;
    border-top: 1px solid #ddd;
    border-bottom: 2px solid #ccc;
    font-family: var(--font-main);
    color: #000;
    width: 100%;
}

.footer-container {
    max-width: var(--max_width_center);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Top Nav */

/* SITE FOOTER REDESIGN */
.site-footer-new {
    background-color: #ffffff;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding: 80px 0 60px 0;
    margin-top: 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.3);
}

.footer-container-new {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 60px;
    gap: 60px;
}

.footer-left-logo {
    flex: 0 0 200px;
    display: grid;
    align-content: center;
}

.footer-sidebar-logo {
    width: 100%;
    height: auto;
}

.footer-right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer-new-main-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    font-family: var(--font-condensed);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--helamalmo_purple);
    align-items: center;
    flex-wrap: wrap;
    white-space: normal;
    width: 100%;
}

.footer-new-main-nav a {
    color: var(--helamalmo_purple);
    text-decoration: none;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.footer-new-main-nav a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-new-main-nav a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.footer-new-main-nav .nav-sep {
    opacity: 0.3;
    font-weight: normal;
    font-size: 1.2rem;
}

/* Link Columns */
.footer-columns {
    display: flex;
    justify-content: flex-start;
    gap: 60px;
    margin-bottom: 30px;
}

.footer-col {
    position: relative;
    padding: 0;
    border-left: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-col:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -30px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(138, 43, 226, 0.2);
}

.footer-col h4 {
    margin: 0 0 5px 0;
}

.footer-col h4 a {
    color: var(--helamalmo_purple);
    font-family: var(--font-condensed);
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin: 0;
    display: inline-flex;
    flex-direction: column;
    position: relative;
}

.footer-col h4 a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-col h4 a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.footer-col > a {
    display: inline-flex;
    flex-direction: column;
    color: var(--helamalmo_purple);
    text-decoration: none;
    font-family: var(--font-condensed);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 6px;
    line-height: 1.2;
    transition: opacity 0.2s;
    position: relative;
}

.footer-col > a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-col > a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.footer-col a:hover {
    opacity: 0.7;
}

.footer-hr-purple {
    height: 1px;
    background-color: rgba(138, 43, 226, 0.2);
    margin-bottom: 30px;
}

.footer-new-policy-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    font-family: var(--font-condensed);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--helamalmo_purple);
    align-items: center;
    flex-wrap: wrap;
}

.footer-new-policy-nav a {
    color: var(--helamalmo_purple);
    text-decoration: none;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.footer-new-policy-nav a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-new-policy-nav a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.footer-new-policy-nav .nav-sep {
    opacity: 0.3;
}

.bold-webbkarta {
    font-weight: 900 !important;
}

.bold-swisha {
    font-weight: 700 !important;
}

.footer-legal-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-condensed);
    color: var(--helamalmo_purple);
    flex-wrap: wrap;
}

.copyright {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--helamalmo_purple);
    letter-spacing: 1px;
}

.footer-vertical-divider {
    width: 1px;
    background-color: rgba(138, 43, 226, 0.2); /* matches column border */
    margin-top: 70px;
    margin-bottom: 65px;
}

/* Footer Center Socials Section */
.footer-center-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 30px;
}

.footer-socials-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 25px 37px;
    border-left: 1px solid rgba(138, 43, 226, 0.3);
    border-right: 1px solid rgba(138, 43, 226, 0.3);
    border-bottom: none;
    position: relative;
}

.footer-socials-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background-color: rgba(138, 43, 226, 0.3);
}

.footer-social-icon {
    color: var(--helamalmo_purple);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.footer-social-icon:hover {
    opacity: 0.7;
}

.footer-butik-link {
    color: var(--helamalmo_purple);
    font-family: var(--font-condensed);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    flex-direction: column;
    transition: opacity 0.2s;
}

.footer-butik-link-inner {
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-butik-link::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-butik-link:hover {
    opacity: 0.7;
}

.footer-butik-link:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.footer-policy-line {
    height: 1px;
    background-color: rgba(138, 43, 226, 0.2);
    margin-bottom: 25px;
    width: 65%;
    max-width: 580px;
}

.org-nr {
    font-size: 0.85rem;
    font-weight: 400;
}

.footer-legal-row .sep {
    font-size: 0.85rem;
    opacity: 0.3;
}

.footer-legal-row a {
    color: var(--helamalmo_purple);
    text-decoration: none;
    position: relative;
    display: inline-flex;
    flex-direction: column;
}

.footer-legal-row a::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--helamalmo_purple);
    width: 100%;
    transform: scaleX(1);
    transform-origin: left;
}

.footer-legal-row a:hover::after {
    animation: underline-slide 0.35s ease forwards;
}

.bold-faktura {
    font-size: 0.85rem;
    font-weight: 900;
}

/* Responsive Footer */
@media (max-width: 1100px) {
    .footer-container-new {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 24px;
        gap: 40px;
    }

    .footer-left-logo {
        flex: 0 0 auto;
        width: 180px;
    }

    .footer-vertical-divider {
        display: none;
    }

    .footer-center-socials {
        flex-direction: row;
        padding: 20px 0;
    }

    .footer-socials-box {
        flex-direction: row;
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid rgba(138, 43, 226, 0.2);
        padding: 15px 20px;
    }

    .footer-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 40px;
        width: 100%;
        text-align: left;
    }

    .footer-col {
        border-left: none;
        padding: 0;
        align-items: flex-start;
    }

    .footer-col:not(:last-child)::after {
        display: none;
    }

    .footer-new-main-nav, .footer-new-policy-nav, .footer-legal-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-policy-line {
        margin: 0 auto 25px auto;
    }
}

@media (max-width: 600px) {
    .site-footer-new {
        padding: 40px 0 40px 0;
    }
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .footer-col {
        align-items: center;
        text-align: center;
    }
    .footer-legal-row {
        font-size: 0.9rem;
        gap: 8px;
    }
    .copyright {
        font-size: 1.1rem;
    }
    .footer-new-main-nav {
        font-size: 1rem;
        gap: 8px 12px;
        margin-bottom: 24px;
    }
}

/* SITEMAP (Webbkarta) */
a.sitemap-heading {
    color: #000 !important;
    transition: text-decoration 0.2s;
}

a.sitemap-heading:hover {
    text-decoration: underline;
}

span.sitemap-heading {
    color: #000 !important;
    cursor: default;
    pointer-events: none;
}

.external-icon {
    display: inline-block;
    margin-left: 8px;
}


/* =========================================
   HOME PAGE SECTIONS
   ========================================= */

/* Base section — full width */
.home-section {
    width: 100%;
    padding: 40px 0;
}

.home-section--white {
    background-color: var(--helamalmo_white);
}

.home-section--purple {
    background-color: var(--helamalmo_purple);
    color: #ffffff !important;
}

/* Universal Rule: All headings, paragraphs, lists, and text in purple sections are crisp white */
.home-section--purple h1,
.home-section--purple h2,
.home-section--purple h3,
.home-section--purple h4,
.home-section--purple h5,
.home-section--purple h6,
.home-section--purple p,
.home-section--purple span:not(.icon),
.home-section--purple li,
.home-section--purple strong,
.home-section--purple b,
.home-section--purple em,
.home-section--purple i,
.home-section--purple .article-body,
.home-section--purple .article-body * {
    color: #ffffff !important;
}

/* Links in purple sections get soft lavender color with underline (excluding card buttons and card partner email links) */
.home-section--purple a:not(.card-cta-btn):not(.donation-type-btn):not(.top-bar-btn-white):not(.card-partner-email a) {
    color: #e0d0f5 !important;
    text-decoration: underline;
}

/* White card bodies inside purple sections retain dark card text */
.home-section--purple .card .card-title,
.home-section--purple .card .card-partner-title {
    color: #222222 !important;
}

.home-section--purple .card .card-text,
.home-section--purple .card p {
    color: #555555 !important;
}

/* Card expand button icon: purple when closed, white when active */
.card-expand-btn .icon,
.card-expand-btn span.icon,
.home-section--purple .card-expand-btn .icon,
.home-section--purple .card-expand-btn span.icon {
    color: var(--helamalmo_purple) !important;
}

.card-expand-btn.active .icon,
.card-expand-btn.active span.icon,
.home-section--purple .card-expand-btn.active .icon,
.home-section--purple .card-expand-btn.active span.icon {
    color: #ffffff !important;
}

/* Elevator pitch keeps its existing article styling, just add white bg */
.home-elevator-pitch {
    background-color: var(--helamalmo_white);
}

.home-elevator-pitch p:first-of-type,
.home-elevator-pitch h1,
.home-elevator-pitch h2 {
    font-family: var(--font-condensed);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--helamalmo_purple);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 30px 0;
    line-height: 1.1;
    text-align: center !important;
}

.home-elevator-pitch p:not(:first-of-type),
.home-elevator-pitch .article-body p {
    text-align: justify !important;
}

/* Home Page Under Construction Section */
.home-under-construction {
    padding: 50px 20px;
    text-align: center;
}

.home-under-construction-content {
    max-width: 800px;
    margin: 0 auto;
}

.home-under-construction-title {
    font-family: var(--font-condensed);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.home-under-construction-text {
    font-family: var(--font-main);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.home-under-construction-text strong {
    font-weight: 800;
}

.home-section--white.home-under-construction {
    background-color: var(--helamalmo_white);
    color: #222;
}

.home-section--white.home-under-construction .home-under-construction-title {
    color: var(--helamalmo_purple);
}

.home-section--white.home-under-construction .home-under-construction-text {
    color: #222;
}

.home-section--purple.home-under-construction {
    background-color: var(--helamalmo_purple);
    color: #fff;
}

.home-section--purple.home-under-construction .home-under-construction-title,
.home-section--purple.home-under-construction .home-under-construction-text {
    color: #fff;
}

/* Vila (rest) sections — full-width placeholder image */
.home-vila {
    padding: 0;
    line-height: 0;
}

.home-vila-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 300px;
}

/* Card grid inside purple sections: white card text stays readable */

/* The End / Footer CTA */
.home-the-end {
    text-align: left;
    padding: 60px 40px;
}

.home-the-end-content {
    max-width: var(--max_width_center);
    margin: 0 auto;
}

.home-the-end-label {
    font-family: var(--font-condensed);
    font-size: 2rem;
    font-weight: 900;
    color: var(--helamalmo_purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 20px 0;
}

.home-section--purple .home-the-end-label {
    color: var(--helamalmo_white);
}

.home-the-end-text {
    font-family: var(--font-main);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #222;
    margin: 0;
}

.home-section--purple .home-the-end-text {
    color: var(--helamalmo_white);
}

.home-section--white .home-the-end-label {
    color: var(--helamalmo_purple);
}

.home-section--white .home-the-end-text {
    color: #222;
}

/* Under Construction Notice */
.home-under-construction {
    text-align: center;
    padding: 60px 40px;
}

.home-under-construction-content {
    max-width: var(--max_width_center);
    margin: 0 auto;
}

.home-under-construction-title {
    font-family: var(--font-condensed);
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--helamalmo_white);
    margin: 0 0 20px 0;
}

.home-under-construction-text {
    font-family: var(--font-main);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--helamalmo_white);
    opacity: 0.9;
    margin: 0 0 15px 0;
}

/* Partners Logo Carousel */
.home-partners-logos {
    padding: 50px 0;
    overflow: hidden;
    position: relative;
}

.partners-logos-track {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: scrollLogos 80s linear infinite;
    width: max-content;
}

.partners-logo-img {
    height: 80px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: opacity 0.3s, filter 0.3s;
    flex-shrink: 0;
}

.partners-logo-img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Home Page Layout Stability */
.home-page-container {
    padding-top: 0; /* Hero starts at top */
}

/* Pre-emptive Hero Breakout (prevents jump during load) */
.home-page-container .hero:first-child,
.home-hero-full {
    width: 100%;
    position: relative;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    height: calc(88vh - 100px) !important;
    background-position: top center !important;
    background-color: var(--helamalmo_purple); /* Placeholder while image loads */
}

@media (max-width: 768px) {
    .home-page-container .hero:first-child,
    .home-hero-full {
        height: 320px !important;
    }
}

@media (max-width: 600px) {
    .home-the-end {
        padding: 50px 20px;
    }

    .home-the-end-label {
        font-size: 2rem;
    }

    .home-the-end-text {
        font-size: 1rem;
    }
}

/* CARD GRAYSCALE HOVER EFFECT FOR TEST PAGE */
.card-grid--test-hover .card-image {
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(0%);
}

.card-grid--test-hover .card:hover .card-image {
    filter: grayscale(100%);
    transform: scale(1.05);
}

/* ARTICLE BODY RICH TEXT STYLING (headings & bullet points) */
.article-body h2 {
    font-size: 2rem;
    font-family: var(--font-condensed);
    font-weight: 800;
    color: var(--helamalmo_purple);
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.article-body h3 {
    font-size: 1.6rem;
    font-family: var(--font-condensed);
    font-weight: 800;
    color: var(--helamalmo_purple);
    margin-top: 25px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.article-body h4 {
    font-size: 1.3rem;
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--helamalmo_purple);
    margin-top: 20px;
    margin-bottom: 10px;
}

.article-body ul {
    margin-left: 25px;
    margin-bottom: 20px;
    list-style-type: disc;
}

.article-body li {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.7;
    color: #222;
}

@media (max-width: 768px) {
    .article-body h2 {
        font-size: 1.5rem;
        margin-top: 20px;
    }
    .article-body h3 {
        font-size: 1.25rem;
        margin-top: 16px;
    }
    .article-body h4 {
        font-size: 1.1rem;
    }
    .article-body ul {
        margin-left: 18px;
    }
    .article-body li {
        font-size: 1rem;
    }
}

/* Full-width Home Hero Breakout */
.hero.home-hero-full,
.home-hero-full {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    height: calc(88vh - 100px) !important;
    background-position: top center !important;
    background-size: cover !important;
}
