/* Pastel green background for the whole page */
:root {
  --pastel-green: #c5e1b8;
  --dark-green: #2d5a27;
  --banner-height: 80px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--pastel-green);
  font-family: "Segoe UI", "Heebo", "Assistant", sans-serif;
  overflow-x: hidden;
}

/* Top banner: photo on the left, logo text on the same line */
.banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  min-height: var(--banner-height);
  background-color: var(--pastel-green);
  border-bottom: 2px solid rgba(45, 90, 39, 0.2);
}

/* Language switcher – top-left corner (margin pushes it left in RTL, right in LTR) */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-inline-start: auto;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--dark-green);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(45, 90, 39, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lang-btn .lang-flag {
  font-size: 0.9em;
  line-height: 1;
  display: inline-block;
}

.lang-btn:hover {
  background: rgba(45, 90, 39, 0.12);
  border-color: rgba(45, 90, 39, 0.5);
}

.lang-btn.active {
  background: var(--dark-green);
  color: #fff;
  border-color: var(--dark-green);
}

.banner-photo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.logo {
  color: var(--dark-green);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Main layout: sidebar on the left, center area with background image */
.main-wrapper {
  display: flex;
  min-height: calc(100vh - var(--banner-height));
  min-width: 0;
}

/* Left sidebar – site content links */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 2rem 1rem;
  background-color: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-list {
  list-style: none;
}

.nav-list li {
  margin-bottom: 0.75rem;
}

.nav-list a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-list a:hover {
  background-color: rgba(45, 90, 39, 0.15);
  color: #1a3d16;
}

.sidebar-credit {
  margin: 0;
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-style: italic;
  text-transform: uppercase;
}

.sidebar-credit .credit-prefix {
  color: #6b7280;
}

.sidebar-credit .credit-name {
  color: #722f37;
}

/* Center part – faded background picture for text */
.center-area {
  flex: 1;
  min-height: 400px;
  min-width: 0;
  position: relative;
}

.center-background {
  position: absolute;
  inset: 0;
  background-image: url("pictures/grass_in_the_wind.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Faded overlay so the image works as a soft background for text */
.center-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(197, 225, 184, 0.82);
}

/* Content panel over the center background */
.content-panel {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem;
  overflow: auto;
  max-height: 100%;
}

.view {
  display: block;
}

.view[hidden] {
  display: none;
}

.content-title {
  color: var(--dark-green);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* מאמרים – bullet links */
.articles-list {
  list-style: none;
}

.articles-list li {
  margin-bottom: 0.75rem;
}

.articles-list a {
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 500;
}

.articles-list a:hover {
  text-decoration: underline;
}

/* מה בסל – title + paragraph */
.basket-list {
  list-style: none;
}

.basket-list li {
  margin-bottom: 1.5rem;
}

.basket-list h3 {
  color: var(--dark-green);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.basket-list p {
  color: #333;
  margin: 0;
  line-height: 1.5;
}

/* Calendar */
.calendar-wrap {
  max-width: 320px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-nav {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(45, 90, 39, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: var(--dark-green);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 6px;
}

.cal-nav:hover {
  background: rgba(45, 90, 39, 0.1);
}

.cal-month-year {
  font-weight: 600;
  color: var(--dark-green);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.cal-day-name {
  text-align: center;
  font-size: 0.75rem;
  color: var(--dark-green);
  font-weight: 600;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  color: var(--dark-green);
}

.cal-day:hover:not(.other-month):not(.disabled) {
  background: rgba(45, 90, 39, 0.2);
}

.cal-day.other-month {
  color: #999;
  cursor: default;
}

.cal-day.disabled {
  color: #bbb;
  cursor: not-allowed;
}

.cal-day.selected {
  background: var(--dark-green);
  color: #fff;
}

/* Time slots */
.time-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(45, 90, 39, 0.25);
}

.time-title {
  font-size: 1rem;
  color: var(--dark-green);
  margin-bottom: 0.75rem;
}

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.time-slot {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(45, 90, 39, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: var(--dark-green);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.time-slot:hover {
  background: rgba(45, 90, 39, 0.15);
}

.time-slot.selected {
  background: var(--dark-green);
  color: #fff;
  border-color: var(--dark-green);
}

/* קצת עלי */
.about-title {
  color: var(--dark-green);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.about-text {
  color: #333;
  line-height: 1.6;
  margin: 0;
}

/* Active nav link */
.nav-list a.active {
  background-color: rgba(45, 90, 39, 0.2);
  font-weight: 600;
}

/* ---------- Mobile & small screens ---------- */
@media (max-width: 768px) {
  :root {
    --banner-height: 64px;
  }

  .banner {
    padding: 0.4rem 1rem;
    gap: 0.6rem;
  }

  .banner-photo {
    width: 44px;
    height: 44px;
  }

  .logo {
    font-size: 1.15rem;
  }

  .lang-btn {
    padding: 0.18rem 0.3rem;
    font-size: 0.6rem;
  }

  .main-wrapper {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar {
    width: 100%;
    padding: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(45, 90, 39, 0.2);
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    order: 1;
  }

  .nav-list li {
    margin-bottom: 0;
  }

  .nav-list a {
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-credit {
    width: 100%;
    order: 2;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    text-align: center;
    margin-bottom: 0;
  }

  .center-area {
    min-height: 50vh;
    flex: 1;
  }

  .content-panel {
    padding: 1.25rem 1rem;
  }

  .content-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .calendar-wrap {
    max-width: 100%;
  }

  .cal-nav {
    min-width: 44px;
    min-height: 44px;
  }

  .cal-day {
    font-size: 0.8rem;
    min-height: 36px;
  }

  .cal-day-name {
    font-size: 0.65rem;
  }

  .time-slot {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }

  .basket-list h3 {
    font-size: 1rem;
  }

  .about-title {
    font-size: 1.1rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .logo {
    font-size: 1rem;
  }

  .nav-list a {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
  }

  .content-panel {
    padding: 1rem 0.75rem;
  }
}
