:root {
    --bg: #faf9f6;
    --surface: #ffffff;
    --text: #1f2933;
    --muted: #5f6c7b;
    --primary: #0f4c81;
    --primary-2: #2d7fb8;
    --accent: #d4a017;
    --dark: #0c2233;
    --border: #e6e9ed;
    --touch-min: 44px;
    /* Google Maps–style “Order online” pill */
    --order-online-bg: #c4ebf2;
    --order-online-fg: #006071;
    --order-online-bg-hover: #b0e3ed;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

@supports (-webkit-text-size-adjust: 100%) {
    html {
        -webkit-text-size-adjust: 100%;
    }
}

@supports (text-size-adjust: 100%) {
    html {
        text-size-adjust: 100%;
    }
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-image: url("../images/greek_island_background.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

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

.container {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top);
}

.nav-inner {
    min-height: 56px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
}

.nav-order-cta.btn-order-online {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin: 6px 0 4px;
}

.logo {
    grid-column: 1;
    grid-row: 1;
    font-weight: 800;
    font-size: clamp(1.1rem, 4vw, 1.25rem);
    color: var(--dark);
    padding: 8px 0;
}

.logo span {
    color: var(--accent);
}

.nav-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: var(--touch-min);
    height: var(--touch-min);
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--dark);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 3px;
    border-radius: 1px;
    background: currentColor;
}

.nav-links {
    grid-column: 1 / -1;
    grid-row: 3;
}

.btn-order-online {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: var(--touch-min);
    padding: 0.5rem 1.15rem;
    border-radius: 9999px;
    background: var(--order-online-bg);
    color: var(--order-online-fg);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, filter 0.15s ease;
}

.btn-order-online:hover {
    background: var(--order-online-bg-hover);
    color: var(--order-online-fg);
}

.btn-order-online:focus-visible {
    outline: 2px solid var(--order-online-fg);
    outline-offset: 2px;
}

.btn-order-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.menu {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu a {
    color: var(--muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-min);
    padding: 6px 2px;
}

.menu a.active,
.menu a:hover {
    color: var(--primary);
}

@media (min-width: 769px) {
    .nav-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: center;
        column-gap: 16px;
        min-height: 72px;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
    }

    .nav-order-cta.btn-order-online {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        margin: 0;
    }

    .nav-toggle {
        display: none !important;
    }

    .nav-links {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        display: block !important;
        margin-top: 0;
        padding: 0;
        border-top: none;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        padding: 4px 0 12px;
        margin-top: 4px;
        border-top: 1px solid var(--border);
    }

    .nav.nav-open .nav-links {
        display: block;
    }

    .menu {
        flex-direction: column;
        gap: 0;
    }

    .menu li {
        border-bottom: 1px solid var(--border);
    }

    .menu li:last-child {
        border-bottom: none;
    }

    .menu a {
        display: flex;
        width: 100%;
        padding: 12px 4px;
    }
}

.hero {
    padding: clamp(48px, 10vw, 88px) 0 clamp(40px, 8vw, 72px);
    background: transparent;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 26px;
    align-items: center;
}

.eyebrow {
    color: var(--primary-2);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

h1 {
    font-size: clamp(1.75rem, 5vw, 3.4rem);
    line-height: 1.1;
    margin: 8px 0 14px;
}

p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 16px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-min);
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

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

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

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(18px, 4vw, 24px);
    box-shadow: 0 12px 40px rgba(12, 34, 51, 0.08);
}

.hero-card h3 {
    margin-top: 0;
}

.section {
    padding: clamp(40px, 8vw, 68px) 0;
}

.section h2 {
    margin-top: 0;
    font-size: clamp(1.35rem, 4vw, 2.2rem);
}

.stats {
    background: var(--dark);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin-bottom: 5px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: clamp(16px, 3vw, 18px);
}

.card-oregano {
    background-image: url("../images/oregano.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-oregano h3,
.card-oregano p {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.card-red-wine-salad {
    background-image: url("../images/red_wine_and_salad_on_table.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-red-wine-salad h3,
.card-red-wine-salad p {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.card-white-wine {
    background-image: url("../images/white_wine_on_table.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-white-wine h3,
.card-white-wine p {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.card a {
    overflow-wrap: anywhere;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.about-visit {
    margin-top: 2.5rem;
}

.about-visit h2 {
    margin-top: 0;
}

.about-visit-lead {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

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

.about-visit-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--dark);
}

.about-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.55;
}

.about-list li {
    margin-bottom: 0.35rem;
}

.about-visit-note {
    margin: 0;
}

.menu-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

/* Section switcher: multi-row grid on phones; flex strip from tablet up */
.menu-section-tabs {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
    gap: 6px 8px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

.menu-tab {
    appearance: none;
    margin: 0;
    padding: 8px 6px;
    min-height: 44px;
    font: inherit;
    font-weight: 600;
    font-size: clamp(0.72rem, 3.2vw, 0.82rem);
    line-height: 1.25;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    white-space: normal;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .menu-section-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        row-gap: 4px;
        padding-bottom: 1px;
        column-gap: 6px;
    }

    .menu-tab {
        flex: 0 0 auto;
        width: auto;
        padding: 10px 9px;
        font-size: clamp(0.8rem, 2.4vw, 0.88rem);
        white-space: nowrap;
        border-radius: 8px 8px 0 0;
        border-bottom: none;
        margin: 0 0 -1px 0;
    }

    .menu-tab:not(.is-active) {
        border-color: transparent;
    }
}

.menu-tab:hover {
    color: var(--text);
    background: rgba(15, 76, 129, 0.06);
}

.menu-tab.is-active {
    color: var(--primary);
    background: var(--surface);
    border-color: var(--border);
    border-bottom-color: var(--surface);
    box-shadow: 0 1px 0 var(--surface);
}

.menu-tab:focus-visible {
    outline: 2px solid var(--primary-2);
    outline-offset: 2px;
}

.menu-panels {
    min-width: 0;
}

/* Wrapper hides reliably on iOS/WebKit; inner .menu-list keeps grid (avoid grid + [hidden] on one node). */
.menu-tab-panel[hidden] {
    display: none !important;
}

.menu-tab-panel > .menu-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

/* Desktop / tablet landscape: two columns so cards sit side by side; phones stay one column above */
@media (min-width: 768px) {
    .menu-tab-panel > .menu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* Keep section tabs visible while scrolling on phones (below sticky header). */
@media (max-width: 767px) {
    .menu-section-tabs {
        position: sticky;
        z-index: 40;
        top: var(--menu-sticky-tabs-top, calc(env(safe-area-inset-top, 0px) + 7.5rem));
        margin-top: -4px;
        padding-top: 10px;
        padding-bottom: 4px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
    }

    .menu-tab {
        overflow-wrap: break-word;
    }

    .menu-tab.is-active {
        border-color: var(--primary);
        box-shadow: none;
    }
}

.menu-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.menu-section-title {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
}

.menu-item-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.menu-item-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
}

.menu-item-header span:first-child {
    word-break: break-word;
    hyphens: auto;
}

.footer {
    --footer-inner-gap: 0.45rem;
    --footer-block-padding: 24px;
    flex-shrink: 0;
    margin-top: 34px;
    padding: var(--footer-block-padding) 0 max(34px, env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

/* Same structure on every page: fixed vertical rhythm so footer height is consistent */
.footer-grid > div {
    display: flex;
    flex-direction: column;
    gap: var(--footer-inner-gap);
    min-height: 0;
}

.footer .footer-grid p {
    margin: 0;
}

.footer .footer-grid .logo {
    margin: 0;
    line-height: 1.25;
}

.footer .footer-grid .small {
    line-height: 1.5;
}

.footer .footer-grid strong {
    font-weight: 700;
    color: var(--text);
}

@media (min-width: 901px) {
    .footer-grid {
        min-height: 9.25rem;
    }
}

.footer a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.small {
    font-size: 0.92rem;
}

.mt-1 {
    margin-top: 12px;
}

.mt-2 {
    margin-top: 18px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hero-grid,
    .split,
    .cards,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .menu-item-layout {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .menu-item-image {
        width: 72px;
        height: 72px;
        justify-self: start;
    }

    .menu-item-header {
        flex-wrap: wrap;
    }
}

/* iOS: avoid input zoom on focus (keep ≥16px on small viewports) */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px;
    }
}

.admin-hidden {
    display: none;
}

.admin-auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.admin-form label,
.admin-form-grid label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: var(--text);
}

.admin-form input,
.admin-form-grid input,
.admin-form-grid textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font: inherit;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-full {
    grid-column: 1 / -1;
}

.admin-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.admin-items-list {
    display: grid;
    gap: 12px;
}

.admin-item-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.admin-row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-error {
    color: #aa0015;
    min-height: 1.2em;
}

.admin-item-thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}
