/* =========================================================
   Coach Wiseman: Matchday design system
   Change colors or fonts here, every page follows.
   ========================================================= */
:root {
  /* Colors */
  --paper: #F5F3EE;      /* page background */
  --card: #FFFFFF;       /* cards, inputs */
  --ink: #121212;        /* text, nav, footer, dark sections */
  --red: #D7141A;        /* accent: hero, buttons, markers */
  --red-dark: #B3100F;   /* accent for small text links on light */
  --steel: #5C5C5C;      /* secondary text on light */
  --line: #E2DED6;       /* borders, image placeholders */
  --mute-dark: #BDBDBD;  /* secondary text on dark */
  --body-dark: #D6D6D6;  /* body text on dark */

  /* Fonts (all support Hebrew except mono, used for dates/labels) */
  --font-display: 'Secular One', 'Rubik', sans-serif;
  --font-body: 'Rubik', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- NAV ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  padding: 14px 24px;
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: #FFFFFF;
}

.nav-logo::before {
  content: '';
  width: 13px;
  height: 19px;
  background: var(--red);
  border-radius: 2px;
  transform: rotate(8deg);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  list-style: none;
}

.nav-menu a {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-menu a:hover {
  border-bottom-color: var(--red);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--red);
  padding: 96px 24px 72px;
}

/* tilted "card" mark in the far corner */
.hero::after {
  content: '';
  position: absolute;
  inset-inline-end: 6%;
  top: -40px;
  width: 180px;
  height: 260px;
  background: var(--ink);
  border-radius: 8px;
  transform: rotate(12deg);
  opacity: 0.92;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: start;
  color: #FFFFFF;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  line-height: 1;
  max-width: 900px;
  letter-spacing: -0.5px;
}

/* ---- SECTION ---- */
.section {
  padding: 96px 24px;
  position: relative;
}

.section.alt {
  background: var(--ink);
  color: #FFFFFF;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding-top: 18px;
}

.section-title::after {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 48px;
  height: 6px;
  background: var(--red);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--steel);
  margin-bottom: 48px;
  max-width: 720px;
}

.section.alt .section-subtitle { color: var(--mute-dark); }

/* ---- POST CARDS ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.post-item {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-top: 6px solid var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}

.post-item:first-child { border-top-color: var(--red); }

.post-item:hover {
  transform: translateY(-4px);
  border-top-color: var(--red);
}

.post-header {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--line);
}

.post-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-item:hover .post-header img { transform: scale(1.03); }

.post-overlay { display: none; }

.post-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}

.post-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-body h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.post-body p {
  font-size: 0.98rem;
  color: #3A3A3A;
  margin-bottom: 18px;
  line-height: 1.6;
}

.post-read {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--red-dark);
  transition: transform 0.2s;
}

.post-read:hover { transform: translateX(4px); }
[dir="rtl"] .post-read:hover { transform: translateX(-4px); }

/* ---- ABOUT ---- */
.about-text { max-width: 800px; }

.about-text-flex {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 18px;
}

.about-image {
  display: block;
  width: 170px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border-bottom: 6px solid var(--red);
}

@media (max-width: 640px) {
  .about-text-flex {
    flex-direction: column;
    align-items: center;
  }
  .about-image { width: 45%; }
}

.about-text p {
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 18px;
  color: var(--body-dark);
}

.about-text p:last-child {
  color: var(--mute-dark);
  font-size: 1rem;
}

/* ---- THANKS ---- */
.thanks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.thanks-item {
  text-align: center;
  background: var(--card);
  border-top: 6px solid var(--ink);
  padding: 32px 24px;
}

.thanks-item img {
  width: 140px;
  height: auto;
  margin: 0 auto 20px;
}

.thanks-item h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  color: var(--ink);
}

.thanks-item h3 a { color: var(--red-dark); }

.thanks-item p {
  font-size: 0.98rem;
  color: var(--steel);
  line-height: 1.7;
}

/* ---- CONTACT FORM ---- */
.contact-form {
  max-width: 600px;
  margin-top: 8px;
}

.form-group { margin-bottom: 22px; }

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 20, 26, 0.15);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.btn {
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  background: var(--red);
  color: #FFFFFF;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

/* ---- BLOG ARTICLE ---- */
.article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header { margin-bottom: 36px; }

.article h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 14px;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--steel);
}

.article-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  border-bottom: 6px solid var(--red);
  margin-bottom: 40px;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #2A2A2A;
}

.article-content p { margin-bottom: 20px; }

.article-content a {
  color: var(--red-dark);
  border-bottom: 1px solid var(--red-dark);
}

/* ---- PAGE END NOTES (replaces old inline styles) ---- */
.page-end {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.page-end.center { text-align: center; }

.page-end a {
  font-weight: 700;
  color: var(--red-dark);
}

.page-note {
  color: var(--steel);
  font-size: 0.95rem;
}

/* ---- FOOTER ---- */
footer {
  background: var(--ink);
  color: #FFFFFF;
  padding: 44px 24px;
  border-top: 6px solid var(--red);
  margin-top: 0;
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.92rem;
  color: var(--mute-dark);
  transition: color 0.2s;
}

.footer-nav a:hover { color: #FFFFFF; }

.footer-instagram {
  display: inline-flex;
  align-items: center;
}

.footer-instagram svg { display: block; }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: #9A9A9A;
}

/* ---- GALLERY PAGE ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  height: 78vh;
  min-height: 480px;
  margin: 48px 24px 100px;
  transition: opacity 0.5s ease;
}

.gallery-grid.is-shuffling { opacity: 0; }

.g-item {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .gallery-grid {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 32px 16px 70px;
  }
  .g-item {
    width: 100%;
    height: 220px;
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-menu { gap: 6px 18px; }
  .hero { min-height: 44vh; padding: 72px 24px 48px; }
  .hero::after { width: 110px; height: 160px; top: -30px; }
  .section { padding: 64px 24px; }
  .post-header { height: 200px; }
  .post-body { padding: 20px; }
}

@media (max-width: 480px) {
  .nav-logo { font-size: 1.3rem; }
  .nav-menu a { font-size: 0.85rem; }
  .hero::after { width: 80px; height: 116px; inset-inline-end: 4%; }
  .section { padding: 48px 16px; }
  .post-body { padding: 18px; }
}

/* ---- FOOTER: professional sites ---- */
.footer-sites {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.footer-sites a {
  color: #FFFFFF;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.footer-sites a:hover { color: var(--mute-dark); }
