/* Reset base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; }

/* === Template Structure (Base Styles) === */
/**
 * ============================================================================
 * Template Maker - Template Structure CSS
 * ============================================================================
 * 
 * Stili per la struttura fissa Header/Body/Footer
 * 
 * @version 2.0.0
 * ============================================================================
 */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
    --tm-container-width: 1200px;
    --tm-container-padding: 20px;
}

/* ============================================================================
   TEMPLATE WRAPPER
   ============================================================================ */

.tm-template {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.tm-header {
    width: 100%;
    min-height: 60px;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

/* ============================================================================
   BODY
   ============================================================================ */

.tm-body {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.tm-body-content {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.tm-footer {
    width: 100%;
    min-height: 60px;
    flex-shrink: 0;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

/* ============================================================================
   SECTION
   ============================================================================ */

.tm-section {
    width: 100%;
    box-sizing: border-box;
}

/* Section Full Width */
.tm-section.tm-full {
    width: 100%;
    max-width: none;
}

/* Section Boxed */
.tm-section.tm-boxed {
    max-width: var(--tm-container-width);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   LAYOUT VARIANTS - BOXED
   ============================================================================ */

.tm-header.tm-boxed .tm-header-content,
.tm-footer.tm-boxed .tm-footer-content {
    max-width: var(--tm-container-width);
    margin: 0 auto;
}

/* ============================================================================
   EDITOR ONLY - Zone indicators
   ============================================================================ */

.gjs-editor-cont .tm-header:hover,
.gjs-editor-cont .tm-footer:hover {
    outline: 2px dashed rgba(156, 163, 175, 0.5);
    outline-offset: -2px;
}

.gjs-editor-cont .tm-body-content:hover {
    outline: 2px dashed rgba(34, 197, 94, 0.3);
    outline-offset: -2px;
}

.gjs-editor-cont .tm-section:hover {
    outline: 2px dashed rgba(245, 158, 11, 0.5);
    outline-offset: -2px;
}

.gjs-editor-cont .tm-section.gjs-selected {
    outline: 2px solid #f59e0b;
    outline-offset: -2px;
}


/* === Menu Styles === */
/**
 * ============================================================================
 * Template Maker - Menu Styles
 * ============================================================================
 * 
 * Stili per i 3 tipi di menu:
 * 1. Standard - Menu orizzontale classico
 * 2. Canvas - Menu off-canvas (hamburger)
 * 3. Mega - Dropdown multi-colonna
 * 
 * @version 1.0.0
 * ============================================================================
 */

/* ============================================================================
   RESET & BASE
   ============================================================================ */

.tm-menu,
.tm-menu * {
    box-sizing: border-box;
}

.tm-menu {
    --menu-bg: #ffffff;
    --menu-text: #374151;
    --menu-text-hover: #111827;
    --menu-accent: #3b82f6;
    --menu-border: #e5e7eb;
    --menu-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --menu-radius: 8px;
    --menu-transition: all 0.2s ease;
}

.tm-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Menu vuoto - min-height per visibilità durante editing */
.tm-menu:has(.menu-nav:empty) {
    min-height: 50px;
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-menu:has(.menu-nav:empty)::after {
    content: 'Menu vuoto - Doppio click per configurare';
    color: rgba(139, 92, 246, 0.6);
    font-size: 12px;
}

.tm-menu a {
    text-decoration: none;
    color: inherit;
    transition: var(--menu-transition);
}

/* ============================================================================
   1. STANDARD MENU - Orizzontale Classico
   ============================================================================ */

.tm-menu-standard {
    background: var(--menu-bg);
    border-bottom: 1px solid var(--menu-border);
}

.tm-menu-standard .menu-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.tm-menu-standard .menu-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--menu-text-hover);
}

.tm-menu-standard .menu-logo img {
    height: 40px;
    width: auto;
}

.tm-menu-standard .menu-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tm-menu-standard .menu-nav > li {
    position: relative;
}

.tm-menu-standard .menu-nav > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
}

.tm-menu-standard .menu-nav > li > a:hover,
.tm-menu-standard .menu-nav > li > a.active {
    color: var(--menu-accent);
    background: rgba(59, 130, 246, 0.1);
}

/* Dropdown Standard */
.tm-menu-standard .menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--menu-bg);
    border: 1px solid var(--menu-border);
    border-radius: var(--menu-radius);
    box-shadow: var(--menu-shadow);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--menu-transition);
    z-index: 100;
}

.tm-menu-standard .menu-nav > li:hover .menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tm-menu-standard .menu-dropdown a {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--menu-text);
    border-radius: calc(var(--menu-radius) - 2px);
}

.tm-menu-standard .menu-dropdown a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--menu-accent);
}

/* Dropdown Arrow */
.tm-menu-standard .has-dropdown > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: var(--menu-transition);
}

.tm-menu-standard .has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

/* Menu Actions (CTA buttons) */
.tm-menu-standard .menu-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tm-menu-standard .menu-btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: var(--menu-radius);
    transition: var(--menu-transition);
}

.tm-menu-standard .menu-btn-outline {
    border: 1px solid var(--menu-border);
    color: var(--menu-text);
}

.tm-menu-standard .menu-btn-outline:hover {
    border-color: var(--menu-accent);
    color: var(--menu-accent);
}

.tm-menu-standard .menu-btn-primary {
    background: var(--menu-accent);
    color: white;
}

.tm-menu-standard .menu-btn-primary:hover {
    background: #2563eb;
}

/* Mobile Toggle */
.tm-menu .menu-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--menu-text);
    font-size: 1.5rem;
    line-height: 1;
}

.tm-menu .drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
    transition: var(--menu-transition);
    font-size: 1.5rem;
    line-height: 1;
}

/* Responsive Standard */
@media (max-width: 768px) {
    .tm-menu-standard .menu-nav,
    .tm-menu-standard .menu-actions {
        display: none;
    }
    
    .tm-menu-standard .menu-toggle {
        display: block;
    }
    
    .tm-menu-standard.menu-open .menu-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--menu-bg);
        border-bottom: 1px solid var(--menu-border);
        padding: 1rem;
        gap: 0;
    }
    
    .tm-menu-standard.menu-open .menu-nav > li > a {
        padding: 0.75rem 1rem;
    }
    
    .tm-menu-standard.menu-open .menu-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }
}

/* ============================================================================
   2. CANVAS MENU - Off-Canvas / Hamburger
   ============================================================================ */

.tm-menu-canvas {
    position: relative;
}

.tm-menu-canvas .menu-header {
    background: var(--menu-bg);
    border-bottom: 1px solid var(--menu-border);
    padding: 0 1rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tm-menu-canvas .menu-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--menu-text-hover);
}

.tm-menu-canvas .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
    transition: var(--menu-transition);
    font-size: 1.5rem;
}

.tm-menu-canvas .menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Overlay */
.tm-menu-canvas .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--menu-transition);
    z-index: 998;
}

.tm-menu-canvas.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* Drawer */
.tm-menu-canvas .menu-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--menu-bg);
    box-shadow: var(--menu-shadow);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.tm-menu-canvas.menu-open .menu-drawer {
    transform: translateX(0);
}

/* Right side variant */
.tm-menu-canvas.menu-right .menu-drawer {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

.tm-menu-canvas.menu-right.menu-open .menu-drawer {
    transform: translateX(0);
}

/* Drawer Header */
.tm-menu-canvas .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--menu-border);
}

.tm-menu-canvas .drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
    transition: var(--menu-transition);
    font-size: 1.5rem;
}

.tm-menu-canvas .drawer-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Drawer Nav */
.tm-menu-canvas .menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.tm-menu-canvas .menu-nav > li {
    border-bottom: 1px solid var(--menu-border);
}

.tm-menu-canvas .menu-nav > li:last-child {
    border-bottom: none;
}

.tm-menu-canvas .menu-nav > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0.5rem;
    font-weight: 500;
    color: var(--menu-text);
}

.tm-menu-canvas .menu-nav > li > a:hover {
    color: var(--menu-accent);
}

/* Submenu Canvas */
.tm-menu-canvas .menu-submenu {
    display: none;
    padding-left: 1rem;
    padding-bottom: 0.5rem;
}

.tm-menu-canvas .menu-submenu.open {
    display: block;
}

.tm-menu-canvas .menu-submenu a {
    display: block;
    padding: 0.625rem 0.5rem;
    color: var(--menu-text);
    font-size: 0.9375rem;
}

.tm-menu-canvas .menu-submenu a:hover {
    color: var(--menu-accent);
}

/* Drawer Footer */
.tm-menu-canvas .drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--menu-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tm-menu-canvas .drawer-footer .menu-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: var(--menu-radius);
}

/* ============================================================================
   3. MEGA MENU - Dropdown Multi-Colonna
   ============================================================================ */

.tm-menu-mega {
    background: var(--menu-bg);
    border-bottom: 1px solid var(--menu-border);
    position: relative;
}

.tm-menu-mega .menu-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.tm-menu-mega .menu-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--menu-text-hover);
}

.tm-menu-mega .menu-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tm-menu-mega .menu-nav > li {
    position: static;
}

.tm-menu-mega .menu-nav > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--menu-text);
    border-radius: var(--menu-radius);
}

.tm-menu-mega .menu-nav > li > a:hover,
.tm-menu-mega .menu-nav > li:hover > a {
    color: var(--menu-accent);
    background: rgba(59, 130, 246, 0.1);
}

/* Dropdown Arrow Mega */
.tm-menu-mega .has-mega > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: var(--menu-transition);
}

.tm-menu-mega .has-mega:hover > a::after {
    transform: rotate(180deg);
}

/* Mega Dropdown Panel */
.tm-menu-mega .mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--menu-bg);
    border-bottom: 1px solid var(--menu-border);
    box-shadow: var(--menu-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--menu-transition);
    z-index: 100;
}

.tm-menu-mega .has-mega:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tm-menu-mega .mega-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Mega Column */
.tm-menu-mega .mega-column {
    min-width: 0;
}

.tm-menu-mega .mega-heading {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--menu-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--menu-accent);
}

.tm-menu-mega .mega-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tm-menu-mega .mega-links a {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: calc(var(--menu-radius) - 2px);
    color: var(--menu-text);
}

.tm-menu-mega .mega-links a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--menu-accent);
}

.tm-menu-mega .mega-link-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--menu-accent);
}

.tm-menu-mega .mega-link-content {
    flex: 1;
    min-width: 0;
}

.tm-menu-mega .mega-link-title {
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.tm-menu-mega .mega-link-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Mega Featured (con immagine) */
.tm-menu-mega .mega-featured {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--menu-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.tm-menu-mega .mega-featured-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: calc(var(--menu-radius) - 4px);
    margin-bottom: 1rem;
}

.tm-menu-mega .mega-featured-title {
    font-weight: 600;
    color: var(--menu-text-hover);
    margin-bottom: 0.5rem;
}

.tm-menu-mega .mega-featured-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    flex: 1;
}

.tm-menu-mega .mega-featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--menu-accent);
}

.tm-menu-mega .mega-featured-link:hover {
    gap: 0.75rem;
}

/* Responsive Mega */
@media (max-width: 1024px) {
    .tm-menu-mega .mega-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tm-menu-mega .menu-nav,
    .tm-menu-mega .menu-actions {
        display: none;
    }
    
    .tm-menu-mega .menu-toggle {
        display: block;
    }
}

/* ============================================================================
   THEME VARIANTS
   ============================================================================ */

/* Dark Theme */
.tm-menu.menu-dark {
    --menu-bg: #111827;
    --menu-text: #d1d5db;
    --menu-text-hover: #ffffff;
    --menu-border: #374151;
}

/* Transparent (per hero) */
.tm-menu.menu-transparent {
    --menu-bg: transparent;
    --menu-text: #ffffff;
    --menu-text-hover: #ffffff;
    --menu-border: rgba(255, 255, 255, 0.2);
}

.tm-menu.menu-transparent .menu-nav > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sticky */
.tm-menu.menu-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tm-menu.menu-sticky.scrolled {
    --menu-bg: #ffffff;
    --menu-text: #374151;
    --menu-text-hover: #111827;
    box-shadow: var(--menu-shadow);
}

/* ============================================================================
   ICONS
   ============================================================================ */

.tm-menu .icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tm-menu .menu-dropdown.animate,
.tm-menu .mega-dropdown.animate {
    animation: menuSlideDown 0.2s ease;
}


/* === Export Fixes === */
.tm-menu { width: 100%; }
.tm-menu .menu-nav { justify-content: center; }
.tm-header-content { width: 100%; }
.tm-footer-content { width: 100%; }

/* === Header === */
.tm-header-minimal .tm-header-content { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 70px; max-width: 1200px; margin: 0 auto; } .tm-header-minimal .tm-header-logo a { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; text-decoration: none; } .tm-header-minimal .menu-nav { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; } .tm-header-minimal .menu-nav a { color: #4b5563; text-decoration: none; font-weight: 500; transition: color 0.2s; } .tm-header-minimal .menu-nav a:hover { color: #1a1a2e; }

/* === Footer === */
.tm-footer-minimal .tm-footer-content { display: flex; align-items: center; justify-content: space-between; padding: 20px; max-width: 1200px; margin: 0 auto; } .tm-footer-minimal .footer-copyright { font-size: 0.875rem; color: #6b7280; } .tm-footer-minimal .footer-legal-links { display: flex; gap: 24px; } .tm-footer-minimal .footer-legal-links a { font-size: 0.875rem; color: #6b7280; text-decoration: none; transition: color 0.2s; } .tm-footer-minimal .footer-legal-links a:hover { color: #1a1a2e; }

/* === Pagina: Home === */
* { box-sizing: border-box; } body {margin: 0;}#igmbk{min-height:0;background-color:#ded9d9;}#ijvsd{min-height:0;background-color:#b6b4b4;}

/* === Pagina: Test Menu === */
* { box-sizing: border-box; } body {margin: 0;}

