/* ============================================
   RISTORANTE FRATELLI D'ITALIA
   Stile Premium - Dark & Moody Calabrese
   ============================================ */

:root {
    --color-bg: #0f0f0f;
    --color-bg-alt: #141414;
    --color-surface: #1a1a1a;
    --color-text: #f0ebe3;
    --color-text-muted: #a39b8f;
    --color-gold: #D4AF37;
    --color-gold-light: #e8c84b;
    --color-terracotta: #C0402B;
    --color-terracotta-dark: #9a3222;
    --color-border: rgba(212, 175, 55, 0.15);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Ticker
   ============================================ */
.ticker {
    background: var(--color-terracotta);
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 1001;
}

.ticker-track {
    display: inline-block;
    animation: ticker 25s linear infinite;
}

.ticker-track span {
    display: inline-block;
    padding: 0 12px;
}

.ticker-track .dot {
    opacity: 0.6;
    font-size: 0.4rem;
    vertical-align: middle;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 36px;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    top: 0;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
}

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

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 4px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: var(--transition);
}

.nav a:hover::after,
.nav a:focus::after {
    width: 100%;
}

.nav a:hover {
    color: var(--color-gold);
}

.btn-nav {
    border: 1px solid var(--color-gold);
    padding: 8px 20px !important;
    border-radius: var(--radius);
    color: var(--color-gold) !important;
}

.btn-nav::after {
    display: none !important;
}

.btn-nav:hover {
    background: var(--color-gold);
    color: var(--color-bg) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

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

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

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

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #1a1209 0%, #2d1f0f 40%, #1a1209 100%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.6) 0%,
        rgba(15, 15, 15, 0.4) 50%,
        rgba(15, 15, 15, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-gold);
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--color-gold);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-block {
    width: 100%;
}

/* ============================================
   Sections general
   ============================================ */
.section {
    padding: 100px 0;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-gold);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ============================================
   Filosofia
   ============================================ */
.filosofia {
    background: var(--color-bg-alt);
}

.filosofia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.filosofia-text p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.filosofia-text strong {
    color: var(--color-text);
    font-weight: 500;
}

.filosofia-text em {
    color: var(--color-gold);
    font-style: italic;
}

.filosofia-text blockquote {
    margin-top: 32px;
    padding: 24px 28px;
    border-left: 2px solid var(--color-gold);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-text);
    background: rgba(212, 175, 55, 0.04);
}

.filosofia-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1a1209 0%, #2d1f0f 100%);
    aspect-ratio: 3 / 4;
    min-height: 400px;
}

.filosofia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.filosofia-image:hover img {
    transform: scale(1.03);
}

.filosofia-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   Menu
   ============================================ */
.menu-section {
    background: var(--color-bg);
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 10px 24px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    font-family: var(--font-body);
}

.tab-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-text);
}

.tab-btn.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-bg);
    font-weight: 600;
}

.tab-panel {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

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

.dish {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dish-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.dish-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.dish-line {
    flex: 1;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.15);
    position: relative;
    top: -4px;
}

.dish-price {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-gold);
    white-space: nowrap;
}

.dish-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ============================================
   Galleria
   ============================================ */
.galleria {
    background: var(--color-bg-alt);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    background: linear-gradient(135deg, #1a1209 0%, #2d1f0f 100%);
    min-height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 15, 0.8), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

/* ============================================
   Prenotazione
   ============================================ */
.prenotazione {
    background: var(--color-bg);
}

.prenotazione-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.prenotazione-info p {
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-list li strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gold);
    font-weight: 500;
}

.info-list li a {
    color: var(--color-text);
    border-bottom: 1px solid transparent;
    display: inline-block;
    width: fit-content;
}

.info-list li a:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.prenotazione-form {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    padding: 12px 14px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-gold);
    background: rgba(255, 255, 255, 0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23a39b8f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-group select option {
    background: var(--color-surface);
    color: var(--color-text);
}

.form-message {
    margin-top: 16px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 24px;
}

.form-message.success {
    color: #7dbd7d;
}

.form-message.error {
    color: var(--color-terracotta);
}

/* ============================================
   Mappa
   ============================================ */
.mappa iframe {
    display: block;
    width: 100%;
    filter: grayscale(60%) invert(12%) contrast(1.1);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #0a0a0a;
    padding: 80px 0 32px;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand .logo-main {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-gold);
    display: block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-gold);
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-links a,
.footer-links p {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--color-text-muted);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-gold);
    margin-bottom: 16px;
}

.modal-content p {
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.modal-details {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 20px 0;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-text);
}

.modal-details strong {
    color: var(--color-gold);
    font-weight: 500;
}

.modal-note {
    font-size: 0.85rem;
    margin-bottom: 24px !important;
}

/* ============================================
   Animations
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .filosofia-grid,
    .prenotazione-grid {
        gap: 48px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.4s ease;
        border-left: 1px solid var(--color-border);
        z-index: 1001;
    }

    .nav.open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .filosofia-grid,
    .prenotazione-grid {
        grid-template-columns: 1fr;
    }

    .filosofia-image {
        order: -1;
        max-height: 360px;
    }

    .section {
        padding: 64px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 140px;
    }

    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 48px;
    }

    .prenotazione-form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .ticker {
        font-size: 0.65rem;
        padding: 6px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }

    .gallery-item.large,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}
