/**
 * SnowMania.ro — Modern Alpine Header Styles
 * Prefix: snowmania-header-
 * Author: Designtoro (https://designtoro.ro)
 */

:root {
    --smh-primary: #2196F3;
    --smh-primary-hover: #1976D2;
    --smh-primary-light: #EFF6FF;
    --smh-primary-border: #BFDBFE;
    --smh-navy: #152238;
    --smh-white: #FFFFFF;
    --smh-secondary: #64748B;
    --smh-muted: #94A3B8;
    --smh-border: #E2E8F0;
    --smh-bg-light: #F8FAFC;
    --smh-radius-btn: 10px;
    --smh-radius-sm: 8px;
    --smh-shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
    --smh-shadow-scrolled: 0 4px 20px -2px rgba(21, 34, 56, 0.08);
    --smh-shadow-btn: 0 2px 8px rgba(33, 150, 243, 0.25);
    --smh-shadow-btn-hover: 0 4px 14px rgba(33, 150, 243, 0.35);
    --smh-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --smh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Global override so #0f97aa is never used anywhere */
    --e-global-color-accent: #2196F3 !important;
    --e-global-color-primary: #2196F3 !important;
}

/* Smooth anchor scrolling offset */
html {
    scroll-padding-top: 88px;
}

/* ==========================================================================
   1. MAIN HEADER CONTAINER
   ========================================================================== */

.snowmania-header {
    width: 100%;
    background-color: var(--smh-white);
    border-bottom: 1px solid var(--smh-border);
    box-shadow: var(--smh-shadow-subtle);
    font-family: var(--smh-font);
    color: var(--smh-navy);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    transition: height 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.snowmania-header *,
.snowmania-header *::before,
.snowmania-header *::after {
    box-sizing: border-box;
}

/* Sticky Header Behavior */
.snowmania-header--sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .snowmania-header--sticky {
    top: 32px;
}

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

@media screen and (max-width: 600px) {
    body.admin-bar .snowmania-header--sticky {
        top: 0;
    }
}

/* Scrolled Compact State */
.snowmania-header--scrolled {
    box-shadow: var(--smh-shadow-scrolled);
    border-bottom-color: var(--smh-border);
}

.snowmania-header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    transition: height 0.25s ease;
}

.snowmania-header--scrolled .snowmania-header-container {
    height: 68px;
}

/* ==========================================================================
   2. BRANDING (Left)
   ========================================================================== */

.snowmania-header-branding {
    display: flex;
    align-items: center;
    justify-self: start;
    flex-shrink: 0;
}

.snowmania-header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.snowmania-header-logo-img {
    height: 48px;
    width: auto;
    max-height: 48px;
    object-fit: contain;
    display: block;
    transition: height 0.25s ease, transform 0.2s ease;
}

.snowmania-header--scrolled .snowmania-header-logo-img {
    height: 42px;
}

.snowmania-header-logo-link:hover .snowmania-header-logo-img {
    transform: scale(1.02);
}

/* ==========================================================================
   3. DESKTOP NAVIGATION (Center)
   ========================================================================== */

.snowmania-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

.snowmania-header-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.snowmania-header-menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.snowmania-header-menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--smh-navy);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--smh-radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

/* Underline indicator on hover */
.snowmania-header-menu-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background-color: var(--smh-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.snowmania-header-menu-link:hover {
    color: var(--smh-primary);
    background-color: rgba(33, 150, 243, 0.04);
}

.snowmania-header-menu-link:hover::after {
    transform: scaleX(1);
}

/* Active State */
.snowmania-header-menu-item--active > .snowmania-header-menu-link,
.snowmania-header-menu-item.current-menu-item > .snowmania-header-menu-link {
    color: var(--smh-primary);
}

.snowmania-header-menu-item--active > .snowmania-header-menu-link::after,
.snowmania-header-menu-item.current-menu-item > .snowmania-header-menu-link::after {
    transform: scaleX(1);
    background-color: var(--smh-primary);
}

/* ==========================================================================
   4. CONVERSION ACTIONS (Right Desktop)
   ========================================================================== */

.snowmania-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 16px;
    flex-shrink: 0;
}

/* Phone Link */
.snowmania-header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--smh-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--smh-radius-sm);
    transition: var(--smh-transition);
    white-space: nowrap;
}

.snowmania-header-phone svg {
    color: var(--smh-primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.snowmania-header-phone:hover {
    color: var(--smh-primary);
    background-color: var(--smh-bg-light);
}

.snowmania-header-phone:hover svg {
    transform: rotate(8deg) scale(1.08);
}

/* CTA Button */
.snowmania-header-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--smh-primary);
    color: var(--smh-white) !important;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1;
    padding: 11px 22px;
    border-radius: var(--smh-radius-btn);
    text-decoration: none;
    box-shadow: var(--smh-shadow-btn);
    transition: var(--smh-transition);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.snowmania-header-btn-cta svg {
    flex-shrink: 0;
    color: var(--smh-white);
}

.snowmania-header-btn-cta:hover {
    background-color: var(--smh-primary-hover);
    box-shadow: var(--smh-shadow-btn-hover);
    transform: translateY(-1px);
    color: var(--smh-white) !important;
}

.snowmania-header-btn-cta:active {
    transform: translateY(0);
    box-shadow: var(--smh-shadow-btn);
}

.snowmania-header-btn-cta--full {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
}

/* ==========================================================================
   5. MOBILE CONTROLS & HAMBURGER
   ========================================================================== */

.snowmania-header-mobile-controls {
    display: none;
    align-items: center;
    gap: 12px;
}

.snowmania-header-mobile-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--smh-bg-light);
    color: var(--smh-primary);
    border: 1px solid var(--smh-border);
    text-decoration: none;
    transition: var(--smh-transition);
}

.snowmania-header-mobile-phone:hover {
    background-color: var(--smh-primary-light);
    border-color: var(--smh-primary-border);
}

/* Hamburger Toggle Button */
.snowmania-header-hamburger,
.snowmania-header button.snowmania-header-hamburger,
button.snowmania-header-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background-color: var(--smh-primary) !important;
    border: 1px solid var(--smh-primary) !important;
    border-radius: var(--smh-radius-sm) !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: var(--smh-transition);
}

.snowmania-header-hamburger:hover,
button.snowmania-header-hamburger:hover {
    background-color: var(--smh-primary-hover) !important;
    border-color: var(--smh-primary-hover) !important;
}

.snowmania-header-hamburger-icon {
    display: block;
    width: 22px;
    height: 22px;
    color: #FFFFFF !important;
}

.snowmania-header-hamburger-icon line,
.snowmania-header-hamburger svg line,
.snowmania-header button.snowmania-header-hamburger svg line,
button.snowmania-header-hamburger svg line {
    stroke: #FFFFFF !important;
}

/* ==========================================================================
   6. MOBILE DRAWER / OFFCANVAS
   ========================================================================== */

.snowmania-header-drawer {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.snowmania-header-drawer.snowmania-header-drawer--open,
.snowmania-header-drawer.snowmania-header-drawer--animating {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.snowmania-header-drawer-backdrop {
    display: none !important;
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0 !important;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.snowmania-header-drawer--open .snowmania-header-drawer-backdrop,
.snowmania-header-drawer--animating .snowmania-header-drawer-backdrop {
    display: block !important;
    opacity: 1 !important;
}

.snowmania-header-drawer-content {
    display: none !important;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    background-color: var(--smh-white);
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.snowmania-header-drawer--open .snowmania-header-drawer-content,
.snowmania-header-drawer--animating .snowmania-header-drawer-content {
    display: flex !important;
    transform: translateX(0) !important;
}

@media screen and (min-width: 1025px) {
    .snowmania-header-drawer {
        display: none !important;
    }
}

/* Drawer Header */
.snowmania-header-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--smh-border);
}

.snowmania-header-drawer-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.snowmania-header-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--smh-bg-light);
    border: 1px solid var(--smh-border);
    border-radius: var(--smh-radius-sm);
    color: var(--smh-navy);
    cursor: pointer;
    transition: var(--smh-transition);
}

.snowmania-header-drawer-close:hover {
    background-color: var(--smh-primary-light);
    color: var(--smh-primary);
    border-color: var(--smh-primary-border);
}

/* Drawer Body */
.snowmania-header-drawer-body {
    flex: 1 1 auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.snowmania-header-drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.snowmania-header-drawer-item {
    margin: 0;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid #F1F5F9;
}

.snowmania-header-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 8px;
    color: var(--smh-navy);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--smh-radius-sm);
    transition: var(--smh-transition);
}

.snowmania-header-drawer-link svg {
    color: var(--smh-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.snowmania-header-drawer-link:hover {
    color: var(--smh-primary);
    background-color: var(--smh-bg-light);
    padding-left: 12px;
}

.snowmania-header-drawer-link:hover svg {
    color: var(--smh-primary);
    transform: translateX(3px);
}

.snowmania-header-drawer-item--active > .snowmania-header-drawer-link {
    color: var(--smh-primary);
    background-color: var(--smh-primary-light);
    border-left: 3px solid var(--smh-primary);
    padding-left: 12px;
}

.snowmania-header-drawer-item--active > .snowmania-header-drawer-link svg {
    color: var(--smh-primary);
}

/* Drawer CTA & Phone */
.snowmania-header-drawer-cta-wrap {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.snowmania-header-drawer-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background-color: var(--smh-bg-light);
    border: 1px solid var(--smh-border);
    border-radius: var(--smh-radius-btn);
    text-decoration: none;
    transition: var(--smh-transition);
}

.snowmania-header-drawer-phone:hover {
    border-color: var(--smh-primary-border);
    background-color: var(--smh-primary-light);
}

.snowmania-header-drawer-phone-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--smh-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--smh-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.snowmania-header-drawer-phone-info {
    display: flex;
    flex-direction: column;
}

.snowmania-header-drawer-phone-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--smh-muted);
    letter-spacing: 0.5px;
}

.snowmania-header-drawer-phone-num {
    font-size: 15px;
    font-weight: 700;
    color: var(--smh-navy);
}

/* Drawer Footer (Socials) */
.snowmania-header-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--smh-border);
    background-color: var(--smh-bg-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.snowmania-header-drawer-social-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--smh-secondary);
}

.snowmania-header-drawer-social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.snowmania-header-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--smh-white);
    border: 1px solid var(--smh-border);
    color: var(--smh-navy);
    text-decoration: none;
    transition: var(--smh-transition);
}

.snowmania-header-social-link:hover {
    color: var(--smh-primary);
    border-color: var(--smh-primary);
    background-color: var(--smh-primary-light);
    transform: translateY(-2px);
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .snowmania-header-nav {
        display: none;
    }

    .snowmania-header-actions {
        display: none;
    }

    .snowmania-header-mobile-controls {
        display: flex;
    }

    .snowmania-header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
        height: 72px;
    }

    .snowmania-header--scrolled .snowmania-header-container {
        height: 64px;
    }
}

@media screen and (max-width: 480px) {
    .snowmania-header-logo-img {
        height: 40px;
    }

    .snowmania-header--scrolled .snowmania-header-logo-img {
        height: 36px;
    }

    .snowmania-header-drawer-content {
        max-width: 100%;
    }
}

/* ==========================================================================
   8. ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */

.snowmania-header a:focus-visible,
.snowmania-header button:focus-visible {
    outline: 2px solid var(--smh-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .snowmania-header,
    .snowmania-header *,
    .snowmania-header *::before,
    .snowmania-header *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
