/* السلاحف البرية و تربيتها — stylesheet
   Base URL placeholder used in HTML: https://salahef-barya.pages.dev
   Replace that host with sed after deploy. */

:root {
  --bg: #f3eadc;
  --bg-deep: #e8dcc8;
  --paper: #fff9f1;
  --ink: #2b2418;
  --ink-soft: #5c5346;
  --accent: #a34b24;
  --accent-hover: #7e3516;
  --accent-soft: #f3dccb;
  --green: #3e5a38;
  --green-soft: #e5edd8;
  --line: #e0d3be;
  --shadow: 0 12px 32px rgba(43, 36, 24, 0.1);
  --radius: 18px;
  --max: 1120px;
  --font: "Cairo", "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 1.0625rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  right: 1rem;
  top: -5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  border-radius: 8px;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Header
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 234, 220, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.35;
  max-width: 18rem;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Hero
   ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 26rem;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: #3a2e20;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 18, 12, 0.88) 0%,
    rgba(24, 18, 12, 0.45) 55%,
    rgba(24, 18, 12, 0.22) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.2rem 3rem;
  width: 100%;
}

.hero h1 {
  font-size: clamp(1.85rem, 5.4vw, 3.05rem);
  line-height: 1.28;
  margin: 0 0 0.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero .tagline {
  font-size: 1.12rem;
  max-width: 26em;
  margin: 0 0 1.5rem;
  color: #f4ece1;
  font-weight: 400;
}

/* Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  box-shadow: 0 6px 18px rgba(163, 75, 36, 0.28);
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Intro + filters + cards
   ------------------------------------------------------------------ */
main {
  flex: 1;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.2rem;
}

.intro {
  padding: 2.2rem 0 0.4rem;
  max-width: 38rem;
}

.intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.articles-section {
  padding: 1.5rem 0 2rem;
}

.filters {
  position: relative;
}

.filters > input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
}

.filter-bar label {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.filter-bar label:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#cat-all:checked ~ .filter-bar label[for="cat-all"],
#cat-beginner:checked ~ .filter-bar label[for="cat-beginner"],
#cat-food:checked ~ .filter-bar label[for="cat-food"],
#cat-light:checked ~ .filter-bar label[for="cat-light"],
#cat-setup:checked ~ .filter-bar label[for="cat-setup"],
#cat-health:checked ~ .filter-bar label[for="cat-health"],
#cat-winter:checked ~ .filter-bar label[for="cat-winter"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

#cat-food:checked ~ .grid .card:not([data-cat="food"]),
#cat-light:checked ~ .grid .card:not([data-cat="light"]),
#cat-setup:checked ~ .grid .card:not([data-cat="setup"]),
#cat-health:checked ~ .grid .card:not([data-cat="health"]),
#cat-winter:checked ~ .grid .card:not([data-cat="winter"]),
#cat-beginner:checked ~ .grid .card:not([data-cat="beginner"]) {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(224, 211, 190, 0.7);
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(43, 36, 24, 0.14);
  color: inherit;
}

.card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-img img {
  transform: scale(1.04);
}

.card-body {
  padding: 0.95rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.chip {
  display: inline-flex;
  align-self: flex-start;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0;
}

.card h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 800;
}

.excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more {
  margin-top: auto;
  padding-top: 0.45rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Footer
   ------------------------------------------------------------------ */
.site-footer {
  background: #2b2418;
  color: #e8dcc8;
  padding: 2.6rem 1.2rem 1.8rem;
  margin-top: 3.5rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.1rem;
}

.footer-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff9f1;
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.site-footer a {
  color: #f0d7c6;
}

.site-footer a:hover {
  color: #fff;
}

.disclose {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: #c9bba6;
  max-width: 40rem;
}

.footer-copy {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #9d8f7a;
}

/* Article page
   ------------------------------------------------------------------ */
.article-head {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.8rem 1.2rem 1rem;
}

.crumbs {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
}

.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--accent);
}

.article-head .chip {
  margin-bottom: 0.55rem;
}

.article-head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.35;
  font-weight: 800;
}

.article-cover-wrap {
  max-width: 56rem;
  margin: 0 auto 0.5rem;
  padding: 0 1.2rem;
}

.article-cover-wrap img {
  width: 100%;
  height: auto;
  max-height: 28rem;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius);
  background: var(--bg-deep);
}

.credit {
  max-width: 46rem;
  margin: 0 auto 1.6rem;
  padding: 0 1.2rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.credit a {
  color: var(--ink-soft);
}

.prose {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.prose p {
  margin: 0 0 1.15rem;
  font-size: 1.125rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.ask-box {
  max-width: 46rem;
  margin: 2.3rem auto 0;
  padding: 1.5rem 1.2rem;
  background: var(--green-soft);
  border-radius: var(--radius);
  text-align: center;
}

.ask-box h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.ask-box p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.related {
  max-width: var(--max);
  margin: 2.8rem auto 0;
  padding: 0 1.2rem;
}

.related h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

/* Simple pages (about / privacy)
   ------------------------------------------------------------------ */
.page-hero {
  padding: 2.4rem 0 0;
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.35;
}

.page-body {
  max-width: 46rem;
}

.page-body h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
}

.page-body p {
  margin: 0 0 1.1rem;
  font-size: 1.125rem;
}

.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

/* Responsive
   ------------------------------------------------------------------ */
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 30rem;
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand {
    font-size: 1.08rem;
    max-width: none;
  }

  .hero {
    min-height: 32rem;
  }
}
