/* ===== global.css - NOVÉ FONTY (Poppins) ===== */

/* 1. Hlavní text (Váha 400) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Poppins-Regular.ttf') format('truetype');
}

/* 2. Zvýraznění - Ceny, Tlačítka (Váha 600) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Poppins-SemiBold.ttf') format('truetype');
}

/* 3. Nadpisy (Váha 700) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Poppins-Bold.ttf') format('truetype');
}

:root {
  --sticky-top: 56px; 
}

* { margin:0; padding:0; box-sizing:border-box; }

/* === APLIKACE FONTŮ === */

/* Základ pro celý web - definujeme jen JEDNOU */
body { 
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    background: #fafafa; 
    color: #333; 
    line-height: 1.6;
}

/* Nadpisy - Tučné (Bold 700) */
h1, h2, h3, h4, h5, h6, 
.hero-text h1, 
.logo h1,
#restaurant-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Navigace, Tlačítka, Ceny - Polotučné (SemiBold 600) */
nav ul li a, 
button, 
.btn, 
.price, 
.filter-label,
.menu-item h3 {
    font-weight: 600;
}

/* Popisky jídel a běžný text - Regular (400) */
p, 
.menu-item p,
.review-content p {
    font-weight: 400;
}
/* === HEADER (Fixed, Z-Index snížen) === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  
  /* Fixed pozice - plave nad obsahem */
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  
  /* SNÍŽENO z 1000 na 100, aby byl pod modaly */
  z-index: 101; 
  
  /* Výchozí stav: Průhledná s tmavým přechodem nahoře pro čitelnost */
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  box-shadow: none;
  
  flex-wrap: wrap;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stav při scrollovaní (přidáno přes JS třídou .scrolled) */
header.scrolled {
  background: rgba(255, 255, 255, 0.98); /* Bílá */
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding-top: 10px;
  padding-bottom: 10px;
  backdrop-filter: blur(10px);
}

/* Logo */
header .logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

header .logo h1 { 
  font-size: 1.8rem; 
  margin: 0;
  transition: color 0.3s ease;
  color: #fff; /* Bílá nahoře */
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header.scrolled .logo h1 {
  color: var(--primary-color); /* Barevná při scrollu */
  text-shadow: none;
}

/* Header Info (Telefon atd.) */
.header-info {
  display: flex;
  flex-direction: column;
  gap: 2px; /* Změna z 8px na 2px - přisune řádky k sobě */
  text-align: center;
  flex: 1;
  justify-content: center;
  align-items: center;
  min-width: 200px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.contact-info {
  font-size: 0.9rem; /* O chlup menší písmo pro eleganci */
  font-weight: 500;
  position: relative;
  cursor: pointer;
  padding: 2px 10px; /* Menší padding, aby nebyly tak vysoké */
  border-radius: 12px;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  line-height: 1.2; /* Menší řádkování */
}
/* === UNIVERZÁLNÍ IKONY (System) === */
.theme-icon {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.95); /* Bílá v horním headeru */
  transition: color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 5px; /* Malý odstup od textu */
  margin-bottom: 2px; /* Optické zarovnání na střed řádku */
}

/* Po scrollnutí hlavičky - theme barva */
header.scrolled .theme-icon {
  color: var(--primary-color);
}

/* Hover efekt na rodiče (odkaz, kontakt) */
.contact-info:hover .theme-icon,
.nav-link:hover .theme-icon,
a:hover .theme-icon {
  transform: scale(1.1);
}

header.scrolled .contact-info:hover .theme-icon {
  color: var(--primary-color);
}

/* Varianty velikostí */
.theme-icon.icon-sm { width: 16px; height: 16px; }
.theme-icon.icon-md { width: 20px; height: 20px; }
.theme-icon.icon-lg { width: 24px; height: 24px; }

/* Ikony v patičce (vždy theme color) */
footer .theme-icon {
  color: var(--primary-color);
}

/* Ikony v tlačítkách */
button .theme-icon,
.btn .theme-icon {
  color: currentColor; 
}


header.scrolled .contact-info {
  color: #555; /* Tmavá při scrollu */
  text-shadow: none;
}

.contact-info:hover {
  background: color-mix(in srgb, var(--primary-color) 20%, transparent);
  color: #fff;
}
header.scrolled .contact-info:hover {
  color: var(--primary-color);
}

.contact-info .admin-edit-icon {
  opacity: 0;
  font-size: 0.8rem;
  margin-left: 8px;
  transition: opacity 0.3s ease;
}
.admin-mode .contact-info .admin-edit-icon { opacity: 0.7; }
.contact-info:hover .admin-edit-icon { opacity: 1; }

/* Logika pro SKRYTÉ položky */
/* 1. Pro veřejnost (header NEMÁ třídu admin-mode): úplně skrýt */
header:not(.admin-mode) .contact-info[data-visible="false"] {
  display: none !important;
}

/* 2. Pro Admina (header MÁ třídu admin-mode): zobrazit průhledně */
header.admin-mode .contact-info[data-visible="false"] {
  display: flex !important;
  opacity: 0.4;
  text-decoration: line-through; /* Přeškrtnutí pro vizuální kontrolu */
  filter: grayscale(1);
}

/* Navigace */
header nav ul { 
  list-style: none; 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  align-items: center;
}

header nav ul li a, header nav ul li button { 
  text-decoration: none; 
  font-weight: 600; 
  transition: all 0.3s ease; 
  
  /* Styl tlačítek nahoře (průhledné s jemným obrysem) */
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(4px);
  
  cursor: pointer; 
  padding: 8px 16px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

/* Styl tlačítek při scrollu (čisté bez pozadí) */
header.scrolled nav ul li a, header.scrolled nav ul li button {
  background: transparent;
  border-color: transparent;
  color: #333;
  backdrop-filter: none;
}

header nav ul li a:hover, header nav ul li button:hover {
  background: #fff;
  color: var(--primary-color);
  transform: translateY(-2px);
}

header.scrolled nav ul li a:hover, header.scrolled nav ul li button:hover {
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
  color: var(--primary-color);
}

/* Tlačítka rozvozu v hlavičce */
.delivery-buttons-desktop .delivery-btn {
  box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
  border: none !important;
}

/* --- ÚPRAVA HERO SEKCE (Aby nebyla schovaná pod hlavičkou) --- */
/* Hero sekce Mobile */
.hero { 
  padding: 100px 20px 20px;
  margin-bottom: 0 !important; /* Odstraní šedou mezeru */
}

#main-hero {
  min-height: 450px; /* Menší výška na mobilu */
  margin-bottom: 0 !important;
}

/* --- ADMIN BAR --- */
#admin-bar {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: bold;
  
  /* Z-INDEX: Musí být nad headerem (100), ale pod modaly (20000) */
  z-index: 900; 
  
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  position: relative;
  margin-top: 80px; /* Odsazení od vrchu, aby nebyl pod fixed headerem */
}

.admin-action-btn {
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  font-family: inherit;
  line-height: 1.4;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-decoration: none;
}
.admin-action-btn:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Floating Add Button */
#floating-add-btn {
  position: fixed;
  bottom: 30px; 
  right: 30px;
  width: 60px; 
  height: 60px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 30%, transparent);
  transition: all 0.3s ease;
  z-index: 90;
  border: none;
  
  /* ZMĚNA: Vypneme flexbox na rodiči, aby neinterferoval */
  display: block; 
  padding: 0;
}

#floating-add-btn .plus-icon {
  /* ZMĚNA: Absolutní pozice "natvrdo" doprostřed */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -53%); /* -53% je drobná optická korekce pro vertikální střed písma */
  
  font-size: 36px;
  font-family: Arial, Helvetica, sans-serif; /* Bezpečný systémový font */
  font-weight: 400;
  line-height: 1;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  display: block;
}

#floating-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 40%, transparent);
  background: color-mix(in srgb, var(--primary-color) 90%, black);
}

#floating-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 40%, transparent);
  background: color-mix(in srgb, var(--primary-color) 90%, black);
}

/* --- SECTIONS --- */
/* --- HERO BACKGROUND LOGIC --- */
/* Základní nastavení pro okamžité zobrazení miniatury z inline stylu */
.hero {
  position: relative;
  /* ŽÁDNÁ výchozí barva - vše řeší inline style */
  
  background-position: var(--bg-pos-x, 50%) var(--bg-pos-y, 50%);
  background-size: var(--bg-size, 100%);
  background-repeat: no-repeat;
  
  transition: background-image 0.1s linear; 
  overflow: hidden;
}

/* Jakmile JS načte velký obrázek, přepneme na něj */
.hero.hero-loaded {
  background-image: var(--bg-full) !important;
  /* Prolnutí mezi miniaturou a velkým obrázkem */
  transition: background-image 0.4s ease-in-out;
}

#menu, #informace, #mapa, #admin { 
  padding: 50px 20px; 
  text-align: center; 
}
#menu h2, #informace h2, #mapa h2, #admin h2, #admin h3 { 
  margin-bottom: 30px; 
  font-size: 2rem; 
}

/* --- FOOTER --- */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 30px 20px 20px;
  margin-top: 50px;
}
.footer-content { margin-bottom: 20px; }
.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}
.footer-contact p {
  font-size: 0.85rem;
  margin-bottom: 4px;
  opacity: 0.9;
  line-height: 1.4;
}
.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 15px;
  margin-top: 20px;
}
.footer-bottom p {
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0;
}

/* --- MODALS (General - Z-Index MAX) --- */
.modal, .login-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex; justify-content: center; align-items: center;
  
  /* ZVÝŠENO na maximum, aby byly vždy nahoře */
  z-index: 20000 !important; 
  
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  max-width: 90vw; 
  max-height: 90vh;
  width: auto;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: auto;
  
  /* Vycentrování na mobilu */
  margin: 0 auto;
}
.modal-content img { 
  max-width: 100%; max-height: 70vh; 
  border-radius: 10px; margin: 15px 0; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-content .close { 
  position: absolute; top: 15px; right: 20px; 
  cursor: pointer; font-size: 28px; color: #999;
  transition: color 0.3s ease; font-weight: bold; line-height: 1;
}
.modal-content .close:hover { color: var(--primary-color); }
.image-loader { color: #666; font-style: italic; padding: 20px; font-size: 0.9rem; }

/* --- LOGIN MODAL --- */
.login-modal {
  /* definováno výše s .modal */
  animation: loginFadeIn 0.3s ease forwards;
  padding: 0 20px; /* Přidáno: padding pro mobil */
}
.login-modal-content {
  background: #ffffff; border-radius: 20px; padding: 35px 40px;
  max-width: 400px; width: 90%;
  margin: 0 auto; /* Přidáno: vycentrování */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center; position: relative;
  animation: loginSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.login-modal-close {
  position: absolute; top: 15px; right: 20px;
  font-size: 28px; color: #aaa; cursor: pointer;
}
.login-modal-close:hover { color: #333; transform: rotate(90deg); }
/* ikona pro admin mod */
.login-icon {
  font-size: 48px; line-height: 1; margin-bottom: 20px;
  animation: loginIconBreathe 2.5s ease-in-out infinite;
  color: var(--primary-color);
}
.login-modal-content h3 { margin: 0 0 10px 0; font-size: 1.6rem; color: #333; }
.login-modal-content p { margin: 0 0 25px 0; color: #666; font-size: 0.95rem; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
#admin-login-password {
  padding: 14px 18px; border: 2px solid #ddd; border-radius: 10px;
  font-size: 1rem; text-align: center;
}
#admin-login-password:focus {
  outline: none; border-color: var(--primary-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 20%, transparent);
}
.login-submit-btn {
  padding: 14px; border: none; border-radius: 10px;
  background: var(--primary-color); color: white;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all 0.3s ease;
}
.login-submit-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.login-error-message {
  color: #dc3545; font-weight: 600; font-size: 0.9rem !important;
  margin-top: 15px !important; animation: loginShake 0.5s ease;
}

@keyframes loginFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes loginSlideIn { from { transform: translateY(50px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes loginIconBreathe { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }
@keyframes loginShake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); } 20%, 40%, 60%, 80% { transform: translateX(8px); } }

/* Admin Edit - Helpers */
.admin-mode #map-address-display {
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
  border: 1px dashed transparent; transition: all 0.3s ease; position: relative;
}
.admin-mode #map-address-display:hover {
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
  border-color: var(--primary-color);
}
.admin-mode .admin-editable {
  position: relative; cursor: pointer; transition: all 0.3s ease;
  padding: 4px 8px; border-radius: 4px; border: 1px dashed transparent;
}
.admin-mode .admin-editable:hover {
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
  border-color: var(--primary-color);
}

/* --- ADMIN MODE GLOBAL INDICATOR --- */
.admin-mode-indicator {
  position: fixed; 
  bottom: 20px; 
  left: 50%; 
  transform: translateX(-50%);
  background: #333; 
  color: #fff; 
  
  /* Kompaktnější padding */
  padding: 6px 12px; 
  
  border-radius: 50px; /* Kulatější */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 20001; /* Musí být nad vším */
  
  display: flex; 
  align-items: center; 
  gap: 10px;
  
  font-size: 0.85rem; 
  font-weight: 700;
  border: 2px solid var(--primary-color);
  
  /* Klíčové: Zabrání zalomení textu, které to roztahovalo */
  white-space: nowrap; 
  width: auto;
}

.admin-mode-indicator .indicator-text {
  /* Ujistíme se, že text nezabírá moc místa */
  line-height: 1;
}

.admin-mode-indicator .admin-btn {
  background: var(--primary-color); 
  color: #fff; 
  border: none;
  padding: 5px 12px; 
  border-radius: 20px; 
  cursor: pointer;
  font-size: 0.8rem; 
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* --- MOBILNÍ VERZE INDIKÁTORU (EXTRA SLIM) --- */
@media (max-width: 768px) {
  .admin-mode-indicator {
    bottom: 15px;
    padding: 4px 10px; /* Ještě menší padding */
    gap: 8px;
    border-width: 1.5px;
  }
  
  .admin-mode-indicator .indicator-text {
    font-size: 0.7rem; /* Menší text */
    letter-spacing: 0.5px;
  }
  
  .admin-mode-indicator .admin-btn {
    padding: 4px 8px; /* Menší tlačítko */
    font-size: 0.7rem;
  }
}

/* --- CATEGORIES MODAL --- */
#categories-list { display: flex; flex-direction: column; gap: 10px; margin: 25px 0; text-align: left; }
.category-edit-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: #f8f9fa; border-radius: 8px; }
.category-edit-item input { flex: 1; padding: 8px 10px; border: 2px solid #ddd; border-radius: 6px; }
.category-delete-btn { background: #dc3545; color: white; border: none; border-radius: 6px; padding: 8px 12px; cursor: pointer; }
.categories-actions { display: flex; justify-content: space-between; gap: 15px; margin-top: 20px; }
#save-categories-btn { flex: 1; }

/* Oprava layoutu pro desktopová delivery tlačítka */
.delivery-buttons-desktop { display: contents; }
#delivery-open-li-mobile { display: none; }
@media (min-width: 769px) { .delivery-buttons-mobile { display: none !important; } }

