/* FONT IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;700&display=swap');

/* GENERAL STYLES */
:root {
    --background-color: #fff;
    --primary-green: #3a8e3d;
    --primary-red: #d94a4a;
    --text-dark: #1a1a1a;
    --border-color: #e0e0e0;
    --section-bg-light: #222;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- SECTION 1: HERO LANDING PAGE --- */

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-icon {
    position: absolute;
    width: 70px;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

#icon1 { top: 18%; left: 8%; animation-duration: 4s; }
#icon2 { top: 45%; left: 10%; animation-duration: 3.5s; }
#icon3 { top: 70%; left: 9%; animation-duration: 4.2s; animation-delay: 0.5s; }
#icon4 { top: 18%; right: 8%; animation-duration: 3.8s; }
#icon5 { top: 48%; right: 12%; animation-duration: 4.5s; animation-delay: 0.3s; }
#icon6 { top: 80%; right: 10%; animation-duration: 3.2s; }

.hero-container {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-top: 100px;
    box-sizing: border-box;
}

/* Header */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-green);
    background-color: white;
    z-index: 1000;
}

.logo {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--primary-green);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.logo .red-text {
    color: var(--primary-red);
}

/* Updated Nav Styles for Positioning */
nav {
    flex-grow: 1; /* Allow nav to take up available space */
}

.primary-navigation {
    display: flex;
    justify-content: space-between; /* This is the key change */
    align-items: center;
}

nav .primary-navigation a {
    font-weight: bold;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    /* Removed margin-right to allow space-between to work correctly */
}

nav .primary-navigation a:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

.header-icons {
    flex-basis: 0; /* Ensures the nav can use all the space on the right */
}

/* Main Content */
main {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.hero-image-container {
    max-width: 550px;
    margin-bottom: 1rem;
}
.hero-image-container img {
    width: 100%;
    display: block;
}

.hero-container h1 {
    font-family: 'Anton', sans-serif;
    font-size: 6rem;
    color: var(--primary-green);
    margin: 0;
    line-height: 1;
    letter-spacing: 1px;
}

.hero-container h1 .red-text {
    color: var(--primary-red);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0 2.5rem 0;
}

.hero-shop-btn {
    display: inline-block;
    border: 3px solid var(--text-dark);
    background: transparent;
    padding: 0.8rem 2.5rem;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-dark);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-shop-btn:hover {
    background-color: var(--text-dark);
    color: white;
}

.hero-shop-btn::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    border-left: 3px solid var(--text-dark);
    border-right: 3px solid var(--text-dark);
    border-top: 3px solid var(--text-dark);
}

/* --- SECTION 2: SPECIAL MARGHERITA PROMO --- */
.promo-container {
    padding: 5rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.promo-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.text-section {
    flex: 1;
    padding: 0rem 3rem 0rem 0rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.new-stamp {
    position: absolute;
    top: 5%;
    right: 10%;
    width: 100px;
    height: 100px;
    animation: rotate 3s linear infinite;
}

.new-stamp img {
    width: 100%;
    height: auto;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.intro-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin: 0;
}

.promo-container h1 {
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    color: var(--primary-red);
    margin: 0.5rem 0;
    line-height: 1.1;
}

.description {
    font-size: 1rem;
    max-width: 400px;
    margin: 1rem 0 2rem 0;
    line-height: 1.6;
}

.promo-shop-btn {
    display: inline-block;
    background-color: var(--primary-green);
    border: 2px solid var(--text-dark);
    color: white;
    padding: 0.8rem 2rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    max-width: 150px;
    text-align: center;
}

.promo-shop-btn:hover {
    background-color: var(--text-dark);
    color: white;
}

.image-section {
    flex: 1;
    overflow: hidden;
    min-height: 500px;
}

.image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- FINAL SECTION: OUR PIZZAS CAROUSEL --- */
.our-pizzas-section {
    background-color: var(--background-color); 
    padding: 6rem 0;
    text-align: center;
    position: relative;
}

.our-pizzas-section .shop-all-btn {
    background-color: #3a8e3d;
    color: white;
    border: 2px solid #1a1a1a;
    padding: 0.7rem 2.5rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    display: inline-block; /* Added for consistency */
}

.our-pizzas-section .shop-all-btn:hover {
     background-color: #1a1a1a;
}

.our-pizzas-section h2 {
    font-family: 'Anton', sans-serif;
    font-size: 6rem;
    color: var(--primary-green); 
    margin: 0.5rem 0;
    line-height: 1;
}

.our-pizzas-section .pizzas-subtitle {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.5rem 0 1.5rem 0;
}

.pizza-carousel {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.pizza-track {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.pizza-item {
    flex-shrink: 0;
    width: 400px;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.4s ease;
    cursor: pointer;
}

.pizza-item:not(.active):hover {
    transform: scale(0.85) translateY(40px) !important; /* Slightly lift non-active items on hover */
}

.pizza-item img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    pointer-events: none; /* Prevents image from interfering with clicks on the parent div */
}

.pizza-name {
    opacity: 0;
    transition: opacity 0.5s ease;
    margin-top: 1rem;
}

.pizza-name .special {
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    text-transform: uppercase;
}

.pizza-name .name {
    font-family: 'Anton', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
}

.pizza-item.active .pizza-name {
    opacity: 1;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.carousel-arrow img {
    width: 50px;
}

#prev-btn {
    left: 5%;
}

#next-btn {
    right: 5%;
}


/* --- FOOTER SECTION --- */
.footer {
    background-color: var(--section-bg-light); 
    color: #fff; 
    padding: 4rem 2rem 1rem;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 220px;
    box-sizing: border-box;
    color: #fff; 
}

.footer-brand .footer-logo {
    font-family: 'Anton', sans-serif;
    font-size: 2.8rem;
    color: var(--primary-green); 
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.footer-brand .footer-logo .red-text {
    color: var(--primary-red);
}

.footer-brand .tagline {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    color: #fff; 
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    color: #fff; 
    font-size: 1.5rem;
    margin-right: 1.2rem;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.social-icons a:hover {
    color: var(--primary-green); 
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.5rem;
    color: #fff; 
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    line-height: 1;
}

.footer-column h4 .fas {
    font-size: 1.2rem;
    color: var(--primary-red);
}

.footer-column p {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #fff; 
}

.footer-column strong {
    color: #fff; 
}

.footer-map {
    flex: 1.5;
    min-width: 250px;
}

.footer-map iframe {
    width: 100%;
    height: 200px;
    border: 3px solid var(--text-dark); 
    border-radius: 5px;
    filter: invert(100%) grayscale(100%);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color); 
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #777; 
}

/* --- MOBILE NAVIGATION & RESPONSIVENESS --- */

/* Hamburger Button */
.mobile-nav-toggle {
    display: none;
    position: absolute;
    z-index: 2000;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-toggle .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.mobile-nav-toggle::before,
.mobile-nav-toggle::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    transition: transform 300ms ease-in-out, top 300ms ease-in-out;
}

.mobile-nav-toggle::before { top: 10px; }
.mobile-nav-toggle::after { top: 20px; }

.mobile-nav-toggle[aria-expanded="true"]::before {
    top: 15px;
    transform: rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"]::after {
    top: 15px;
    transform: rotate(-45deg);
}

@media (max-width: 900px) {
    /* Show hamburger on mobile */
    .mobile-nav-toggle {
        display: block;
    }

    /* Hide desktop nav links by default on mobile */
    .primary-navigation {
        display: none; /* Hide the spaced-out nav on mobile */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        position: fixed;
        inset: 0 0 0 30%;
        padding: min(20vh, 10rem) 2rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 350ms ease-out;
    }
    
    .primary-navigation[data-visible="true"] {
        display: flex; /* Show it when the hamburger is clicked */
        transform: translateX(0%);
    }

    nav .primary-navigation a {
        font-size: 1.5rem;
        margin: 0;
    }

    /* General responsive adjustments */
    .floating-icon { display: none; }
    
    .hero-container h1 { font-size: 4rem; }
    .hero-image-container { max-width: 400px; }
    
    .promo-wrapper { flex-direction: column; }
    .text-section { padding: 1rem; text-align: center; align-items: center;}
    .promo-container h1 { font-size: 4rem; }
    
    .our-pizzas-section h2 { font-size: 4rem; }
    .pizza-item { width: 320px; }
    
    #prev-btn { left: 2%; }
    #next-btn { right: 2%; }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }
    .footer-column { min-width: 100%; }
    .footer-column h4 { justify-content: center; }
    .social-icons { display: flex; justify-content: center; }
}

@media (max-width: 480px) {
    .hero-container h1 { font-size: 3rem; }
    .subtitle { font-size: 1.2rem; }
    .our-pizzas-section h2 { font-size: 3rem; }
    .pizza-item { width: 280px; }
    .carousel-arrow img { width: 40px; }
}