/* ===== CSS Variables ===== */
:root {
    --primary: #9FBDB9;
    --primary-dark: #7DA39F;
    --primary-light: #C5DAD7;
    --primary-lighter: #E8F0EF;
    --secondary: #556E7D;
    --secondary-dark: #3D5260;
    --secondary-light: #7A9AAD;
    --accent: #C4855C;
    --accent-light: #E8B693;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --white: #ffffff;
    --off-white: #FAFBFB;
    --gray-100: #F5F7F7;
    --gray-200: #E8ECEC;
    --gray-300: #D1D8D8;
    --shadow-sm: 0 2px 8px rgba(85, 110, 125, 0.08);
    --shadow-md: 0 4px 20px rgba(85, 110, 125, 0.12);
    --shadow-lg: 0 8px 40px rgba(85, 110, 125, 0.16);
    --shadow-xl: 0 20px 60px rgba(85, 110, 125, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-brand: 'RocknRoll One', sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: linear-gradient(135deg, rgba(196, 133, 92, 0.1), rgba(196, 133, 92, 0.05));
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--secondary-dark);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-header h2 span {
    color: var(--primary-dark);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--secondary);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    position: relative;
}

.loader-inner {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: height var(--transition);
    border-radius: 50%;
}

.navbar.scrolled .nav-logo img {
    height: 40px;
}

.nav-logo-text {
    font-family: var(--font-brand);
    font-size: 1.1rem;
    color: var(--white);
    white-space: nowrap;
}

.navbar.scrolled .nav-logo-text {
    color: var(--secondary-dark);
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    border-radius: 50px;
    transition: all var(--transition);
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--text);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    background: var(--primary-lighter);
    color: var(--secondary-dark);
}

.nav-cta .btn {
    font-size: 0.85rem;
}

.navbar.scrolled .nav-cta .btn-primary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--text);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 40%, var(--primary-dark) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://www.losfogonesdesilvia.es/wp-content/uploads/2023/08/paella-de-marisco-los-fogones-de-silvia.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: blur(2px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(61, 82, 96, 0.4) 100%);
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--primary-light);
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-scroll {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color var(--transition);
}

.hero-scroll a:hover {
    color: var(--white);
}

.hero-scroll i {
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 3;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ===== About ===== */
.about {
    background: var(--white);
}

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

.about-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--secondary-dark);
    line-height: 1.2;
    margin-bottom: 20px;
}

.about-content h2 span {
    color: var(--primary-dark);
    font-style: italic;
}

.about-content > p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 36px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.about-feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-lighter);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.about-feature h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 4px;
}

.about-feature p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Carta / Menu ===== */
.carta {
    background: var(--gray-100);
}

.carta-filter {
    margin-bottom: 40px;
}

.filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 8px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-btn i {
    font-size: 0.8rem;
}

.filter-btn:hover {
    background: var(--gray-100);
    color: var(--text);
}

.filter-btn.active {
    background: var(--secondary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Menu Grid */
.carta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

/* Menu Card */
.menu-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: cardAppear 0.4s ease forwards;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.menu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.menu-card:hover .menu-card-image img {
    transform: scale(1.08);
}

.menu-card-no-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-lighter), var(--gray-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}

.menu-card-body {
    padding: 20px;
}

.menu-card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 12px;
}

.menu-card-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.price-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--primary-lighter);
    border-radius: 50px;
    font-size: 0.8rem;
}

.price-label {
    color: var(--text-muted);
    font-weight: 400;
}

.price-value {
    color: var(--secondary-dark);
    font-weight: 600;
}

.menu-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

/* Allergen Legend */
.allergen-legend {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.allergen-legend h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--secondary-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.allergen-legend h4 i {
    color: var(--accent);
}

.allergen-legend > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.allergen-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.allergen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.allergen-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.allergen-item span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Contact ===== */
.contacto {
    background: var(--white);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contacto-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.contacto-card:hover {
    background: var(--primary-lighter);
    transform: translateX(8px);
}

.contacto-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contacto-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 2px;
}

.contacto-card a {
    font-size: 0.9rem;
    color: var(--text-light);
}

.contacto-card:hover a {
    color: var(--secondary);
}

.contacto-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contacto-map iframe {
    display: block;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 80px;
}

.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding: 40px 0;
}

.footer-brand img {
    height: 60px;
    width: auto;
    border-radius: 50%;
    margin-bottom: 16px;
}

.footer-logo-text {
    font-family: var(--font-brand);
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-links a i {
    font-size: 0.8rem;
    width: 16px;
}

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

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

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 900;
    width: 44px;
    height: 44px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-dark);
    transform: translateY(-3px);
}

/* ===== Animations ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-right"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"] {
    transform: translateX(30px);
}

[data-animate="fade-down"] {
    transform: translateY(-30px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-grid {
        gap: 60px;
    }

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

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

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 4px;
        transition: right var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        color: var(--text);
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--primary-lighter);
        color: var(--secondary-dark);
    }

    .nav-cta {
        margin-top: 16px;
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
        justify-content: center;
    }

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

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

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

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero-scroll {
        display: none;
    }

    .carta-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .filter-wrapper {
        gap: 6px;
        padding: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .filter-btn i {
        display: none;
    }

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

    .allergen-icons {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .menu-card-image {
        height: 180px;
    }

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

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .contacto-card {
        padding: 16px;
    }
}
