@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");
@import url('modal.css');
@import url('updates.css');

:root {
  --color-primary: #007A53;
  --color-primary-light: #00B378;
  --color-deep: #004233;
  --color-gray: #333333;
  --color-silver: #C9C9C9;
  --color-bg-light: #F4F5F6;
  --color-bg-dark: #0B0B0F;
  --color-text-dark: #111;
  --color-text-light: #fff;
  --border-gray: #e0e0e0;

  /* Spacing și radius */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* iOS Safe Area Insets */
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --sal: env(safe-area-inset-left);
  --sar: env(safe-area-inset-right);
  
  /* Fallback pentru non-iOS */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  
  /* Custom spacing */
  --header-height: 80px;
  --nav-height: 60px;

  /* 👇 DEFAULT - Light theme */
  --color-bg: var(--color-bg-light);
  --color-text: var(--color-text-dark);

  color-scheme: light dark;
}

/* 👇 System preference pentru dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: var(--color-bg-dark);
    --color-text: var(--color-text-light);
  }
}

/* 👇 Manual override - light */
:root[data-theme="light"] {
  --color-bg: var(--color-bg-light);
  --color-text: var(--color-text-dark);
}

/* 👇 Manual override - dark */
:root[data-theme="dark"] {
  --color-bg: var(--color-bg-dark);
  --color-text: var(--color-text-light);
}

html, body {
    background: #007A53; 
    color: #fff; 
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Important: permite safe areas */
    min-height: 100svh;
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

body {
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    /* Protejează tot body-ul cu safe areas */
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* ===== MAIN CONTENT WITH SAFE AREAS ===== */
main.site-content {
    /* Spacing pentru header și navigation */
    padding-top: calc(var(--header-height) - 50px); /* Ajustat pentru tabbar */
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
    
    /* Side padding cu safe areas */
    padding-left: max(0, var(--safe-left));
    padding-right: max(0, var(--safe-right));
    
    min-height: calc(100vh - var(--header-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom));
    min-height: calc(100svh - var(--header-height) - var(--nav-height));
}

main#app-main:has(.page) {
    padding: 0;
}

/* ===== Header NAVIGATION WITH SAFE AREA ===== */
/* ===== APP BAR HEADER ===== */

header.appbar {
  /* Positioning */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  
  /* Layout */
  display: flex;
  flex-direction: column;
  
  /* Styling */
  background: var(--color-primary);
  color: var(--color-text-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  /* Safe area support */
  padding-top: var(--safe-top);
  
  /* Transitions */
  transition: 
    transform 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* Safe top utility */
header.appbar.safe-top {
  padding-top: var(--safe-top);
}

/* Scrolled state */
header.appbar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hide on scroll (optional) */
header.appbar.hidden {
  transform: translateY(-100%);
}

/* ===== NAVIGATIONS CONTAINER ===== */

.navigations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  min-height: 60px;
}

/* ===== APPBAR SECTIONS ===== */

.appbar__left,
.appbar__center,
.appbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.appbar__left {
  flex-shrink: 0;
  min-width: 40px;
}

.appbar__center {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
  min-width: 0;
  display: block;
}

.appbar__right {
  flex-shrink: 0;
  justify-content: flex-end;
  min-width: 40px;
}

/* ===== TITLE & SUBTITLE ===== */

.appbar__center .title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-light);
  letter-spacing: -0.02em;
  
  /* Text truncation */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: initial;
  max-width: 100%;
}

.appbar__center .subtitle {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0 0;
  line-height: 1.3;
}

/* ===== ICON BUTTON ===== */

.icon-btn {
  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Sizing */
  width: 40px;
  height: 40px;
  padding: 0;
  
  /* Styling */
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-light);
  border: none;
  border-radius: 10px;
  
  /* Text */
  font-size: 20px;
  font-weight: 400;
  
  /* Transitions */
  transition: 
    background 0.2s ease,
    transform 0.2s ease;
  
  /* Touch */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
}

.icon-btn i {
  font-size: 20px;
}

/* ===== CTA BUTTON ===== */

.cta {
  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  /* Sizing */
  height: 40px;
  padding: 0 16px;
  
  /* Styling */
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  border: none;
  border-radius: 10px;
  
  /* Text */
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  
  /* Transitions */
  transition: 
    background 0.2s ease,
    transform 0.2s ease;
  
  /* Touch */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.cta:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.25);
}

/* ===== TABBAR ===== */

.tabbar {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  overflow-x: auto;
  justify-content: space-around;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabbar::-webkit-scrollbar {
  display: none;
}

/* ===== TAB BUTTON ===== */

.tab {
  /* Layout */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  
  /* Sizing */
  padding: 8px 16px;
  flex-shrink: 0;
  
  /* Styling */
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 8px;
  
  /* Text */
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  
  /* Transitions */
  transition: all 0.2s ease;
  
  /* Touch */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* Tab hover */
.tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* Tab active */
.tab.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  font-weight: 600;
}

/* Active indicator */
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--color-text-light);
  border-radius: 2px 2px 0 0;
}

/* ===== TAB BADGE ===== */

.tab__badge {
  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* Sizing */
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  
  /* Styling */
  background: rgba(255, 255, 255, 0.25);
  color: var(--color-text-light);
  border-radius: 10px;
  
  /* Text */
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}

.tab.active .tab__badge {
  background: rgba(255, 255, 255, 0.35);
}

/* ===== BADGE ON BUTTONS ===== */

.icon-btn[data-badge] {
  position: relative;
}

.icon-btn[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 2px;
  right: 2px;
  
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: #dc2626;
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--color-primary);
}

/* ===== LIGHT HEADER VARIANT ===== */

header.appbar--light {
  background: var(--color-bg);
  color: var(--color-text);
  border-bottom-color: var(--color-silver);
}

header.appbar--light .title {
  color: var(--color-text);
}

header.appbar--light .subtitle {
  color: var(--color-text-secondary);
}

header.appbar--light .icon-btn,
header.appbar--light .cta {
  background: var(--color-bg-light);
  color: var(--color-text);
}

header.appbar--light .icon-btn:hover,
header.appbar--light .cta:hover {
  background: var(--color-silver);
}

header.appbar--light .tab {
  color: var(--color-text-secondary);
}

header.appbar--light .tab:hover {
  background: var(--color-bg-light);
  color: var(--color-text);
}

header.appbar--light .tab.active {
  background: var(--color-primary);
  color: var(--color-text-light);
}

header.appbar--light .tab.active::after {
  background: var(--color-primary);
}

header.appbar--light .tab__badge {
  background: var(--color-bg-light);
  color: var(--color-text);
}

header.appbar--light .tab.active .tab__badge {
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-text-light);
}

/* ===== DARK MODE ===== */

@media (prefers-color-scheme: dark) {
  header.appbar--light {
    background: var(--color-bg-dark);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  header.appbar--light .icon-btn,
  header.appbar--light .cta {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
  }
  
  header.appbar--light .icon-btn:hover,
  header.appbar--light .cta:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  
  header.appbar--light .tab {
    color: var(--color-silver);
  }
  
  header.appbar--light .tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
  }
}

:root[data-theme="dark"] header.appbar--light {
  background: var(--color-bg-dark);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] header.appbar--light .icon-btn,
:root[data-theme="dark"] header.appbar--light .cta {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
}

:root[data-theme="dark"] header.appbar--light .icon-btn:hover,
:root[data-theme="dark"] header.appbar--light .cta:hover {
  background: rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] header.appbar--light .tab {
  color: var(--color-silver);
}

:root[data-theme="dark"] header.appbar--light .tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 520px) {
  .navigations {
    padding: 8px 12px;
  }
  
  .appbar__center .title {
    font-size: 18px;
  }
  
  .appbar__center .subtitle {
    font-size: 12px;
  }
  
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  
  .icon-btn i {
    font-size: 18px;
  }
  
  .cta {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  
  .tabbar {
    padding: 0 12px 8px;
  }
  
  .tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .navigations {
    padding: 12px 24px;
  }
  
  .tabbar {
    padding: 0 24px 12px;
  }
}

/* ===== ACCESSIBILITY ===== */

.icon-btn:focus-visible,
.cta:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

header.appbar--light .icon-btn:focus-visible,
header.appbar--light .cta:focus-visible,
header.appbar--light .tab:focus-visible {
  outline-color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  header.appbar,
  .icon-btn,
  .cta,
  .tab {
    transition: none;
  }
}

/* ===== BODY PADDING FOR FIXED HEADER ===== */

body {
  padding-top: calc(var(--header-height) + var(--safe-top));
}

/* Adjust when header has tabs */
body.has-tabs {
  padding-top: calc(var(--header-height) + 50px + var(--safe-top));
}

/* ===== BOTTOM NAVIGATION WITH SAFE AREA ===== */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  
  /* Layout */
  display: flex;
  align-items: center;
  justify-content: space-around;
  
  /* Styling */
  background: var(--color-bg);
  border-top: 1px solid var(--color-silver);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  
  /* Safe area support */
  padding-bottom: var(--safe-bottom);
  padding-top: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  
  /* Smooth transitions */
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Hide on scroll (optional) */
.bottom-nav.hidden {
  transform: translateY(100%);
}

/* ===== NAV ITEMS ===== */

.bn__item {
  /* Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  
  /* Sizing */
  flex: 1;
  min-width: 60px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  
  /* Styling */
  color: var(--color-gray);
  text-decoration: none;
  position: relative;
  
  /* Transitions */
  transition: color 0.2s ease, transform 0.2s ease;
  
  /* Touch target */
  -webkit-tap-highlight-color: transparent;
}

/* Hover state */
.bn__item:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Active state */
.bn__item.is-active {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.bn__item.is-active .bn__icon {
  transform: scale(1.1);
}

/* Active indicator (optional line) */
.bn__item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 0 0 3px 3px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== ICON & LABEL ===== */

.bn__icon {
  font-size: 22px;
  transition: transform 0.2s ease;
}

.bn__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ===== FLOATING ACTION BUTTON (FAB) ===== */

.bn__fab {
  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Sizing */
  width: 56px;
  height: 56px;
  
  /* Positioning - elevated above nav */
  position: relative;
  margin-top: -28px; /* Half of height for floating effect */
  
  /* Styling */
  background: var(--color-primary);
  color: var(--color-text-light);
  border-radius: 50%;
  box-shadow: 
    0 4px 12px rgba(0, 122, 83, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
  
  /* Border to blend with nav */
  border: 2px solid var(--color-bg);
  
  /* Text */
  text-decoration: none;
  font-size: 24px;
  
  /* Transitions */
  transition: 
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  
  /* Touch target */
  -webkit-tap-highlight-color: transparent;
}

/* FAB hover */
.bn__fab:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--color-primary-light);
  box-shadow: 
    0 6px 16px rgba(0, 122, 83, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.15);
}

/* FAB active (pressed) */
.bn__fab:active {
  transform: scale(0.95);
}

/* ===== DARK MODE ADJUSTMENTS ===== */

@media (prefers-color-scheme: dark) {
  .bottom-nav:not([data-theme="dark"]) {
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  }
  
  .bn__item {
    color: var(--color-silver);
  }
  
  .bn__item:hover,
  .bn__item.is-active {
    color: var(--color-primary-light);
  }
  
  .bn__item.is-active::before {
    background: var(--color-primary-light);
  }
  
  .bn__fab {
    box-shadow: 
      0 4px 12px rgba(0, 178, 120, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] .bottom-nav {
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .bn__item {
  color: var(--color-silver);
}

:root[data-theme="dark"] .bn__item:hover,
:root[data-theme="dark"] .bn__item.is-active {
  color: var(--color-primary-light);
}

:root[data-theme="dark"] .bn__item.is-active::before {
  background: var(--color-primary-light);
}

:root[data-theme="dark"] .bn__fab {
  box-shadow: 
    0 4px 12px rgba(0, 178, 120, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== RESPONSIVE ===== */

/* Tablets și desktop */
@media (min-width: 768px) {
  .bottom-nav {
    display: none; /* Ascunde pe desktop, folosește sidebar */
  }
}

/* Small phones */
@media (max-width: 360px) {
  .bn__label {
    font-size: 10px;
  }
  
  .bn__icon {
    font-size: 20px;
  }
  
  .bn__fab {
    width: 50px;
    height: 50px;
    margin-top: -25px;
    font-size: 22px;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Focus visible pentru keyboard navigation */
.bn__item:focus-visible,
.bn__fab:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Reduce motion pentru utilizatori cu preferințe */
@media (prefers-reduced-motion: reduce) {
  .bn__item,
  .bn__icon,
  .bn__fab,
  .bottom-nav {
    transition: none;
    animation: none;
  }
  
  .bn__fab:hover {
    transform: scale(1.05);
  }
}

/* ===== OPTIONAL: Badge pentru notificări ===== */

.bn__item[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 8px;
  right: calc(50% - 20px);
  
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: #dc2626;
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}


a {
    text-decoration: none;
}

button#btnCheck:hover {
    background: var(--color-primary);
}

.action-item:last-child {
    border-bottom: 0 !important;
}

/* ===== DARK THEME STYLES ===== */
/*html:not([data-theme="light"]) {
    .navigations {
        background: #e8e8e8;
        color: #333;
    }
    
    nav.tabbar {
        background: #e8e8e8;
    }

    .tabbar .tab {
        color: #1a1a1e;
        margin-top: 0;
    }
    
    .tabbar::before {
        margin: 0 2px;
        background: #f6f6f6;
        border-color: #dcdcdc;
    }

    .setting-item {
        border: 1px solid #e8e8e8;
    }

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

    .bn .bn__item {
        color: var(--color-gray);
    }

    .theme-card:not(.active) .theme-check {
        color: #e5e5f2;
    }

    .theme-card {
      border: 2px solid #f5f5f5;
    }

    button.btn-secondary {
        background: #f3f3f3;
        color: #333;
        border: 1px solid #ddd;
    }

    .btn-primary {
      background: var(--color-primary, #007A53);
      color: var(--color-bg-light);
    }

    .appbar__center .subtitle {
      color: rgba(0, 0, 0, 0.6);
    }

    .booking-card {
      border: 1px solid #e5e5e5;
    }

    .hours-card, .action-card {
      border: 1px solid #e5e5e5;
    }

    .actions-card, .extra-card {
      border-color: var(--color-silver);
    }

    a.action-item {
        border-bottom: 1px solid var(--color-silver);
        border-radius: 0;
    }

    .action-item:last-child {
        border-bottom: 0 !important;
    }

    .hours-row:last-child {
        border: 0;
        padding-bottom: 0px;
    }

    .hours-row {
        border-bottom: 1px solid var(--color-silver);
        padding-bottom: 15px;
    }

    .hours-divider {
      background: var(--color-silver);
    }

    .intro-card {
      background: #e8e8e8;
      color: var(--color-text-dark);
    }

    .contact-item {
      color: var(--text-primary);
      border: 1px solid var(--color-silver);
    }

    .form-group input {
      background: #f7f7f7;
      color: #1a1a1e;
      border-color: #d3d3d3;
    }

    .language-card {
        color: #333;
        border: 1px solid var(--color-silver, #d3d3d3);
    }

    .modal-body p, p, a, h1, h3 {
        color: #333;
    }

    .bn__item.is-active {
        color: var(--color-primary-light);
    }
}*/