:root {
    --primary-color: #FFD1DC; /* Pastel Pink */
    --secondary-color: #FFF0F5; /* Lavender Blush */
    --accent-color: #8D6E63; /* Warm Brown */
    --text-color: #5D4037; /* Darker Brown for text */
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(141, 110, 99, 0.15);
    --transition: all 0.3s ease;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #F8BBD0;
        --secondary-color: #3E2723;
        --accent-color: #D7CCC8;
        --text-color: #EFEBE9;
        --white: #4E342E;
        --shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        --navbar-bg: rgba(62, 39, 35, 0.95);
    }
    
    .hero {
        background: linear-gradient(rgba(62, 39, 35, 0.8), rgba(62, 39, 35, 0.9)), url('hero-bg.png') !important;
        background-size: cover !important;
        background-position: center !important;
    }

    img, .gallery-real-img {
        filter: brightness(0.9);
    }
}

/* 1. ROBUST RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    forced-color-adjust: none;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    word-wrap: break-word; /* Prevent long text overflow */
    line-height: 1.2;
}

/* 2. FLUID CONTAINER */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* UI Elements */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #6d4c41;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    flex-shrink: 0;
}

.logo i {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px; /* Touch target */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 5px auto;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(255, 209, 220, 0.6), rgba(255, 255, 255, 0.8)), url('hero-bg.png'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 70px; 
    padding-bottom: 50px; /* Space for content on small screens */
}

.hero-content {
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem); /* Fluid typography */
    margin-bottom: 20px;
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 30px;
    padding: 0 10px;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 40px;
    position: relative;
    display: table; /* Centers better than inline-block with transforms sometimes */
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.bg-alt {
    background-color: var(--white);
}

.card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%; /* For uniform height in grid */
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
}

/* 3. MOBILE FIRST GRIDS */
.menu-grid, .gallery-grid {
    display: grid;
    /* Defaults to strict single column for safety on tiny screens if fr is too small, 
       but minmax(260px) usually wraps to single column on < 560px anyway. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Specific checks for very small screens */
@media (max-width: 350px) {
    .menu-grid, .gallery-grid {
        grid-template-columns: 1fr; /* Force 1 column */
    }
}

.menu-item {
    text-align: center;
}

.menu-img {
    height: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-color);
}

.menu-item h3 {
    margin-bottom: 10px;
}

.price {
    display: block;
    margin-top: auto; /* Push to bottom */
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding-top: 15px;
}

.gallery-real-img, .gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.faq-item {
    margin-bottom: 20px;
    cursor: pointer;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Prevent text touching icon */
}

.faq-question h3 {
    font-size: 1.1rem;
    text-align: left;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Safer large height */
    margin-top: 15px;
    opacity: 1;
}

.faq-item.active i {
    transform: rotate(180deg);
}

/* Footer */
.footer {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 30px 0 20px; /* Reduced from 50px */
}

.footer-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Reduced gap */
    margin-bottom: 20px;
}

.footer-col {
    flex: 1 1 250px; /* Grow, shrink, base width */
    text-align: center;
}

.footer h3 {
    color: var(--white);
    margin-bottom: 10px;
}

.social-links a {
    font-size: 1.8rem; /* Increased from 1.5rem */
    margin: 0 10px;
    color: var(--white); /* Changed from primary-color for better visibility */
    transition: var(--transition);
    display: inline-block;
    padding: 10px; /* Touch target */
    opacity: 0.9;
}

.social-links a:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

/* Menu Page Specifics */
.page-header {
    background-color: var(--white);
    text-align: center;
    padding-top: 120px;
    padding-bottom: 40px;
}

.menu-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-filter {
    background-color: var(--white);
    color: var(--text-color);
    border: 2px solid var(--accent-color);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
}

.btn-filter.active, .btn-filter:hover {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

@media (prefers-color-scheme: dark) {
    .btn-filter.active, .btn-filter:hover {
        color: #3E2723; 
    }
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1001;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Forced Colors Active */
@media (forced-colors: active) {
    .btn, .whatsapp-btn, .btn-filter {
        border: 2px solid ButtonText;
    }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

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

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--navbar-bg);
        width: 100%;
        text-align: center;
        padding: 40px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transition: 0.3s;
        height: calc(100vh - 70px); /* Full height of remaining viewport */
        overflow-y: auto; /* Allow scrolling in menu if long */
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 15px 0;
        font-size: 1.2rem;
    }

    .footer {
        padding: 20px 0 10px; /* Very compact on mobile */
    }

    .footer-content {
        flex-direction: column;
        gap: 15px; /* Minimal gap */
        margin-bottom: 15px;
    }

    .social-links a {
        font-size: 1.5rem; /* Scale down icons slightly for mobile propotion */
        margin: 0 8px;
    }
}

/* Animations */
.bounce-in {
    animation: bounceIn 1s;
}

@keyframes bounceIn {
    0% { transform: scale(0.1); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 1.5s;
}

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