/* ===== Variables CSS ===== */
:root {
    --color-primary: #D32F2F;
    --color-primary-dark: #B71C1C;
    --color-secondary: #FFC107;
    --color-dark: #1A1A1A;
    --color-light: #FAFAFA;
    --color-cream: #FFF8E1;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* ===== Reset i Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Tipografia ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--color-primary-dark);
}

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

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--color-primary);
}

.btn-instagram {
    background-color: #E1306C;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-instagram:hover {
    background-color: #C13584;
    color: white;
    transform: translateY(-2px);
}

/* ===== Header & Navegació ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand a {
    color: white;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-link:hover {
    color: var(--color-secondary);
}

/* Language Selector */
.lang-selector {
    display: flex;
    gap: 5px;
    margin-left: 1rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.7);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.lang-btn.active {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-dark);
}

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

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(5px);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23D32F2F" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 30px; }
}

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

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ===== Sobre Nosaltres ===== */
.about {
    background-color: var(--color-cream);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.about-features {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-weight: 500;
}

.about-image {
    position: relative;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.image-placeholder span {
    font-size: 6rem;
    display: block;
    margin-bottom: 1rem;
}

.image-placeholder p {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

/* ===== Menú / Carta ===== */
.menu {
    background-color: var(--color-light);
}

.menu-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 28px;
    border: 2px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--color-primary);
    color: white;
}

.menu-category {
    display: none;
}

.menu-category.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.menu-item h3 {
    color: var(--color-dark);
    font-size: 1.2rem;
}

.price {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.menu-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== Galeria ===== */
.gallery {
    background-color: var(--color-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 1;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gallery-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.gallery-placeholder p {
    font-weight: 500;
    color: var(--color-text-light);
}

.gallery-item:hover .gallery-placeholder {
    transform: scale(1.05);
}

.gallery-cta {
    text-align: center;
}

.gallery-cta p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* ===== Contacte ===== */
.contact {
    background-color: var(--color-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

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

.info-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.info-card p {
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.info-note {
    font-size: 0.85rem;
    color: var(--color-text-light) !important;
    margin-top: 0.5rem !important;
}

.schedule p {
    margin-bottom: 0.25rem;
}

.social-link {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 500;
}

.contact-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contact-map iframe {
    display: block;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--color-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
}

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

.footer-contact p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: rgba(255,255,255,0.7);
}

.footer-contact a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-dark);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

    .lang-selector {
        margin-left: 0;
        margin-top: 1rem;
    }

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

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .menu-categories {
        flex-direction: column;
        align-items: center;
    }

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

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

    .about-features {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Estils per a Imatges ===== */
.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

.nav-brand a {
    display: flex;
    align-items: center;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

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

/* ===== Hero Logo ===== */
.hero-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* ===== Footer Logo ===== */
.footer-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 10px;
}

/* ===== Menu Extras ===== */
.submenu-title {
    text-align: center;
    margin: 2rem 0 1.5rem;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.menu-note {
    text-align: center;
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 10px;
}

.menu-footer {
    text-align: center;
    margin-top: 3rem;
    font-style: italic;
    color: var(--color-text-light);
}

/* ===== Responsive Improvements ===== */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 200px;
    }

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

    .about-img {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 160px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .nav {
        padding: 0.75rem 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-logo {
        width: 35px;
        height: 35px;
    }

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

    .menu-item {
        padding: 1rem;
    }

    .menu-item h3 {
        font-size: 1rem;
    }

    .info-card {
        padding: 1rem;
    }

    .info-icon {
        font-size: 2rem;
    }
}

/* ===== Al·lèrgens ===== */
.allergen-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.allergen-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: #f0f0f0;
    line-height: 1;
    position: relative;
}

.allergen-badge:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-dark);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 400;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 6px;
    pointer-events: none;
    box-shadow: var(--shadow-sm);
}

.allergen-legend {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.allergen-legend h4 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.allergen-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.allergen-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}
