/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-dark-brown: #4a2a1f;
    --color-brown: #6b3d2f;
    --color-light-brown: #9d5d47;
    --color-green: #2d5016;
    --color-light-green: #4a7c2a;
    --color-red: #c41e3a;
    --color-light-red: #e63946;
    --color-white: #ffffff;
    --color-cream: #f5f1eb;
    --color-gray: #6c757d;
    --color-dark-gray: #343a40;
}

html {
    scroll-padding-top: 78px; /* Account for header height on mobile */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-cream);
    background-color: var(--color-dark-brown);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background-color: var(--color-dark-brown);
    padding: 4px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-menu {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-menu:hover {
    background-color: var(--color-white);
    color: var(--color-red);
}

.btn-order {
    background-color: var(--color-red);
    color: var(--color-white);
    border: 2px solid var(--color-red);
}

.btn-order:hover {
    background-color: var(--color-light-red);
    border-color: var(--color-light-red);
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 20px;
}

.nav {
    background: transparent;
    background-color: transparent;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: none;
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-dark-brown);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: none;
}

.nav-menu.active {
    display: flex;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 1rem;
    color: var(--color-white);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu a:hover {
    background-color: var(--color-light-brown);
    color: var(--color-white);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
    z-index: 1;
    top: 0;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1rem;
    padding-top: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--color-cream);
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-buttons .btn {
    padding: 0.75rem 3rem;
    font-size: 1rem;
    min-width: 150px;
}

/* Section Styles */
section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--color-white);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--color-red);
}

/* About Section */
.about {
    position: relative;
    background-color: var(--color-brown);
    background-image: url('img/ragazzi-about-us.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    padding: 80px 0;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(61, 40, 23, 0.5), rgba(61, 40, 23, 0.6));
    z-index: 1;
}

.about .container {
    position: relative;
    z-index: 2;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-cream);
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Menu Section */
.menu {
    background-color: var(--color-dark-brown);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.menu-item {
    background-color: var(--color-brown);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.menu-item h3 {
    padding: 1rem;
    text-align: center;
    color: var(--color-white);
    font-size: 1.2rem;
    background-color: var(--color-brown);
}

.menu-subtitle {
    font-size: 1.4rem;
    color: var(--color-white);
    text-align: center;
    margin: 0 0 1.5rem;
}

/* Pizza Menu Table Styles */
.pizza-menu-table-container {
    overflow-x: auto;
    background-color: var(--color-brown);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 48px;
}

.pizza-menu-table-container--compact {
    margin-top: 1.5rem;
}

.pizza-menu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: fixed;
}

.pizza-menu-table th {
    background-color: var(--color-dark-brown);
    color: var(--color-white);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid var(--color-red);
    position: sticky;
    top: 0;
    z-index: 10;
}

.pizza-menu-table th:first-child {
    text-align: left;
    width: 150px;
}

.pizza-menu-table th:nth-child(2) {
    text-align: left;
    width: 300px;
}

.pizza-menu-table th:nth-child(3),
.pizza-menu-table th:nth-child(4),
.pizza-menu-table th:nth-child(5),
.pizza-menu-table th:nth-child(6) {
    width: 100px;
    text-align: center;
}

.pizza-menu-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-cream);
    vertical-align: top;
}

.pizza-menu-table td:nth-child(3),
.pizza-menu-table td:nth-child(4),
.pizza-menu-table td:nth-child(5),
.pizza-menu-table td:nth-child(6) {
    text-align: center;
    vertical-align: middle;
}

.pizza-menu-table--compact {
    table-layout: auto;
}

.pizza-menu-table--compact th:first-child {
    width: auto;
}

.pizza-menu-table--compact th:nth-child(2) {
    width: 140px;
    text-align: center;
}

.pizza-menu-table--compact td:nth-child(2) {
    text-align: center;
    vertical-align: middle;
}

.pizza-menu-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.pizza-menu-table tbody tr:last-child td {
    border-bottom: none;
}

.pizza-name {
    font-weight: 600;
    color: var(--color-white);
    min-width: 150px;
}

.pizza-description {
    font-size: 0.9rem;
    line-height: 1.4;
    min-width: 250px;
}

.pizza-menu-table .price {
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-dark-brown);
    padding: 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Mobile responsive - card layout */
@media (max-width: 767px) {
    .pizza-menu-table-container {
        overflow-x: visible;
    }
    
    .pizza-menu-table thead {
        display: none;
    }
    
    .pizza-menu-table,
    .pizza-menu-table tbody,
    .pizza-menu-table tr,
    .pizza-menu-table td {
        display: block;
        width: 100%;
    }
    
    .pizza-menu-table tr {
        margin-bottom: 1rem;
        background-color: var(--color-dark-brown);
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .pizza-menu-table td {
        border: none;
        padding: 0.5rem 0;
        text-align: left !important;
        vertical-align: middle;
    }
    
    .pizza-name {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
        min-width: auto;
    }
    
    .pizza-description {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        color: var(--color-cream);
        min-width: auto;
        opacity: 0.9;
    }
    
    /* Add labels for sizes */
    .pizza-menu-table:not(.no-before) td:nth-child(3)::before {
        content: "M: ";
        font-weight: 600;
        color: var(--color-white);
        margin-right: 0.5rem;
    }
    
    .pizza-menu-table:not(.no-before) td:nth-child(4)::before {
        content: "L: ";
        font-weight: 600;
        color: var(--color-white);
        margin-right: 0.5rem;
    }
    
    .pizza-menu-table:not(.no-before) td:nth-child(5)::before {
        content: "XL: ";
        font-weight: 600;
        color: var(--color-white);
        margin-right: 0.5rem;
    }
    
    .pizza-menu-table:not(.no-before) td:nth-child(6)::before {
        content: "XXL: ";
        font-weight: 600;
        color: var(--color-white);
        margin-right: 0.5rem;
    }
    
    .pizza-menu-table .price {
        display: inline-block;
        background-color: transparent;
        padding: 0;
        font-size: 0.9rem;
    }
}

/* Location & Hours Section */
.location-hours {
    background-color: var(--color-brown);
}

/* Jobs Section */
.jobs {
    background-color: var(--color-brown);
    padding: 4rem 0;
}

/* Delivery Section */
.delivery {
    background-color: var(--color-brown);
    padding: 4rem 0;
}

.delivery-services {
    text-align: center;
}

.delivery-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.delivery-link {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--color-dark-brown);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.delivery-link:hover {
    background-color: var(--color-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.delivery-link.wolt {
    background-color: #000;
}

.delivery-link.glovo {
    background-color: #ffc107;
    color: #000;
}

.delivery-link.pauza {
    background-color: #ff6b35;
}

/* Responsive styles for delivery section */
@media (max-width: 767px) {
    .delivery {
        padding: 3rem 0;
    }
    
    .delivery-links {
        gap: 1rem;
    }
    
    .delivery-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

.jobs-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.jobs-list h3,
.contact-info h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.jobs-positions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job-position {
    background-color: var(--color-dark-brown);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-red);
}

.job-position h4 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.contact-info {
    background-color: var(--color-dark-brown);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-red);
}

.contact-info p {
    color: var(--color-cream);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info a {
    color: var(--color-cream);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--color-red);
}

.contact-info strong {
    color: var(--color-white);
}

/* Responsive styles for jobs section */
@media (max-width: 767px) {
    .jobs {
        padding: 3rem 0;
    }
    
    .jobs-content {
        gap: 2rem;
    }
    
    .job-position {
        padding: 1rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .jobs-list h3,
    .contact-info h3 {
        font-size: 1.3rem;
    }
}

.location-hours-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.location-info {
    text-align: center;
}

.location-info iframe {
    max-width: 100%;
    margin-bottom: 32px;
}

.address {
    font-size: 1.1rem;
    color: var(--color-cream);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.map-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-green);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
}

.map-link:hover {
    background-color: var(--color-light-green);
}

.hours-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--color-dark-brown);
    border-radius: 5px;
    border-left: 4px solid var(--color-red);
}

.hours-item .day {
    font-weight: 600;
    color: var(--color-white);
}

.hours-item .time {
    color: var(--color-cream);
}

.hours-item .time.closed {
    color: var(--color-red);
    font-weight: 600;
}

/* Contact Section */
.contact {
    background-color: var(--color-dark-brown);
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-item,
.delivery-services,
.social-media {
    text-align: center;
}

.contact-item h3,
.delivery-services h3,
.social-media h3 {
    color: var(--color-white);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-item a {
    display: block;
    color: var(--color-cream);
    text-decoration: none;
    margin: 0.5rem 0;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--color-red);
}

.delivery-links,
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.delivery-link,
.social-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-green);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
}

.delivery-link.misterd {
    background-color: #bc2c3d;
}

.delivery-link.misterd:hover {
    background-color: #a02533;
}

.delivery-link.wolt {
    background-color: #009ddf;
}

.delivery-link.wolt:hover {
    background-color: #0088c4;
}

.delivery-link.glovo {
    background-color: #ffc041;
    color: var(--color-dark-brown);
}

.delivery-link.glovo:hover {
    background-color: #ffb020;
}

.social-link.facebook {
    background-color: #1877f2;
}

.social-link.facebook:hover {
    background-color: #166fe5;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.instagram:hover {
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: var(--color-brown);
    border-radius: 10px;
    max-width: 90%;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-red);
    color: var(--color-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background-color: var(--color-light-red);
    transform: rotate(90deg);
}

.modal-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
}

.modal-info h2 {
    color: var(--color-white);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-info p {
    color: var(--color-cream);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
}

.menu-item {
    cursor: pointer;
}

/* Footer */
.footer {
    background-color: var(--color-dark-brown);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.footer-made-by a,
.footer-made-by a:visited,
.footer-made-by a:hover,
.footer-made-by a:focus,
.footer-made-by a:active {
    color: var(--color-cream);
    text-decoration: none;
}

/* Tablet Styles (768px - 1279px) */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 88px; /* Account for header height on tablet */
    }

    .header {
        background-color: rgba(61, 40, 23, 0.7);
        backdrop-filter: blur(5px);
    }

    .hero-content {
        padding-top: 0;
    }

    .container {
        padding: 0 2rem;
    }

    .logo img {
        height: 80px;
    }

    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        padding: 0;
        gap: 1.5rem;
    }

    .nav-menu a {
        padding: 0.5rem 1rem;
        border-bottom: none;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s ease;
    }

    .nav-menu a:hover {
        background: none;
        border-bottom-color: var(--color-red);
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: row;
        align-items: center;
    }

    .about-text {
        flex: 1;
    }

    .about-text p {
        text-align: left;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location-hours-content {
        flex-direction: row;
        gap: 4rem;
    }

    .location,
    .hours {
        flex: 1;
    }

    .location-info {
        text-align: left;
    }

    .contact-content {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contact-item,
    .delivery-services,
    .social-media {
        flex: 1;
        min-width: 250px;
    }

    .delivery-links,
    .social-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .delivery-link,
    .social-link {
        min-width: 150px;
    }

    .modal-content {
        max-width: 650px;
    }

    .modal-image-container {
        height: 350px;
    }

    .modal-info h2 {
        font-size: 2rem;
    }
}

/* Desktop Styles (1280px+) */
@media (min-width: 1280px) {
    .header {
        background-color: rgba(61, 40, 23, 0.7);
        backdrop-filter: blur(5px);
    }
    .hero-content {
        padding-top: 0;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 3rem;
    }

    .about {
        padding: 120px 0;
    }

    .about p {
        font-size: 1.25rem;
    }

    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .menu-item img {
        height: 250px;
    }

    .modal-content {
        max-width: 700px;
    }

    .modal-image-container {
        height: 400px;
    }

    .modal-info {
        padding: 2.5rem;
    }

    .modal-info h2 {
        font-size: 2.2rem;
    }

    .modal-info p {
        font-size: 1.2rem;
    }

    .location-hours-content {
        gap: 6rem;
    }

    .contact-content {
        gap: 3rem;
    }
}

