/* ============================================================
   ANIMAZIONI FLUIDE E COERENTI - BAR BEPPE
   ============================================================ */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   KEYFRAMES ANIMAZIONI
   ============================================================ */

/* Fade In da alto */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In da basso */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In da sinistra */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In da destra */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In semplice */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Pulse sottile */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(216, 180, 106, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(216, 180, 106, 0.6);
    }
}

/* Slide In from left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale pulse on hover */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================
   ANIMAZIONI APPLICAZIONI AI COMPONENTI
   ============================================================ */

/* Hero Section */
.hero {
    animation: fadeIn 0.8s ease-in-out;
}

.hero__content h1 {
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.hero__content p {
    animation: fadeInDown 0.8s ease-out 0.4s both;
}

.btn-menu-hero {
    animation: fadeInUp 0.8s ease-out 0.6s both;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}


.top-bar a {
    transition: all 0.3s ease;
}

.top-bar a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Menu Heroes */
.menu-hero {
    transition: flex 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-hero-title {
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.menu-hero-description {
    animation: fadeIn 0.4s ease 0.2s;
    transition: opacity 0.3s ease;
}

.btn-menu-hero:hover {
    animation: glow 0.6s ease infinite;
}

/* Content Rows */
.content-row {
    animation: fadeInUp 0.8s ease-out;
}


/* Text Container */
.text-container {
    animation: fadeInUp 0.8s ease-out;
}

.text-container h2,
.text-container h3 {
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

.text-container p {
    animation: fadeIn 0.6s ease-out 0.4s both;
    line-height: 1.8;
    transition: color 0.3s ease;
}

/* Photo-Text Section */
.photo-text-section {
    animation: fadeInUp 0.8s ease-out;
}

.photo-text-section__container h2 {
    animation: fadeInDown 0.6s ease-out;
}

.photo-text-item {
    animation: scaleUp 0.6s ease-out both;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-text-item:nth-child(1) {
    animation-delay: 0s;
}

.photo-text-item:nth-child(2) {
    animation-delay: 0.1s;
}

.photo-text-item:nth-child(3) {
    animation-delay: 0.2s;
}

.photo-text-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.photo-text-item__image {
    transition: transform 0.4s ease;
}

.photo-text-item:hover .photo-text-item__image {
    transform: scale(1.08);
}

/* Bar Section */
.bar-section {
    animation: fadeInUp 0.8s ease-out;
}

.bar-header {
    animation: fadeInDown 0.6s ease-out;
}

.bar-header h2 {
    animation: fadeInDown 0.6s ease-out;
    transition: color 0.3s ease;
}

.bar-header h2:hover {
    color: var(--accent-gold-dark);
}

.bar-header .divider {
    animation: scaleUp 0.6s ease-out 0.4s both;
    transform-origin: center;
}

/* Menu Categories e Items */
.menu-category h3 {
    animation: fadeInLeft 0.6s ease-out;
    transition: all 0.3s ease;
}

.menu-item {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-category:nth-child(1) .menu-item:nth-child(1) {
    animation-delay: 0.1s;
}

.menu-category:nth-child(1) .menu-item:nth-child(2) {
    animation-delay: 0.2s;
}

.menu-category:nth-child(1) .menu-item:nth-child(3) {
    animation-delay: 0.3s;
}

.menu-category:nth-child(2) .menu-item:nth-child(1) {
    animation-delay: 0.4s;
}

.menu-category:nth-child(2) .menu-item:nth-child(2) {
    animation-delay: 0.5s;
}

.menu-category:nth-child(2) .menu-item:nth-child(3) {
    animation-delay: 0.6s;
}

.menu-item:hover {
    transform: translateX(8px);
    background-color: rgba(216, 180, 106, 0.05);
    padding-left: 10px;
    border-radius: 4px;
}

.item-name {
    transition: color 0.3s ease;
}

.menu-item:hover .item-name {
    color: var(--accent-gold-dark);
}

.item-price {
    animation: glow 0.6s ease infinite;
    animation-play-state: paused;
}

.menu-item:hover .item-price {
    animation-play-state: running;
}

/* Footer */
.footer-bar {
    animation: fadeInUp 0.8s ease-out;
}

.footer-section {
    animation: fadeInUp 0.6s ease-out both;
}

.footer-section:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-section:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-section:nth-child(3) {
    animation-delay: 0.3s;
}

.footer-section:nth-child(4) {
    animation-delay: 0.4s;
}

.circular-logo {
    animation: fadeIn 0.6s ease-out;
    transition: all 0.4s ease;
}

.circular-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(216, 180, 106, 0.3);
}

.footer-section h3 {
    transition: color 0.3s ease;
}

.footer-section h3:hover {
    color: var(--accent-gold-dark);
}

.social-links a,
.footer-section ul li {
    transition: all 0.3s ease;
}

.social-links a:hover,
.footer-section ul li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* ============================================================
   INTERSECTION OBSERVER - ANIMAZIONI AL SCROLL
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   ANIMAZIONI RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .hero__content h1 {
        animation: fadeInDown 0.6s ease-out 0.1s both;
    }

    .hero__content p {
        animation: fadeInDown 0.6s ease-out 0.2s both;
    }

    .menu-item:hover {
        transform: translateX(5px);
    }

    .carousel-container:hover {
        transform: translateY(-3px);
    }

    .photo-text-item:hover {
        transform: translateY(-8px);
    }

    .nav-link::after {
        height: 1px;
    }
}

/* Riduce le animazioni se l'utente ha prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
