﻿:root {
    --handola-bg: #faf9f5;
    --handola-card: #ffffff;
    --handola-ink: #1f2937;
    --handola-muted: #6b7280;
    --handola-border: rgba(31, 41, 55, .10);
    --handola-accent: #f1f8f4;
    --handola-accent-2: #5E7E69;
    --handola-accent-3: #4F6F5B;
    --handola-shadow: 0 10px 30px rgba(0,0,0,.08);
    --sidebar-background-light-blue: #C0DEED;
    --sidebar-background-soft-warm: #f3ebe1;
    --sidebar-background-light-beige: #f5f2ec;
    --sidebar-background-light-green: #e3f3e1;
    --brand-primary: #1a73e8;
    --brand-secondary: #fbbc05;
    --button-background-subdued-green-brown: #6b705c;
    --separator-light-grey: #ddd;
    --white: #fff;
    --gray-100: #f5f5f5;
    --gray-900: #212121;
    --mobile-topbar-height: 48px;
}

@supports (height: 100svh) {
    :root {
        --app-height: 100svh;
    }
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: var(--white);
}

html,
body,
#app,
.app-root {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

.app-container {
    display: flex;
    height: 100dvh;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

    .app-container > .main-content {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 1rem;
        box-sizing: border-box;
        min-height: 100vh;
        background-size: cover;
        border-radius: 1rem;
        overflow: hidden;
        z-index: 1;
    }

.main-content.scrollable {
    background-color: white;
    overflow-y: auto;
    border-bottom-left-radius: 0;
}

.main-content.home-bg {
    position: relative;
    box-sizing: border-box;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .main-content.home-bg .bg-slide {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        z-index: 0;
    }

        .main-content.home-bg .bg-slide.active {
            opacity: 1;
            z-index: 1;
        }

    .main-content.home-bg .hero-content {
        position: relative;
        z-index: 2;
    }

    .main-content.home-bg img {
        transform: none !important;
    }

/* Sidebar - desktop/base */

.sidebar-main {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar {
    width: 280px;
    top: 0;
    left: 0;
    padding: 24px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100dvh;
    border-radius: 2rem;
    scrollbar-gutter: stable both-edges;
}

.app-container > .sidebar {
    flex: 0 0 280px;
    max-width: 280px;
    border-radius: 1rem;
}

.sidebar.general {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100dvh;
    background: var(--sidebar-background-light-green);
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    padding-left: 2rem;
    padding-top: 1rem;
    padding-bottom: 0;
    padding-right: 2rem;
    z-index: 1;
    overflow-y: auto;
    border-radius: 1rem;
}

.sidebar-loggo {
    margin-bottom: 0.5rem;
    margin-left: 30px;
    width: 180px;
    height: 180px;
    border-radius: 1rem;
}

.sidebar-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    margin-left: 10px;
    color: #333;
}

.sidebar-subtitle {
    font-size: 0.95rem;
    margin-bottom: 0;
    margin-left: 10px;
    color: #666;
}

.sidebar-about_us-button {
    display: block;
    width: 180px;
    margin-left: 30px;
    padding: 0.3rem 0.75rem;
    text-align: center;
    background-color: var(--white);
    color: var(--sidebar-background);
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .sidebar-about_us-button:hover {
        background-color: #5a5b50;
    }

.sidebar-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 16px;
    margin-right: -40px;
    margin-left: -24px;
    box-sizing: content-box;
    scrollbar-gutter: stable;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

    .sidebar-section h2 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: #444;
    }

.sidebar-item {
    display: flex;
    align-items: center;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
}

    .sidebar-item:hover {
        background-color: rgba(0,0,0,0.05);
    }

.sidebar-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
}

.sidebar-item-content {
    display: flex;
    flex-direction: column;
}

.sidebar-text {
    font-size: 1rem;
    color: #333;
}

.sidebar-item-desc {
    font-size: 0.875rem;
    color: #888;
    margin-top: 0.25rem;
    margin-left: 0;
}

.sidebar-footer {
    flex: 0 0 auto;
    padding: 0 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-sizing: border-box;
    margin-right: -30px;
    margin-left: -36px;
}

.sidebar-separator {
    width: 100%;
    height: 1px;
    background-color: var(--white);
    margin: 1rem 0;
}

/* Visitor card */

.visitor-avatar {
    flex: 0 0 auto;
}

.visitor-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.visitor-action {
    margin-left: auto;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.visitor-name {
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

.visitor-role {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
}

/* Buttons */

.login-button:hover {
    background-color: #5a5b50;
}

/* Mobile hamburger */

.mobile-hamburger {
    display: none;
}

.btn-hamburger {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile overlay/menu base */

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
    overscroll-behavior: contain;
}
@media (max-width: 768px) {
    html.nav-open,
    body.nav-open {
        overflow: hidden;
        height: 100%;
    }
}

.sidebar.mobile {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column;
    background: var(--sidebar-background-light-green) !important;
    z-index: 7001 !important;
    transform: translateX(-100%) !important;
    visibility: hidden;
    pointer-events: none;
    transition: transform .25s ease-out, visibility .25s ease-out;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-top: calc(env(safe-area-inset-top) + 1rem) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    text-align: center;
    box-sizing: border-box !important;
    scrollbar-gutter: auto !important;
}

    .sidebar.mobile.is-open {
        transform: translateX(0) !important;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar.mobile .scroll-area {
        flex: 1 1 auto;       
        -webkit-overflow-scrolling: touch;        
        overflow-x: hidden;
    }

    .sidebar.mobile .header {
        margin-bottom: .5rem;
    }

    .sidebar.mobile .sidebar-body {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        overflow-x: hidden;
    }

    .sidebar.mobile .footer {
        position: sticky;
        bottom: 0;
        background: var(--sidebar-background-light-green);
        box-shadow: 0 -1px 0 rgba(0,0,0,0.08);
        padding: 0.5rem 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

/* Modal handling */

.modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1055 !important;
}

.modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1050 !important;
}

.local-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1040;
}

body.local-modal-open {
    overflow: hidden;
}

/* Desktop/mobile visibility */

@media (min-width: 769px) {
    .sidebar.hide-on-mobile,
    .hide-on-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .sidebar.mobile {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column;
        background: var(--sidebar-background-light-green) !important;
        z-index: 7001 !important;
        transform: translateX(0) !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding-top: calc(env(safe-area-inset-top) + 1rem) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
        overflow: hidden !important;
        text-align: center;
        box-sizing: border-box !important;
        scrollbar-gutter: auto !important;
    }

    .sidebar.mobile .sidebar-body {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 !important;
        padding: 0 0 1rem 0 !important;
        box-sizing: border-box !important;
        scrollbar-gutter: auto !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .sidebar.mobile .scroll-area {
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .sidebar.mobile .sidebar-title,
    .sidebar.mobile .sidebar-subtitle,
    .sidebar.mobile .sidebar-section,
    .sidebar.mobile .sidebar-footer {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }

    .sidebar.mobile .sidebar-loggo,
    .sidebar.mobile .sidebar-about_us-button {
        margin-left: auto;
        margin-right: auto;
    }

    .sidebar.mobile .sidebar-footer {
        flex: 0 0 auto;
        margin: 0 !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0 !important;
        border-top: 1px solid rgba(31,41,55,.08);
        background: var(--sidebar-background-light-green);
        text-align: center;
    }

    .sidebar.mobile .sidebar-item {
        display: grid !important;
        grid-template-columns: 32px minmax(0, 1fr) 32px !important;
        align-items: center !important;
        column-gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 0.5rem 0 !important;
        position: relative;
    }

    .sidebar.mobile .sidebar-icon {
        grid-column: 1 !important;
        justify-self: center !important;
        width: 24px;
        height: 24px;
        margin: 0 !important;
    }

    .sidebar.mobile .sidebar-item-content {
        grid-column: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        min-width: 0 !important;
    }

    .sidebar.mobile .sidebar-item::after {
        content: "";
        grid-column: 3;
        width: 32px;
        height: 1px;
    }

    .sidebar.mobile .sidebar-text,
    .sidebar.mobile .sidebar-item-desc {
        display: block;
        text-align: center !important;
        overflow-wrap: anywhere;
    }

    .sidebar.mobile,
    .sidebar.mobile .sidebar-body,
    .sidebar.mobile .scroll-area {
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* old Edge/IE */
    }

    .sidebar.mobile::-webkit-scrollbar,
    .sidebar.mobile .sidebar-body::-webkit-scrollbar,
    .sidebar.mobile .scroll-area::-webkit-scrollbar {
        display: none !important; /* Chrome, Safari */
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }
}

@media (max-width: 768px) {
    html,
    body,
    #app,
    .app-root {
        width: 100%;
        height: var(--app-height);
        min-height: var(--app-height);
        max-height: var(--app-height);
        margin: 0;
        padding: 0;
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body {
        position: fixed;
        inset: 0;
        width: 100%;
        background: var(--white);
        touch-action: pan-y;
    }

    .app-container {
        position: fixed !important;
        inset: 0 !important;
        display: block !important;
        width: 100vw !important;
        height: var(--app-height) !important;
        max-height: var(--app-height) !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        .app-container > .sidebar:not(.mobile),
        .sidebar.general:not(.mobile),
        .sidebar.general.desktop-sidebar,
        .sidebar.hide-on-mobile:not(.mobile),
        .hide-on-mobile {
            display: none !important;
        }

    .mobile-hamburger {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 6000 !important;
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        height: var(--mobile-topbar-total);
        padding: env(safe-area-inset-top) 1rem 0 1rem;
        box-sizing: border-box;
        background: var(--sidebar-background-light-green);
    }

    .app-container > .main-content,
    .main-content,
    .main-content.scrollable,
    .main-content.home-bg {
        position: fixed !important;
        top: var(--mobile-topbar-total) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        border-radius: 0 !important;
        z-index: 1 !important;
        background: white;
    }

        .main-content.scrollable {
            overflow: hidden !important;
        }

    .app-container.mobile-nav-open > .main-content,
    .app-container.mobile-nav-open > .mobile-hamburger {
        display: none !important;
    }

    .app-container.mobile-nav-open {
        overflow: hidden !important;
    }
}
@media (min-width: 769px) {
    html,
    body,
    #app,
    .app-root {
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

        html.nav-open,
        body.nav-open {
            overflow-y: auto !important;
            height: 100% !important;
        }

    .app-container {
        display: flex !important;
        height: 100dvh !important;
        width: 100% !important;
        overflow: hidden !important;
    }

        .app-container > .main-content,
        .main-content,
        .main-content.scrollable,
        .main-content.home-bg {
            flex: 1 1 auto !important;
            width: auto !important;
            height: auto !important;
            min-height: 100vh !important;
            margin: 0 !important;
            padding: 1rem !important;
            overflow: hidden;
        }

            .main-content.scrollable {
                overflow-y: auto !important;
            }

    .mobile-hamburger,
    .mobile-overlay,
    .sidebar.mobile {
        display: none !important;
    }

    .app-container > .sidebar,
    .sidebar.general,
    .sidebar.general.desktop-sidebar,
    .sidebar.hide-on-mobile {
        display: flex !important;
    }

    .hide-on-mobile {
        display: block !important;
    }

    .app-container.mobile-nav-open > .main-content,
    .app-container.mobile-nav-open > .mobile-hamburger {
        display: flex !important;
    }
}