/* ===========================================================
   Blog — Salento Retreats

   This file is loaded AFTER ../styles.css and only adds what the
   blog needs on top of it. Everything shared with the rest of the
   site — colour tokens, reset, body, .container, .btn, .navbar,
   .nav-links, .lang-toggle, footer — comes from styles.css, so the
   blog cannot drift into its own look again.
   =========================================================== */

:root {
  /* Pale olive wash for pills, tip boxes and table stripes. The site
     palette has no light tint of its own — --primary-light is a
     *brighter* olive meant for hovers, not a background. */
  --blog-tint: #eef1e4;
  --blog-tint-strong: #e2e7d3;
}

/* Blog pages have no full-bleed hero, so the navbar is solid from the
   start (`class="navbar scrolled"`, as on the property pages) and the
   content needs to clear it. */
.blog-page {
  padding-top: 5.5rem;
}

/* ── Listing hero ── */
.blog-hero {
  padding: 3rem 0 1rem;
  text-align: center;
}
.blog-hero-badge {
  display: inline-block;
  background: var(--blog-tint);
  color: var(--primary);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
.blog-hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Article header ── */
.article-hero {
  padding: 1rem 0 0;
}
.article-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.article-breadcrumb a { color: var(--primary); text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }

.article-category {
  display: inline-block;
  background: var(--blog-tint);
  color: var(--primary);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.article-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.article-meta .meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}
.meta-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.article-hero-img {
  width: 100%;
  height: clamp(250px, 45vw, 520px);
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  box-shadow: var(--shadow-md);
}

/* ── Article body ── */
.article-layout { padding: 1rem 0 5rem; }

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}
.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin: 2.5rem 0 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--blog-tint-strong);
}
.article-body h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; font-size: inherit; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { font-weight: 600; }
/* Links inside the prose only — the CTA buttons are also <a> elements and must
   keep the site's button styling, not turn into underlined green text. */
.article-body a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:not(.btn):hover { color: var(--accent); }
.article-body a.btn { text-decoration: none; }
.article-body img { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* ── Item cards ── */
.beach-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  transition: var(--transition);
}
.beach-card:hover { box-shadow: var(--shadow-md); }
.beach-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.beach-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.beach-card p { margin: 0; font-size: 0.95rem; }
.beach-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.tag-adriatic { background: #dce6ee; color: #2c4a63; }
.tag-ionian   { background: var(--blog-tint); color: var(--primary); }
.tag-inland   { background: #f4e2d5; color: #8a4222; }

/* ── Season table ── */
.season-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.season-table th {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.season-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.season-table tr:last-child td { border-bottom: none; }
.season-table tr:nth-child(even) td { background: #faf9f5; }
.season-table tr:hover td { background: var(--blog-tint); }
.rating-star { color: var(--accent); }

/* ── Tip box ── */
.tip-box {
  background: var(--blog-tint);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}
.tip-box strong { color: var(--primary); }

/* ── Food card ── */
.food-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--accent);
}
.food-card h3 { color: var(--accent); font-size: 1.1rem; margin: 0 0 0.5rem; }
.food-card p { margin: 0; font-size: 0.95rem; }
.food-emoji { font-size: 1.5rem; margin-right: 0.5rem; }

/* ── FAQ ── */
.faq-section { margin-top: 2rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  transition: var(--transition);
  font-size: 0.95rem;
  border: none;
  width: 100%;
  min-height: 44px;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text-color);
}
.faq-question:hover { background: var(--blog-tint); }
.faq-icon {
  font-size: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
  flex-shrink: 0;
}
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-answer.open { max-height: 400px; padding: 0.75rem 1.25rem 1.25rem; }

/* ── End-of-article CTA ──
   Same two buttons as the top of the homepage (.btn-outline +
   .btn-accent), so it needs the same dark backdrop for the white
   outline button to read. */
.article-cta {
  background: linear-gradient(135deg, #3b4a1e 0%, var(--primary) 60%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  margin: 3rem 0;
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.article-cta h2 {
  color: var(--white);
  border-top: none;
  margin: 0 0 0.75rem;
  padding-top: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
.article-cta p { color: rgba(255,255,255,0.88); margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Listing grid ── */
.blog-section { padding: 2rem 0 5rem; }
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.blog-card h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-read {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.blog-card-read::after { content: '→'; transition: var(--transition); }
.blog-card:hover .blog-card-read::after { transform: translateX(4px); }

/* ── Related posts ── */
.related-posts { padding: 3rem 0 5rem; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 1.5rem; margin-bottom: 2rem; text-align: center; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-sidebar { display: none; }
}

@media (max-width: 768px) {
  /* At 375px the logo wraps onto two lines and the fixed navbar grows to
     ~109px — the same as on the property pages. Clear it, or the breadcrumb
     ends up underneath. */
  .blog-page { padding-top: 7.5rem; }
  .article-cta { padding: 2rem 1.5rem; }
  .cta-buttons .btn { width: 100%; }

  .beach-card { grid-template-columns: 1fr; }

  /* Wide tables scroll inside their own box, not the page */
  .season-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.8rem;
  }
  .season-table th, .season-table td { padding: 0.5rem 0.75rem; }

  /* Article images never wider than the screen */
  .article-body img,
  .article-hero-img { max-width: 100%; height: auto; }
}
