/* ==================== */
/* Hero Section */
/* ==================== */

.hero {
    background: var(--background-alt);
    padding: var(--spacing-2xl) 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    display: flex;
    justify-content: center;
    align-items: end;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
}

/* Fade In */
.fade-in {
    color: var(--text-primary);
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

#typewriter {
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: blink 0.7s step-end infinite alternate;
    padding-left: 10px;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ==================== */
/* Hero Categories */
/* ==================== */

.hero-categories {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Cerchio categoria */
.category-item {
    width: 10rem;
    height: 10rem;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    padding: 0.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Icona "in background" */
.category-icon {
    position: absolute;
    opacity: 0.1;
    color: var(--primary-color);
    pointer-events: none;
}

/* Link/testo */
.category-link {
    position: relative;
    z-index: 1;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

/* Hover */
.category-item:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.category-item:hover .category-link {
    color: #ffffff;
}

.category-item:hover .category-icon {
    opacity: 0.15;
}


/* =============================== */
/* MOBILE BREAKPOINT (scrollable)  */
/* =============================== */

@media (max-width: 768px) {

    .hero {
        padding: var(--spacing-xl) 0;
    }

    #typewriter {
        padding-left: 0;
        margin-top: .25rem;
    }

    .hero-title {
        flex-direction: column;
        align-items: center;
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Scrollbar orizzontale */
    .hero-categories {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: var(--spacing-md);
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
    }

    .category-item {
        width: 8rem;
        height: 8rem;
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .category-link {
        font-size: 1rem;
    }

    /* Scrollbar stile iOS/Android */
    .hero-categories::-webkit-scrollbar {
        height: 6px;
    }

    .hero-categories::-webkit-scrollbar-track {
        background: transparent;
    }

    .hero-categories::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
}