/*
 * Tripping Out of Tel Aviv — Main Stylesheet
 *
 * Color scheme: Yellow (#F5C800), Black (#111111), White (#FFFFFF)
 * Typography: Playfair Display (headings), Inter (body)
 *
 * Behavioral flows documented here correspond to those in js/main.js:
 *   - Sticky nav with mobile hamburger toggle
 *   - Smooth scroll to home page section anchors (#news, #about, #contact)
 *   - Blog listing: category filter buttons + keyword search
 *   - Post pages: two-column reading layout with sidebar
 */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #F5C800;
  --yellow-dark: #C9A200;
  --black: #111111;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-mid: #DDDDDD;
  --gray-text: #666666;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1100px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---- Layout Utilities ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--black);
  height: var(--nav-h);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  flex-shrink: 0;
}

.nav__logo span {
  background: var(--yellow);
  padding: 2px 6px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

.nav__links a:hover,
.nav__links a.active {
  border-bottom-color: var(--yellow);
}

/* Hamburger button — hidden on desktop */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: all 0.2s;
}

/* Mobile nav dropdown — hidden until .open is toggled by JS */
.nav__mobile {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 3px solid var(--black);
  padding: 8px 0;
  z-index: 99;
}

.nav__mobile.open { display: block; }

.nav__mobile a {
  display: block;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 1px solid var(--gray-mid);
}

.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { background: var(--yellow); }

/* ---- Hero ---- */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 80px 24px;
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: center;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 18px;
}

.hero__heading {
  font-family: var(--serif);
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero__sub {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__book {
  position: relative;
}

.hero__book img {
  width: 100%;
  max-width: 320px;
  box-shadow: 8px 8px 0 var(--yellow);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 1px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--yellow);
}

.btn--yellow:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.45);
}

.btn--outline:hover {
  border-color: var(--white);
  transform: translateY(-1px);
}

/* ---- In the News ---- */
.news {
  padding: 88px 0;
  background: var(--white);
  border-bottom: 3px solid var(--black);
}

.news__heading {
  font-family: var(--serif);
  font-size: 38px;
  text-align: center;
  margin-bottom: 52px;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news__card {
  padding: 36px 28px 28px;
  border: 2px solid var(--black);
  position: relative;
  background: var(--white);
}

.news__mark {
  font-family: var(--serif);
  font-size: 72px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.news__quote {
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--black);
}

.news__source {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
  border-top: 2px solid var(--yellow);
  padding-top: 14px;
  display: block;
}

/* ---- About ---- */
.about {
  background: var(--yellow);
  padding: 88px 0;
  border-bottom: 3px solid var(--black);
}

.about__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  align-items: center;
}

.about__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  margin-bottom: 14px;
}

.about__heading {
  font-family: var(--serif);
  font-size: 38px;
  margin-bottom: 22px;
  color: var(--black);
}

.about__text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--black);
}

.about__photo {
  position: relative;
}

.about__photo img {
  width: 100%;
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
}

/* ---- Contact (Facebook) ---- */
.contact {
  padding: 88px 24px;
  background: var(--black);
  text-align: center;
  color: var(--white);
  border-bottom: 3px solid var(--yellow);
}

.contact__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}

.contact__heading {
  font-family: var(--serif);
  font-size: 38px;
  color: var(--white);
  margin-bottom: 10px;
}

.contact__sub {
  color: rgba(255,255,255,0.55);
  margin-bottom: 36px;
  font-size: 16px;
}

.contact__fb-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1877F2;
  color: var(--white);
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #1877F2;
  transition: transform 0.15s, filter 0.15s;
}

.contact__fb-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.contact__fb-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: white;
}

/* ---- Footer ---- */
.footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.5);
  padding: 28px 24px;
  text-align: center;
  font-size: 13px;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.footer__links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--yellow); }

/* ---- Blog Listing — Header ---- */
.blog-header {
  padding: 60px 0 40px;
  border-bottom: 3px solid var(--black);
  background: var(--white);
}

.blog-header__heading {
  font-family: var(--serif);
  font-size: 52px;
  margin-bottom: 6px;
}

.blog-header__sub {
  color: var(--gray-text);
  font-size: 15px;
}

/* ---- Blog Listing — Controls (filter + search) ---- */
.blog-controls {
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/*
 * Filter buttons: clicking one sets it .active, hides non-matching post cards.
 * Default active is "All Posts" (data-filter="all").
 */
.filter-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

.blog-search {
  padding: 8px 14px;
  font-size: 14px;
  border: 2px solid var(--black);
  background: var(--white);
  outline: none;
  font-family: var(--sans);
  min-width: 200px;
  transition: border-color 0.15s;
}

.blog-search:focus { border-color: var(--yellow); }

.blog-search::placeholder { color: var(--gray-text); }

/* ---- Blog Listing — Post Cards Grid ---- */
.blog-grid {
  padding: 48px 0 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

/*
 * Post cards: .hidden is toggled by JS when category filter or search
 * doesn't match. data-category attribute drives the filter.
 */
.post-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--black);
  transition: box-shadow 0.15s;
  background: var(--white);
}

.post-card:hover {
  box-shadow: 4px 4px 0 var(--yellow);
}

.post-card.hidden { display: none; }

.post-card__thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-mid);
  flex-shrink: 0;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.03);
}

.post-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--black);
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 10px;
  align-self: flex-start;
}

.post-card__title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  color: var(--black);
}

.post-card__date {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 10px;
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

.post-card__link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 1px;
  align-self: flex-start;
  transition: background 0.15s;
}

.post-card__link:hover {
  background: var(--yellow);
  padding: 0 3px 1px;
}

/* Shown when all cards are filtered out */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  color: var(--gray-text);
  padding: 60px 0;
  font-size: 16px;
  display: none;
}

/* ---- Post Page ---- */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}

.post-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--black);
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-meta {
  font-size: 13px;
  color: var(--gray-text);
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--gray-mid);
}

.post-featured-img {
  width: 100%;
  margin-bottom: 36px;
  border: 2px solid var(--black);
}

.post-featured-img img {
  width: 100%;
  display: block;
}

.post-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--black);
}

.post-body p { margin-bottom: 20px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { color: var(--black); border-bottom: 1px solid var(--yellow); }
.post-body a:hover { background: var(--yellow); }

.post-body .post-map {
  margin: 28px 0;
  border: 2px solid var(--black);
}

.post-body .post-map img {
  width: 100%;
  display: block;
}

/* Post sidebar */
.post-sidebar {}

.sidebar-box {
  background: var(--gray-light);
  border: 2px solid var(--black);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.sidebar-box__heading {
  font-family: var(--serif);
  font-size: 19px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--yellow);
}

.sidebar-posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-posts li {
  border-bottom: 1px solid var(--gray-mid);
  padding: 14px 0;
}

.sidebar-posts li:first-child { padding-top: 0; }
.sidebar-posts li:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-posts li a {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}

.sidebar-posts li a:hover { color: var(--yellow-dark); }

.sidebar-posts .sp-date {
  font-size: 11px;
  color: var(--gray-text);
  margin-top: 4px;
}

/* ---- Hike Updates preview (home page) ---- */
.hike-preview {
  padding: 88px 0;
  background: var(--gray-light);
  border-bottom: 3px solid var(--black);
}

.hike-preview__heading {
  font-family: var(--serif);
  font-size: 38px;
  margin-bottom: 36px;
}

.hike-preview__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: stretch;
}

/* "See all" box — same height as cards, black bg */
.hike-preview__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  text-decoration: none;
  padding: 32px 20px;
  transition: background 0.15s, box-shadow 0.15s;
  text-align: center;
}

.hike-preview__more:hover {
  background: #222;
  box-shadow: 4px 4px 0 var(--yellow);
}

.hike-preview__more-label {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
}

.hike-preview__more-arrow {
  font-size: 32px;
  color: var(--yellow);
  line-height: 1;
}

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

@media (min-width: 769px) and (max-width: 1024px) {
  .hike-preview__grid { grid-template-columns: 1fr 1fr; }
}

/* ---- FAQ (home page section + standalone) ---- */
.faq-section {
  padding: 88px 0;
  background: var(--white);
  border-bottom: 3px solid var(--black);
}

.faq-section__heading {
  font-family: var(--serif);
  font-size: 38px;
  text-align: center;
  margin-bottom: 0;
}

.faq-list {
  max-width: 740px;
  margin: 56px auto 80px;
}

.faq-item {
  border: 2px solid var(--black);
  margin-bottom: 12px;
  background: var(--white);
}

.faq-item[open] {
  box-shadow: 4px 4px 0 var(--yellow);
}

.faq-question {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  padding: 20px 52px 20px 24px;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  line-height: 1.3;
}

/* Remove default browser triangle */
.faq-question::-webkit-details-marker { display: none; }

/* Custom +/- indicator */
.faq-question::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--black);
  line-height: 1;
}

.faq-item[open] .faq-question {
  background: var(--yellow);
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 24px 22px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--black);
  border-top: 1px solid var(--gray-mid);
  padding-top: 18px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  /* Nav: hide desktop links, show burger */
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* Hero: single column */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__book { display: none; }

  /* News: single column */
  .news__grid { grid-template-columns: 1fr; }

  /* About: single column */
  .about__inner { grid-template-columns: 1fr; }
  .about__photo { display: none; }

  /* Blog controls: stack vertically */
  .blog-controls { flex-direction: column; align-items: flex-start; }
  .blog-search { width: 100%; }

  /* Blog grid: single column */
  .blog-grid { grid-template-columns: 1fr; }

  /* Post layout: single column */
  .post-layout { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .news__grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .hero__inner { grid-template-columns: 1fr 260px; gap: 40px; }
  .about__inner { grid-template-columns: 1fr 300px; gap: 40px; }
}
