/* RESET DI BASE */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* HEADER */
header {
    position: relative;
    background: #ffffff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    z-index: 10;
}

/* TESTO ANIMATO HEADER */
.slider {
    flex: 1;
    margin: 0 16px;
    border-radius: 20px;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.animated-text {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15em;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111827;
}

.animated-text span {
    display: inline-block;
    opacity: 0;
    animation: slideIn 0.8s forwards;
}

.animated-text span:hover {
    animation: dance 0.25s infinite alternate !important;
}

/* Animazioni testo */
@keyframes slideIn {
    from { transform: translateX(100vw); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes dance {
    from { transform: translate(0,0) rotate(0deg); }
    to   { transform: translate(4px,-4px) rotate(5deg); }
}

/* HAMBURGER */
.hamburger {
    cursor: pointer;
    padding: 8px 10px;
    font-size: 22px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.hamburger:hover { background: #e5e7eb; }

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    height: calc(100% - 32px);
    width: 240px;
    background: #111827;
    color: #e5e7eb;
    padding-top: 80px;
    transform: translateX(-260px);
    transition: 0.25s;
    border-radius: 20px;
    z-index: 1000;
}
.sidebar.active { transform: translateX(0); }

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 999px;
    margin: 6px 10px;
}
.sidebar a:hover { background: #1f2937; }

/* ================================
   BARRA DI RICERCA SOTTO HEADER
================================ */
.search-bar-section {
    width: 100%;
    padding-top: 10px;
}

.search-bar-wrapper {
    width: 66vw;
    max-width: 1000px;
    margin: 0 auto 10px auto;
    position: relative;
}

/* Box ricerca */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
}

.icon-search-svg {
    width: 18px;
    height: 18px;
    stroke: #4b5563;
}

/* Tendina risultati */
.search-results {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.15);
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
    display: none;
    z-index: 1500;
}

.search-results.visible { display: block; }

.search-result-item {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
    font-size: 13px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f3f4f6; }

.search-snippet {
    color: #4b5563;
    font-size: 12px;
}

.search-snippet mark {
    background: #fde68a;
    padding: 0 2px;
    border-radius: 3px;
}

/* HERO */
.hero-fullscreen {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    transition: 0.4s;
}
.hero-fullscreen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-fullscreen.hero-hidden {
    opacity: 0;
    transform: translateY(-40px);
    height: 0;
}

/* CARD */
.card {
    background: white;
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* VIDEO */
.video-card {
    width: 66vw;
    margin: 0 auto;
}
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}
.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: none;
}

/* ROBOTTINO */
.robottino-title {
    display: flex;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    gap: 0.2em;
    margin-bottom: 10px;
}
.robottino-title span {
    display: inline-block;
    transition: 0.2s;
}
.robottino-title span:hover {
    transform: translateY(-3px) rotate(3deg);
    text-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

/* TESTO SOTTO VIDEO */
.text-below-video {
    width: 66vw;
    margin: 0 auto 20px auto;
}

/* GALLERIA + ADS */
.gallery-layout {
    width: 66vw;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 16px;
}

.ad-box {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    min-height: 120px;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.gallery-item img {
    width: 100%;
    border-radius: 16px;
    cursor: zoom-in;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: 0.15s;
}
.gallery-item img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.gallery-caption {
    text-align: center;
    font-size: 13px;
}

/* TOOLTIP ZOOM */
.zoom-tooltip {
    position: fixed;
    padding: 4px 10px;
    background: #111827;
    color: white;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: 0.15s;
    z-index: 2600;
}
.zoom-tooltip.visible { opacity: 1; }

/* ZOOM OVERLAY */
.img-zoom-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 2500;
}
.img-zoom-overlay.visible { display: flex; }

/* IMMAGINE ZOOMATA FIX 1024×768 */
.img-zoom-overlay img {
    width: 1024px;
    height: 768px;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}

/* SEZIONE 3D */
.section-3d {
    width: 100%;
    padding: 24px 16px;
    background: #111827;
    color: white;
    text-align: center;
    margin-top: 40px;
    cursor: pointer;
}

/* POPUP 3D */
.popup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.popup-overlay.visible { display: flex; }

.popup-3d {
    background: #fff;
    padding: 24px 28px;
    border-radius: 20px;
    max-width: 100%;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

/* IFRAME 3D — 1024px */
.iframe-3d {
    width: 1024px;
    max-width: 100%;
    height: 576px;
    border-radius: 16px;
    border: none;
    background: #000;
    margin-top: 12px;
}

/* WHATSAPP */
.whatsapp-float {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 64px;
    height: 64px;
    z-index: 3000;
}
.whatsapp-float img {
    width: 100%;
    height: 100%;
    padding: 12px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: 0.2s;
}
.whatsapp-float img:hover {
    transform: scale(1.12);
}
/* =========================
           FOOTER
========================= */
.site-footer {
    width: 100%;
    background: #111827;
    padding: 30px 20px;
    margin-top: 40px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -6px 18px rgba(0,0,0,0.20);
    color: #f9fafb;
}

.footer-content {
    width: 66vw;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

/* Social icons */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    background: #1f2937;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: 0.25s;
}

.social-icon img {
    width: 100%;
    height: 100%;
    filter: invert(100%);
}

.social-icon:hover {
    background: #374151;
    transform: scale(1.12);
}

