/* =============================================
   MIKA All — Global CSS
   ============================================= */

:root {
    --mk-charcoal:  #3D3D3D;
    --mk-mid:       #6D6E71;
    --mk-lime:      #A8D940;
    --mk-forest:    #8DC11E;
    --mk-fog:       #F2F5F0;
    --mk-dark:      #1a1a1a;
    --mk-white:     #FFFFFF;
    --mk-nav-h:     70px;
    --mk-radius:    3px;
    --mk-trans:     0.25s ease;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Lato', sans-serif;
    color: var(--mk-charcoal);
    background: var(--mk-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Compensazione nav fissa */
body { padding-top: var(--mk-nav-h); }
body.admin-bar { padding-top: calc(32px + var(--mk-nav-h)); }
@media screen and (max-width: 782px) {
    body.admin-bar { padding-top: calc(46px + var(--mk-nav-h)); }
}

/* ── Header / Nav ──────────────────────────── */
.mk-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--mk-nav-h);
    z-index: 9999;
    background: rgba(34, 36, 44, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--mk-lime);
    transition: background var(--mk-trans);
}
.mk-header.scrolled { background: rgba(28, 30, 38, 1); }

.mk-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 5%;
    gap: 24px;
}

/* Logo */
.mk-logo { display: flex; align-items: center; text-decoration: none; }
.mk-logo img { height: 40px; width: auto; }
.mk-logo__text {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--mk-white);
    letter-spacing: 5px;
    text-transform: uppercase;
}
.mk-logo__text span { color: var(--mk-lime); }

/* Menu */
.mk-nav { margin-left: auto; }
.mk-nav__list {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center;
}
.mk-nav__list a {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    transition: color var(--mk-trans);
}
.mk-nav__list a:hover,
.mk-nav__list .current-menu-item > a { color: var(--mk-lime); }

/* CTA header */
.mk-btn--cta {
    font-family: 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--mk-lime);
    color: var(--mk-charcoal);
    padding: 10px 20px;
    border-radius: var(--mk-radius);
    white-space: nowrap;
    transition: background var(--mk-trans), color var(--mk-trans);
}
.mk-btn--cta:hover { background: var(--mk-forest); color: var(--mk-white); }

/* Hamburger */
.mk-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.mk-hamburger span {
    display: block;
    height: 2px;
    background: var(--mk-white);
    border-radius: 2px;
    transition: transform var(--mk-trans), opacity var(--mk-trans);
}
.mk-hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mk-hamburger.active span:nth-child(2) { opacity: 0; }
.mk-hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Logo custom (WordPress the_custom_logo) */
.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.custom-logo-link img,
.custom-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* ── Admin bar compensation (utente loggato) ── */
.admin-bar .mk-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .mk-header { top: 46px; }
    .admin-bar .mk-nav   { top: calc(46px + var(--mk-nav-h)); }
}

/* Mobile menu */
@media (max-width: 900px) {
    /* Header inner: logo a sx, hamburger a dx */
    .mk-header__inner { padding: 0 4%; gap: 12px; }

    /* Hamburger visibile */
    .mk-hamburger { display: flex; }

    /* Nav nascosto di default, appare solo con .open */
    .mk-nav {
        display: none;
        position: fixed;
        top: var(--mk-nav-h);
        left: 0; right: 0;
        z-index: 9998;
        background: var(--mk-dark);
        padding: 28px 5%;
        border-bottom: 3px solid var(--mk-lime);
        margin-left: 0;
        max-height: calc(100vh - var(--mk-nav-h));
        overflow-y: auto;
    }
    .mk-nav.open { display: block; }
    .mk-nav__list { flex-direction: column; align-items: flex-start; gap: 20px; }
    .mk-nav__list a { font-size: 15px; padding: 6px 0; display: block; color: rgba(255,255,255,0.8); }
    .mk-nav__list a:hover { color: var(--mk-lime); }

    /* CTA nascosto nell'header mobile (visibile nel menu aperto se serve) */
    .mk-btn--cta { display: none; }

    /* Logo più compatto */
    .custom-logo-link img,
    .custom-logo { height: 34px; }
    .mk-logo__text { font-size: 17px; letter-spacing: 3px; }
}

/* Fix nav top con admin-bar su mobile */
@media screen and (max-width: 782px) {
    .admin-bar .mk-nav { top: calc(46px + var(--mk-nav-h)); }
}

/* ── Main content ───────────────────────────── */
.mk-main {
    min-height: 60vh;
}

/* Elementor: rimuovi padding-top dal main quando Elementor gestisce la pagina */
.elementor-page .mk-main { min-height: unset; }

/* ── Footer ─────────────────────────────────── */
.mk-footer {
    background: var(--mk-dark);
    color: var(--mk-white);
    font-family: 'Lato', sans-serif;
}
.mk-footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding: 60px 5%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mk-footer__brand .mk-logo__text { font-size: 18px; }
.mk-footer__brand p {
    margin-top: 16px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}
.mk-footer__links strong {
    font-family: 'Raleway', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mk-lime);
    display: block;
    margin-bottom: 16px;
}
.mk-footer__links ul { list-style: none; padding: 0; }
.mk-footer__links li + li { margin-top: 10px; }
.mk-footer__links a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    transition: color var(--mk-trans);
}
.mk-footer__links a:hover { color: var(--mk-lime); }

.mk-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 5%;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    flex-wrap: wrap;
    gap: 12px;
}
.mk-footer__legal { display: flex; gap: 24px; }
.mk-footer__legal a { color: rgba(255,255,255,0.3); transition: color var(--mk-trans); }
.mk-footer__legal a:hover { color: var(--mk-lime); }

.mk-footer__contact {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mk-footer__contact a,
.mk-footer__contact span {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    transition: color var(--mk-trans);
}
.mk-footer__contact a:hover { color: var(--mk-lime); }

/* Logo nel footer */
.mk-footer__brand .custom-logo-link img,
.mk-footer__brand .custom-logo {
    height: 36px;
    width: auto;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
    .mk-footer__top { grid-template-columns: 1fr; gap: 32px; padding: 40px 5%; }
    .mk-footer__bottom { flex-direction: column; text-align: center; }
}

/* ── Elementor overrides ─────────────────────── */

/* Permetti sezioni full-width */
.elementor-section.elementor-section-stretched { left: 0 !important; width: 100% !important; }

/* Non bloccare larghezze Elementor */
.elementor-section-boxed > .elementor-container { max-width: 1200px; }

/* Rimuovi margini extra su pagine Elementor */
.elementor-page .mk-main > .elementor { margin: 0; }

/* Video background Elementor */
.elementor-background-video-container { z-index: 0; }
.elementor-background-overlay { z-index: 1; }
.elementor-widget-wrap { position: relative; z-index: 2; }

/* Evita conflitti con il nav fisso */
.elementor-sticky--active { z-index: 9998 !important; }

/* Pulsanti Elementor — colori brand */
.elementor-button.elementor-button-link {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ── Utility globali (usabili in Elementor CSS class) ── */
.mk-section-label {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--mk-forest);
    display: block;
    margin-bottom: 12px;
}
.mk-divider-lime {
    width: 60px;
    height: 3px;
    background: var(--mk-lime);
    margin: 16px 0;
}
.mk-text-lime { color: var(--mk-lime); }
.mk-text-white { color: var(--mk-white); }
.mk-text-charcoal { color: var(--mk-charcoal); }
.mk-bg-dark { background-color: var(--mk-dark); }
.mk-bg-charcoal { background-color: var(--mk-charcoal); }
.mk-bg-fog { background-color: var(--mk-fog); }
.mk-bg-lime { background-color: var(--mk-lime); }
