/*
Theme Name: Telecom Security Child Theme
Theme URI: http://localhost:8081/telecomsecurity/
Description: Child theme personalizzato per Telecom Security, sviluppato su architettura ticinoweb-ai-theme per WordPress Multisite.
Author: ticinoWEB
Author URI: https://ticinoweb.ch/
Template: ticinoweb-ai-theme
Version: 1.22.0
Text Domain: telecomsecurity-child-theme
*/

/* ==========================================================================
   Telecom Security Child Theme Styles
   Version: 1.22.0
   ========================================================================== */

:root {
    --ts-color-primary: #0a2540;
    --ts-color-primary-dark: #07192c;
    --ts-color-accent: #0066cc;
    --ts-color-accent-light: #2085ec;
    --ts-color-text: #2c3e50;
    --ts-color-text-muted: #64748b;
    --ts-color-bg: #ffffff;
    --ts-color-bg-alt: #f8fafc;
    --ts-font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ts-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Occultamento Scrollbar Nativa del Browser */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Stili base del child theme Telecom Security */
body.telecomsecurity-theme {
    font-family: var(--ts-font-main);
    color: var(--ts-color-text);
    background-color: var(--ts-color-bg);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ==========================================================================
   Main Navigation & Dropdown Styling (Native WP Menu)
   ========================================================================== */

.main-navigation {
    position: relative;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu > li {
    position: relative;
}

.primary-menu a {
    text-decoration: none;
    transition: var(--ts-transition);
}

/* Indicatore freccia per voci con sottomenu */
.primary-menu .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.primary-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.25s ease;
}

.primary-menu .menu-item-has-children:hover > a::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* Sottomenu standard nativo WordPress (base per futuro megamenu) */
.primary-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(10, 37, 64, 0.12), 0 2px 6px rgba(10, 37, 64, 0.06);
    border: 1px solid rgba(10, 37, 64, 0.08);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 999;
}

/* Pseudo-elemento ponte per evitare interruzioni hover tra link genitore e dropdown */
.primary-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
}

.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--ts-color-text);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 2px 8px;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu .current-menu-item > a {
    background: var(--ts-color-bg-alt);
    color: var(--ts-color-accent);
    transform: translateX(4px);
}
