/* 
 * QR Menu System - Complete CSS
 * A comprehensive stylesheet for a multilingual restaurant menu system
 * Featuring language selection, categories, product lists, and product details
 */

/* ===== VARIABLES ===== */
:root {
    /* Color palette based on the forest green theme */
    --deep-forest-green: #245b4e;
    --light-forest-green: #245b4e;
    --accent-gold: #f5d6c2;
    --pure-white: #ffffff;
    --off-white: #f5f5f5;
    --dark-text: #333333;
    --light-text: #f5f5f5;
    /* Spacing variables */
    --space-xs: 4px;
    --space-small: 8px;
    --space-medium: 16px;
    --space-large: 24px;
    --space-xlarge: 32px;
    --space-xxlarge: 48px;
    /* UI elements */
    --border-radius-small: 4px;
    --border-radius: 8px;
    --border-radius-large: 16px;
    --shadow-soft: 0px 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0px 6px 12px rgba(0, 0, 0, 0.3);
    --shadow-hard: 0px 8px 16px rgba(0, 0, 0, 0.4);
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-standard: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat','Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: var(--deep-forest-green);
    background-image: url('../images/bg-texture.png');
    background-size: cover;
    background-attachment: fixed;
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-weight: 700;
    margin-bottom: var(--space-medium);
    line-height: 1.3;
}

h1 {
    font-size: 32px;
    margin-bottom: var(--space-large);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 20px;
    letter-spacing: -0.2px;
}

p {
    margin-bottom: var(--space-medium);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-standard);
}

a:hover {
    text-decoration: underline;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    padding: 0;
    font: inherit;
}

/* ===== ACCESSIBILITY ===== */
:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-to-content:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: var(--space-medium);
    background-color: var(--deep-forest-green);
    color: var(--pure-white);
    z-index: 9999;
    border: 2px solid var(--accent-gold);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-large);
    width: 100%;
}

.page {
    min-height: 100vh;
    padding: var(--space-large) 0;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xlarge);
    padding-bottom: var(--space-medium);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer {
    margin-top: auto;
    padding: var(--space-large) 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ===== LANGUAGE SELECTION PAGE ===== */
.language-selection-page h1 {
    text-align: center;
    margin-top: var(--space-xlarge);
    animation: fadeIn 1s ease;
}

.language-selection-page p {
    text-align: center;
    margin-bottom: var(--space-xlarge);
    font-size: 18px;
    animation: fadeIn 1.2s ease;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-large);
    max-width: 800px;
    margin: 0 auto;
}

.language-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--space-large);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-standard);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    background-color: rgba(255, 255, 255, 0.1);
}

.language-card:active {
    transform: translateY(-2px);
}

.language-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: var(--transition-standard);
}

.language-card:hover::after {
    opacity: 1;
}

.language-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto var(--space-medium);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-standard);
}

.language-card:hover img {
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.language-card h3 {
    margin-bottom: 0;
    transition: var(--transition-standard);
}

.language-card:hover h3 {
    color: var(--accent-gold);
}

/* ===== CATEGORIES PAGE ===== */
.language-selector {
    display: flex;
    align-items: center;
}

.language-btn {
    background-color: rgba(255, 255, 255, 0.1);
    padding: var(--space-small) var(--space-medium);
    border-radius: var(--border-radius);
    transition: var(--transition-standard);
    display: flex;
    align-items: center;
    gap: var(--space-small);
}

.language-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-btn:active {
    transform: scale(0.98);
}

.language-btn img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-large);
}

.category-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;/*200px;*/
    box-shadow: var(--shadow-soft);
    transition: var(--transition-standard);
    cursor: pointer;
}

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

.category-card:active {
    transform: translateY(-2px);
}

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

.category-card:hover img {
    transform: scale(1.05);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-medium);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    transition: var(--transition-standard);
}

.category-card:hover .category-card-content {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding-bottom: var(--space-large);
}

.category-card h3 {
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== PRODUCT LIST PAGE ===== */
.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-small);
    background-color: rgba(255, 255, 255, 0.1);
    padding: var(--space-small) var(--space-medium);
    border-radius: var(--border-radius);
    transition: var(--transition-standard);
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.back-btn:active {
    transform: scale(0.98);
}

.back-btn svg {
    transition: var(--transition-standard);
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-medium);
}

.product-item {
    display: flex;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-standard);
    cursor: pointer;
}

.product-item:hover {
    transform: translateX(5px);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-medium);
}

.product-item:active {
    transform: translateX(2px);
}

.product-item-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

    .product-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition-standard);
        margin: auto;
        text-align: center;
    }

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

.product-item-content {
    flex-grow: 1;
    padding: var(--space-medium);
    display: flex;
    flex-direction: column;
}

.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-small);
    flex-direction:column;
}

.product-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-standard);
    margin-bottom: 0.2rem;
}

.product-item:hover .product-item-name {
    color: var(--accent-gold);
}

.product-item-price {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 18px;
    background-color: #245b4e;
    padding: 10px;
    border-radius: 10px;
}

.product-item-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== PRODUCT DETAILS PAGE ===== */
.product-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xlarge);
}

.product-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-large);
}

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

.product-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--pure-white);
}

.product-price {
    color: var(--accent-gold);
    font-size: 24px;
    font-weight: 700;
}

.product-description {
    line-height: 1.8;
    font-size: 16px;
}

.product-ingredients h3,
.product-allergens h3 {
    margin-bottom: var(--space-small);
    color: var(--accent-gold);
    font-size: 18px;
}

.allergen-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-small);
}

.allergen-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: var(--space-small) var(--space-medium);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition-standard);
}

.allergen-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-small) var(--space-medium);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition-standard);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--dark-text);
}

.btn-primary:hover {
    background-color: #c9a431;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--pure-white);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 14px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 18px;
}

/* Nutritional info styles */
.nutritional-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-small);
}

.nutritional-info-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-small);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
}

.nutritional-info-item .label {
    font-weight: 600;
}

.nutritional-info-item .value {
    color: var(--accent-gold);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-xlarge) 0;
    opacity: 0.7;
}

/* Error styles */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.error-content {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--space-xlarge);
    text-align: center;
    max-width: 600px;
}

.error-details {
    margin: var(--space-large) 0;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.2);
    padding: var(--space-medium);
    border-radius: var(--border-radius-small);
    overflow: auto;
    max-height: 300px;
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 60, 40, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-screen.visible {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    text-align: center;
}

.loading-content p {
    margin-top: var(--space-medium);
    font-size: 18px;
}

/* Nav menu */
.nav-menu {
    width: 100%;
}

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

.menu-toggle {
    display: none;
}

.nav-menu-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-medium);
}

.nav-menu-content nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-large);
}

.nav-menu-content nav ul li a {
    color: var(--pure-white);
    text-decoration: none;
    transition: var(--transition-standard);
}

.nav-menu-content nav ul li a:hover,
.nav-menu-content nav ul li a.active {
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        cursor: pointer;
    }
    
    .menu-icon,
    .menu-icon::before,
    .menu-icon::after {
        content: '';
        position: absolute;
        height: 3px;
        width: 100%;
        background-color: var(--pure-white);
        border-radius: 3px;
        transition: var(--transition-standard);
    }
    
    .menu-icon {
        top: 50%;
        transform: translateY(-50%);
    }
    
    .menu-icon::before {
        top: -8px;
    }
    
    .menu-icon::after {
        bottom: -8px;
    }
    
    .nav-menu-content {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--deep-forest-green);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-xlarge);
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .nav-menu-content.open {
        right: 0;
    }
    
    .nav-menu-content nav {
        width: 100%;
        margin-top: var(--space-xlarge);
    }
    
    .nav-menu-content nav ul {
        flex-direction: column;
        gap: var(--space-medium);
    }
}
