/* ============================================
   I PAZZI ITALIAN RESTAURANT — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.04;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    border: 3px solid #059669;
    border-radius: 50%;
    top: 15%;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 250px;
    height: 250px;
    background: #059669;
    border-radius: 50%;
    bottom: 20%;
    left: -50px;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid #059669;
    top: 60%;
    right: 15%;
    animation: spin-slow 30s linear infinite;
    opacity: 0.03;
}

.shape-dots {
    background-image: radial-gradient(circle, #059669 1px, transparent 1px);
    background-size: 20px 20px;
    width: 200px;
    height: 200px;
    top: 40%;
    left: 5%;
    opacity: 0.05;
    animation: float-slow 18s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(5, 78, 59, 0.08);
    padding: 0;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 40px;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   Stat Items
   ============================================ */
.stat-item {
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

.stat-item:last-child::after {
    display: none;
}

/* ============================================
   Menu Cards
   ============================================ */
.menu-card {
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.menu-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Buttons
   ============================================ */
button, a[type="submit"] {
    position: relative;
    overflow: hidden;
}

button::before, a[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:active::before, a[type="submit"]:active::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-item img {
    transition: transform 0.7s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 8rem;
    color: rgba(5, 150, 105, 0.05);
    line-height: 1;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus, select:focus, textarea:focus {
    border-color: #059669 !important;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1) !important;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: #059669;
    color: #fefce8;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .shape-circle-1,
    .shape-circle-2,
    .shape-triangle,
    .shape-dots {
        display: none;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .stat-item::after {
        display: none;
    }

    .stat-item {
        padding: 0 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 4rem;
    }
}
