:root {
    --bg-light: #fdfdfd;
    --text-dark: #1a1a1a;
    --basque-green: #006e33; /* Traditional Deep Green */
    --iparralde-blue: #004c97; /* Traditional Blue */
    --accent: var(--basque-green);
    --secondary: var(--iparralde-blue);
    --wood: #4e342e;
    --iron: #333333;
    --glass: rgba(255, 255, 255, 0.9);
    --transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --slats: 12;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

h1, h2, h3, .nav-tab {
    font-family: 'Playfair Display', serif;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 1.5rem 2rem;
    transition: background 0.3s, padding 0.3s;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px; 
    transition: filter 0.8s ease; 
    filter: brightness(0); /* Default to Black for Tardeo */
}

body.mode-restaurante .logo img {
    filter: brightness(0) invert(1); /* Force pure White for Taska */
}

.header-partner-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.3s;
}

.egiazki-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    transition: var(--transition);
}

.egiazki-logo-link:hover {
    transform: translateY(-3px) scale(1.05);
}


.header-social-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 10px; /* Consistent 10px gap between all squares */
    align-items: center;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px; /* Matching Egiazki logo exactly */
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 2px; /* Sharper corners to match Egiazki logo */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
    border-color: var(--iparralde-blue);
}

.social-icon {
    width: 45px; /* Increased from 32px for better presence */
    height: 45px;
    transition: 0.3s;
    color: white; /* Default */
}

.social-icons a:hover .social-icon {
    color: var(--iparralde-blue);
}

.egiazki-header {
    display: flex;
    align-items: center;
}

/* Contrast enhancement for different modes */
body.mode-restaurante .social-icons a {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

body.mode-restaurante .social-icon {
    color: white;
}

body.mode-tardeo .social-icons a {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.mode-tardeo .social-icon {
    color: black;
}

/* Removed filters from the whole group as requested */
.header-social-group {
    display: flex;
    align-items: center;
    gap: 10px;
}


.cta-primary {
    background: var(--iparralde-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.3s;
    border-radius: 4px;
}

.cta-primary:hover {
    background: var(--basque-green);
    transform: translateY(-2px);
}

/* Hero & Lenticular - Locked to absolute viewport */
.hero-section {
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.lenticular-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000;
}

/* Dark overlay removed from whole container to apply only to Taska */
.lenticular-container::after {
    display: none;
}

.slat-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.slat {
    flex: 1;
    height: 100%;
    /* Key for continuous image: each slat is 1/slats of the total image width */
    background-size: calc(var(--slats) * 100%) 100%;
    background-repeat: no-repeat;
    /* This formula aligns the background perfectly based on the slat's index */
    background-position: calc(var(--index) * (100% / (var(--slats) - 1))) center;
    width: calc(100% / var(--slats));
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Rotation transition for automatic flip */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(var(--rotate, 0deg));
}

.slat {
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('assets/foto_taska.jpg');
}

.slat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Keep the same sizing for the 'back' image */
    background-size: inherit;
    background-position: inherit;
    background-repeat: no-repeat;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    background-image: url('assets/foto_tardeo.webp');
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
}

#hero-claim {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 10px rgba(0,110,51,0.5); 
    transition: opacity 0.5s ease, color 0.5s ease;
    opacity: 1; /* Match initial load visibility */
}

body.mode-tardeo #hero-claim span {
    color: #1a1a1a;
    text-shadow: none;
}

#hero-claim span {
    font-size: 0.4em;
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 1rem;
    color: inherit; /* Maintain parent color logic */
}

#hero-subtext {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-shadow: none;
    transition: color 0.5s ease;
    color: white; /* Default Taska */
}

body.mode-tardeo #hero-subtext {
    color: #1a1a1a; /* Black for Tardeo */
}

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

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    padding: 0.8rem 1.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.5s ease;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

body.mode-tardeo .btn-outline {
    border-color: #1a1a1a;
    color: #1a1a1a;
    text-shadow: none;
    background: rgba(0,0,0,0.05); /* Black for Tardeo */
}

.btn-outline:hover {
    background: white;
    color: var(--iparralde-blue);
    border-color: var(--iparralde-blue);
    text-shadow: none; /* Removed for better legibility */
}

/* Modals as Side Panels */
dialog {
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0;
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    max-width: 500px;
    margin: 0 0 0 auto; /* Anchor to the right */
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
    display: block; /* Required for transition if not using browser default display */
    pointer-events: none;
}

dialog[open] {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

dialog::backdrop {
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

dialog.wide {
    max-width: 800px;
}

.panel-content {
    padding: 2.5rem 2rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Internal Buttons contrast fix */
dialog .btn-outline {
    background: white;
    border: 2px solid var(--iparralde-blue);
    color: var(--iparralde-blue);
    text-shadow: none;
    display: inline-block;
    width: fit-content;
}

dialog .btn-outline:hover {
    background: var(--iparralde-blue);
    color: white;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    color: var(--iparralde-blue);
}

.premium-note {
    font-style: italic;
    color: var(--accent);
    margin-bottom: 2rem;
}

.info-block {
    margin-bottom: 1.5rem;
}

.info-block h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--iparralde-blue);
}

.concept-text {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.concept-text p {
    margin-bottom: 0.4rem;
}

.premium-link {
    color: var(--iparralde-blue);
    text-decoration: underline;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    margin-left: -0.4rem; /* Balanced alignment */
    transition: 0.3s ease;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid transparent;
}

.premium-link:hover {
    border-color: var(--iparralde-blue);
    background: transparent;
    text-decoration: none;
}

/* 2-Column Menu Layout */
.menus-columns {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.menus-columns .menu-block {
    flex: 1;
}

.menus-columns .menu-block h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom-width: 3px;
}

@media (max-width: 768px) {
    .menus-columns {
        flex-direction: column;
        gap: 2rem;
    }
}

.txuleta-block {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
}

.txuleta-block h2 {
    margin-bottom: 2rem;
}

.txuleta-list-wrapper {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 2rem 0 3rem 0; /* Add bottom margin before note */
}

.txuleta-list {
    margin: 0 !important;
    padding: 0;
    text-align: center;
}

.txuleta-list li {
    font-size: 1.45rem;
    margin-bottom: 2.5rem !important;
    padding-left: 0 !important; /* Reset padding since no bullets */
}

.txuleta-list li::before {
    display: none; /* Remove the custom bullet completely */
}

.txuleta-block .beverage-note {
    width: 100%;
    text-align: center;
}

.dessert-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.dessert-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.dessert-list li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.beverage-note {
    margin-top: 2rem !important;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 1rem;
    font-weight: 600;
}

.menu-disclaimer {
    margin-top: 3rem;
    text-align: center;
    border-top: 2px solid var(--accent);
    padding-top: 1.5rem;
    width: 100%;
}

.partner-block {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-full {
    display: block;
    width: 100%;
    background: var(--iparralde-blue);
    color: white;
    text-align: center;
    padding: 1.2rem;
    text-decoration: none;
    font-weight: 900;
    margin-top: 2rem;
    border-radius: 4px;
}

.secondary-actions {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-link {
    color: var(--iparralde-blue);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    border: 2px solid var(--iparralde-blue);
    border-radius: 4px;
    background: transparent;
    transition: all 0.3s ease;
}

.action-link:hover {
    background: var(--iparralde-blue);
    color: white;
}

.menu-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.menu-block {
    margin: 3rem 0;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

ul {
    list-style: none;
}

li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.egiazki-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Footer */
#main-footer {
    padding: 2rem;
    background: white;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
}

/* Mobile adjustments */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem 1rem;
    }
    
    .mode-toggle {
        gap: 0.5rem;
    }
    
    .nav-tab {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }

    #main-header .cta-primary {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    #mobile-reserve-btn {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        z-index: 1001;
        border-radius: 50px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        padding: 1rem 2rem;
    }

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

    dialog {
        width: 100%;
        max-width: 100%;
    }

    #hero-claim {
        font-size: 2.8rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    .slat {
        transition: opacity 0.3s !important;
    }
}
