:root {
    --primary-color: #d81a20;
    --secondary-color: #1a1a1a;
    --light-color: #eee9e3;
    --accent-color: #ffc107;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--light-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2a2a2a 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(216, 26, 32, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Main Content */
#app {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('../img/pizzafundo.jpg') center/cover;
    padding: 8rem 0;
    text-align: center;
    color: var(--light-color);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Featured Section */
.featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(216, 26, 32, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(216, 26, 32, 0.4);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--light-color);
    font-size: 0.95rem;
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.testimonial {
    background: linear-gradient(135deg, rgba(216, 26, 32, 0.1), rgba(216, 26, 32, 0.05));
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.testimonial::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 10px;
}

.testimonial-text {
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.menu-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.menu-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(216, 26, 32, 0.3);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.menu-item-info {
    padding: 1rem;
}

.menu-item-name {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.menu-item-description {
    color: var(--light-color);
    font-size: 0.85rem;
}

/* About Section */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 3rem 0;
}

.about-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(216, 26, 32, 0.3);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, rgba(216, 26, 32, 0.1), rgba(216, 26, 32, 0.05));
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
}

.contact-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    padding: 1.5rem;
    background: rgba(42, 42, 42, 0.5);
    border-radius: var(--border-radius);
}

.contact-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    padding: 2rem 0;
    text-align: center;
    border-top: 2px solid var(--primary-color);
    margin-top: 3rem;
}

.footer p {
    color: var(--light-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Carousel */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    height: 400px;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--secondary-color);
        gap: 0;
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-section {
        grid-template-columns: 1fr;
    }

    .featured,
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 2rem 1rem;
    }

    .carousel {
        height: 300px;
    }

    #app {
        min-height: calc(100vh - 150px);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .featured,
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .testimonials {
        grid-template-columns: 1fr;
    }

    .carousel {
        height: 250px;
    }

    .nav-menu {
        top: 60px;
    }

    .contact-section h2 {
        font-size: 1.3rem;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Smooth Page Transitions */
main {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

main.fade-out {
    opacity: 0.5;
}
