/* mehana-stariya-bryast - Modern Web Guidance Rework CSS */
@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-deep: #1e120b;
  --bg: #2a1a12;
  --bg-card: #342116;
  --wood: #3e271a;
  --wood-light: #4e3222;
  --cream: #f4e8d3;
  --cream-paper: #fbf5eb;
  --muted: #c2ad8e;
  --muted-dark: #8c7359;
  
  --red: #b3261e;
  --red-hover: #cb2f26;
  --red-dark: #7a1510;
  
  --gold: #d9a441;
  --gold-light: #eed08d;
  --gold-glow: rgba(217, 164, 65, 0.25);
  
  --line: rgba(217, 164, 65, 0.2);
  --line-dashed: #d4bf9b;
  
  --font-serif: 'Old Standard TT', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}

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

.wrap {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
}

/* Bulgarian Shevitsa Pattern Strip */
.shevitsa {
  height: 20px;
  background:
    linear-gradient(45deg, transparent 35%, var(--red) 35% 65%, transparent 65%) 0 0 / 20px 20px,
    linear-gradient(-45deg, transparent 35%, var(--red) 35% 65%, transparent 65%) 0 0 / 20px 20px,
    radial-gradient(circle, var(--gold) 2.5px, transparent 3px) 10px 10px / 20px 20px;
  background-color: var(--bg-deep);
  border-top: 1px solid rgba(217, 164, 65, 0.3);
  border-bottom: 1px solid rgba(217, 164, 65, 0.3);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--gold);
  color: #1a0f08;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 4px;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  background: var(--red);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--red);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(179, 38, 30, 0.4);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(179, 38, 30, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: none;
}
.btn--outline:hover {
  background: rgba(217, 164, 65, 0.15);
  color: #fff;
}

.btn--sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(42, 26, 18, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: var(--cream);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.logo span {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}

.top nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.top nav a {
  text-decoration: none;
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.top nav a:hover {
  color: var(--gold);
}

.top nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.top nav a:hover::after {
  transform: scaleX(1);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

.drawer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
}

@media (min-width: 840px) {
  .top nav { display: flex; }
  .drawer-toggle { display: none; }
}

/* Mobile Drawer (Native Dialog) */
dialog.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 85vw);
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: 24px 20px;
  background: var(--bg-deep);
  border: none;
  border-right: 3px solid var(--gold);
  color: var(--cream);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

dialog.drawer[open] {
  transform: translateX(0);
}

@starting-style {
  dialog.drawer[open] {
    transform: translateX(-100%);
  }
}

dialog.drawer::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}

dialog.drawer[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog.drawer[open]::backdrop {
    opacity: 0;
  }
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--gold);
  cursor: pointer;
}

.drawer nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer nav a {
  font-family: var(--font-serif);
  font-size: 19px;
  text-decoration: none;
  color: var(--cream);
  padding: 8px 0;
  border-bottom: 1px dashed rgba(217, 164, 65, 0.2);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0 72px;
  background: radial-gradient(ellipse at 50% 30%, rgba(217, 164, 65, 0.16), transparent 70%);
  position: relative;
}

.hero-est {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--gold);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(44px, 10vw, 86px);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-lead {
  max-width: 540px;
  margin-inline: auto;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* Section Headings */
section {
  padding: 68px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head small {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 4px;
}

.section-head h2 {
  font-size: clamp(32px, 6vw, 48px);
}

.section-head .note {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

/* Tavern Menu Board (Cream Parchment) */
.menu-board {
  background: var(--cream-paper);
  color: #2a1a12;
  border-radius: 8px;
  padding: 32px 24px;
  box-shadow: 
    0 0 0 8px var(--wood),
    0 0 0 10px var(--gold),
    0 20px 50px rgba(0, 0, 0, 0.6);
}

@media (min-width: 760px) {
  .menu-board {
    padding: 44px 40px;
  }
}

/* Accessible Tablist */
.menu-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
  border-bottom: 2px solid #dfcfb4;
  scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar { display: none; }

.menu-tab {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #2a1a12;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: #2a1a12;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-tab:hover {
  background: rgba(179, 38, 30, 0.1);
}

.menu-tab[aria-selected="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--cream);
  box-shadow: 0 3px 8px rgba(179, 38, 30, 0.4);
}

/* Menu Panels & Items */
.menu-panel {
  display: none;
}

.menu-panel.active {
  display: block;
}

.menu-panel h3 {
  font-size: 30px;
  color: var(--red-dark);
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.menu-panel h3::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 10px auto 4px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: -16px 0 0 -2px var(--red), 16px 0 0 -2px var(--red);
}

.menu-items-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .menu-items-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 36px;
  }
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-dashed);
}

.menu-item-info {
  flex: 1;
}

.menu-item-info b {
  font-family: var(--font-serif);
  font-size: 19px;
  color: #24140b;
}

.menu-item-info p {
  font-size: 13.5px;
  color: #634f3f;
  margin-top: 2px;
}

.menu-item-pricing {
  flex: none;
  text-align: right;
}

.item-price-eur {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--red-dark);
}

.item-price-bgn {
  display: block;
  font-size: 12px;
  color: #7d6550;
  font-weight: 600;
}

/* Tavern Gallery */
.tavern-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 760px) {
  .tavern-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-card {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--wood);
}

.gallery-card.featured {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

@media (min-width: 760px) {
  .gallery-card.featured {
    grid-row: span 2;
    aspect-ratio: auto;
  }
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

/* Location & Reservation Grid */
.booking-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 800px) {
  .booking-grid {
    grid-template-columns: 1fr 1.25fr;
    gap: 36px;
    align-items: start;
  }
}

.tavern-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.tavern-card h3 {
  font-size: 26px;
  color: var(--gold);
  margin-bottom: 14px;
}

.hours-table {
  display: grid;
  gap: 10px;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(217, 164, 65, 0.15);
  font-size: 15px;
}

.hours-row:last-child {
  border-bottom: none;
}

.tavern-tel {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  display: block;
  margin: 6px 0;
}

/* Reservation Form */
.reservation-form {
  display: grid;
  gap: 16px;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted-dark);
  margin-bottom: 4px;
}

.form-input, .form-select, .form-textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--cream);
  background: var(--bg-deep);
  border: 1px solid #785a42;
  border-radius: 4px;
  padding: 10px 12px;
  min-height: 48px;
  color-scheme: dark;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Modern Web Guidance: deferred invalid */
.form-input:user-invalid, .form-select:user-invalid {
  border-color: #ef4444;
}

.form-error {
  display: none;
  font-size: 12px;
  color: #fca5a5;
  margin-top: 4px;
}

.form-input:user-invalid ~ .form-error {
  display: block;
}

/* Native Modal Dialog (Reservation Receipt) */
dialog.modal {
  margin: auto;
  padding: 0;
  background: transparent;
  border: none;
  max-width: min(520px, calc(100vw - 32px));
  border-radius: 8px;
  color: var(--cream);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overscroll-behavior: contain;
}

dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal-content {
  background: var(--bg-deep);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 32px 28px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 6px;
}

.modal-ticket {
  background: var(--bg-card);
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.ticket-number {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

/* Floating Action Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  background: rgba(30, 18, 11, 0.96);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--gold);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 8px;
  transition: transform 0.25s ease;
}

.bottom-bar.hidden {
  transform: translateY(110%);
}

.bottom-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 3px;
  color: var(--cream);
}

.bottom-bar a.call-btn {
  background: rgba(217, 164, 65, 0.2);
  color: var(--gold);
}

.bottom-bar a.viber-btn {
  background: #7360f2;
}

.bottom-bar a.book-btn {
  background: var(--red);
}

@media (min-width: 840px) {
  body { padding-bottom: 0; }
  .bottom-bar { display: none; }
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

/* closed drawer must not be reachable by keyboard or screen readers */
dialog.drawer:not([open]) { visibility: hidden; }

/* phones: the phone number lives in the bottom bar; keep the header on one line */
@media (max-width: 559px) {
  .top .header-phone { display: none; }
  .top .logo { white-space: nowrap; font-size: 17px; }
  .top .logo span { white-space: nowrap; }
}

/* phones: the booking grid must not grow wider than the screen */
@media (max-width: 799px) { .booking-grid { grid-template-columns: minmax(0, 1fr); } }
.booking-grid > * { min-width: 0; }
.two-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two-cols > *, .form-group { min-width: 0; }
.form-group input, .form-group select, .form-group textarea { min-width: 0; max-width: 100%; }
@media (max-width: 379px) { .two-cols { grid-template-columns: minmax(0, 1fr); } }
