/* medina theme */
:root {
  --primary: #b5542d;
  --primary-dark: #8a3c1e;
  --accent: #e09b2d;
  --link: #1f5f8b;
  --ink: #2b241e;
  --paper: #faf5ee;
  --muted: #7d7466;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
}

header.site-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .logo {
  font-size: 1.35rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: #fff;
}
.site-header .logo span { color: var(--accent); }

nav.main-nav a {
  color: #eef2ef;
  text-decoration: none;
  margin-left: 1.4rem;
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.95rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover { border-bottom-color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background: url('../images/ma-chaouen-alley.jpg') center/cover no-repeat;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45,25,15, 0.85), rgba(45,25,15, 0.1));
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
  color: #fff;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.hero-content h1 em { color: var(--accent); font-style: normal; }
.hero-content p {
  font-size: 1.15rem;
  max-width: 40rem;
  color: #eee9da;
}

main { max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem; }

.section-title {
  font-size: 1.9rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}
.section-lede {
  color: var(--muted);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
article.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(80,50,30, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
article.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(80,50,30, 0.18);
}
article.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.card-body { padding: 1.1rem 1.25rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card-meta {
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card-body h2 { font-size: 1.25rem; line-height: 1.3; margin-bottom: 0.5rem; }
.card-body h2 a { color: var(--primary-dark); text-decoration: none; }
.card-body h2 a:hover { color: var(--primary); }
.card-body p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.read-more {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--link);
  text-decoration: none;
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
}
.read-more:hover { text-decoration: underline; }

/* Featured strip on home */
.featured {
  background: #fff;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 10px rgba(80,50,30, 0.08);
}
.featured h3 { color: var(--primary-dark); font-size: 1.4rem; margin-bottom: 0.4rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 2rem;
}
.gallery img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.gallery figure { position: relative; }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 0.8rem;
  padding: 1.5rem 0.7rem 0.5rem;
  border-radius: 0 0 8px 8px;
  font-family: 'Segoe UI', Helvetica, sans-serif;
}

/* Blog post */
.post-header img.banner {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin-bottom: 1.5rem;
}
.post-meta {
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.post-title { font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--primary-dark); line-height: 1.2; margin-bottom: 1rem; }
.post-content p { margin-bottom: 1.2rem; font-size: 1.05rem; }
.post-content h2 { color: var(--primary-dark); margin: 2rem 0 0.8rem; font-size: 1.45rem; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.6rem 1.2rem;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: 0 8px 8px 0;
  color: #57503f;
  font-style: italic;
}
.post-content figure { margin: 1.8rem 0; }
.post-content figure img { width: 100%; border-radius: 10px; display: block; }
.post-content figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: 'Segoe UI', Helvetica, sans-serif;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { text-decoration: underline; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  border-top: 1px solid #e8ddd0;
  padding-top: 1.5rem;
}
.post-nav a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: bold;
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.92rem;
}
.post-nav a:hover { color: var(--link); }

footer.site-footer {
  background: var(--primary-dark);
  color: #cfd8cf;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-family: 'Segoe UI', Helvetica, sans-serif;
  font-size: 0.9rem;
}
.site-footer .flag { color: var(--accent); letter-spacing: 4px; }

@media (max-width: 600px) {
  nav.main-nav a { margin-left: 0.8rem; }
  .post-nav { flex-direction: column; }
}
