/* =========================
   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 "Image for Creation" */
.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 header */
@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 + SIDEBAR
========================= */
.hamburger {
    cursor: pointer;
    padding: 8px 10px;
    font-size: 22px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: 0.2s;
}
.hamburger:hover {
    background: #e5e7eb;
}

.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;
    font-size: 14px;
}
.sidebar a:hover {
    background: #1f2937;
}

/* =========================
   BARRA DI RICERCA
========================= */
.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 FULLSCREEN
========================= */
.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 GENERICA
========================= */
.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    margin: 20px auto;
    width: 66vw;
    max-width: 1100px;
}

.card h2 {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 18px;
}

/* =========================
   SEZIONE INFO (TESTO + IMG)
========================= */
.info-split {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.info-text {
    flex: 1 1 320px;
    font-size: 15px;
    line-height: 1.6;
}

.info-image {
    flex: 1 1 320px;
    display: flex;
    justify-content: flex-end;
}

.info-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Mobile: immagine sotto, testo sopra */
@media (max-width: 850px) {
    .info-split {
        flex-direction: column;
        text-align: center;
    }
    .info-image {
        justify-content: center;
    }
}

/* =========================
   ROBOTTINO
========================= */
.text-below-video {
    width: 66vw;
    max-width: 1100px;
    margin: 0 auto 20px auto;
}

.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);
}

/* =========================
   PUBBLICITÀ CENTRALE
========================= */
.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 12px;
}

.ad-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
    color: #374151;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

/* =========================
   TOOLTIP ZOOM (ANCHE SE NON CI SONO IMG ORA)
========================= */
.zoom-tooltip {
    position: fixed;
    padding: 4px 10px;
    background: #111827;
    color: #ffffff;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: 0.15s;
    z-index: 2600;
    font-size: 11px;
}
.zoom-tooltip.visible {
    opacity: 1;
}

/* Overlay zoom immagine */
.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 1024x768 */
.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);
}

/* =========================
   WHATSAPP FLOAT
========================= */
.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);
}

/* =========================
   ADATTAMENTO SMARTPHONE
   (Media Query)
========================= */
@media (max-width: 768px) {

    /* 1. Espandiamo le card per sfruttare lo schermo piccolo */
    .card, 
    .search-bar-wrapper, 
    .text-below-video, 
    .footer-content {
        width: 92vw; /* Da 66vw passiamo a 92vw per dare respiro al testo */
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    /* 2. Ottimizzazione Header e Titolo Animato */
    header {
        padding: 10px;
        border-radius: 0 0 15px 15px; /* Arrotondamento ridotto su mobile */
    }

    .slider {
        margin: 0 8px;
        padding: 12px 8px;
    }

    .animated-text {
        font-size: 1.6rem; /* Riduce la dimensione per evitare che il titolo si spezzi male */
        justify-content: center;
        gap: 0.1em;
    }

    /* 3. Hero Image: riduciamo l'altezza per mostrare subito i contenuti */
    .hero-fullscreen {
        height: 35vh;
    }

    /* 4. Sezione Info: portiamo l'immagine sotto il testo */
    .info-split {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .info-text {
        flex: none;
        width: 100%;
    }

    .info-image {
        justify-content: center;
        width: 100%;
    }

    .info-image img {
        max-width: 80%; /* Evita che la foto profilo sia troppo grande */
    }

    /* 5. Sidebar: adattamento larghezza per touch */
    .sidebar {
        width: 80%; /* Quasi a tutta larghezza per facilitare il tocco */
        max-width: 280px;
    }

    /* 6. Pubblicità: ottimizzazione spazi */
    .gallery {
        grid-template-columns: 1fr; /* Una sola colonna di annunci */
        gap: 12px;
    }

    /* 7. Pulsante WhatsApp: più piccolo per non coprire il testo */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px; /* Portato più in basso rispetto al desktop */
        right: 15px;
    }
}
 