/* Enter Spain editorial blog — premium magazine typography */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --blog-ink: #1a1814;
  --blog-ink-muted: #5c574f;
  --blog-ink-soft: #8a847a;
  --blog-paper: #faf8f5;
  --blog-paper-warm: #f3efe8;
  --blog-rule: #e8e2d8;
  --blog-serif: 'Georgia', 'Times New Roman', serif;
  --blog-sans: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --blog-measure: 42rem;
}

.blog-page {
  background: var(--blog-paper);
  color: var(--blog-ink);
  font-family: var(--blog-sans);
}

.blog-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.blog-hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--blog-rule);
}

.blog-hero__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blog-ink-soft);
  margin-bottom: 1rem;
}

.blog-hero__title {
  font-family: var(--blog-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--blog-ink);
  max-width: 18ch;
  margin: 0 auto;
}

.blog-hero__lede {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--blog-ink-muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Category filter */
.blog-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--blog-rule);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .blog-filter {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.blog-filter::-webkit-scrollbar {
  display: none;
}

.blog-filter__btn {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--blog-ink-muted);
  background: transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.blog-filter__btn:hover,
.blog-filter__btn.is-active {
  color: var(--blog-ink);
  background: #fff;
  border-color: var(--blog-rule);
}

/* Search */
.blog-search {
  max-width: 20rem;
  margin: 1.5rem auto 0;
}

.blog-search input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--blog-rule);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--blog-ink);
}

.blog-search input:focus {
  outline: 2px solid #10b98144;
  border-color: #10b981;
}

/* Featured strip */
.blog-featured {
  padding: 3rem 0;
}

.blog-featured__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blog-ink-soft);
  margin-bottom: 1.5rem;
}

.blog-featured__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .blog-featured__grid {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
  }
  .blog-featured__grid .blog-card--featured:first-child {
    grid-row: span 2;
  }
}

/* Article grid */
.blog-grid {
  padding: 2.5rem 0 4rem;
}

.blog-grid__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blog-ink-soft);
  margin-bottom: 1.5rem;
}

.blog-grid__items {
  display: grid;
  gap: 2rem;
}

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

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

/* Cards */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(26, 24, 20, 0.04);
  transition: box-shadow 0.25s, transform 0.25s;
}

.blog-card:hover {
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.08);
  transform: translateY(-2px);
}

.blog-card__media {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.blog-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 0.5rem;
}

.blog-card__title {
  font-family: var(--blog-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--blog-ink);
  margin: 0 0 0.5rem;
}

.blog-card--featured .blog-card__title {
  font-size: 1.65rem;
}

.blog-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--blog-ink-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__meta {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--blog-ink-soft);
  display: flex;
  gap: 0.75rem;
}

/* Category fallback imagery */
.blog-img--fiscal { background: linear-gradient(145deg, #e8e0d4 0%, #c4b8a8 50%, #9a8f7e 100%); }
.blog-img--banking { background: linear-gradient(145deg, #ebe6dc 0%, #d4cdc0 50%, #a89f92 100%); }
.blog-img--housing { background: linear-gradient(145deg, #f0ebe3 0%, #d9cfc0 50%, #b5a48f 100%); }
.blog-img--traffic { background: linear-gradient(145deg, #e5e8ea 0%, #b8c0c6 50%, #7d8a94 100%); }
.blog-img--immigration { background: linear-gradient(145deg, #ede8e0 0%, #cfc4b4 50%, #a39585 100%); }
.blog-img--healthcare { background: linear-gradient(145deg, #e8ebe8 0%, #c5d0c8 50%, #8fa396 100%); }
.blog-img--culture { background: linear-gradient(145deg, #f2ebe4 0%, #e0cfc0 45%, #c9a88a 100%); }
.blog-img--relocation { background: linear-gradient(145deg, #ebe8e2 0%, #d1c9bc 50%, #a89b8a 100%); }

/* Article page */
.blog-article-hero {
  padding: 4rem 0 0;
}

.blog-article-hero__category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #059669;
  text-decoration: none;
}

.blog-article-hero__category:hover {
  text-decoration: underline;
}

.blog-article-hero__title {
  font-family: var(--blog-serif);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 1rem 0 0.75rem;
  max-width: 20ch;
}

.blog-article-hero__excerpt {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--blog-ink-muted);
  max-width: 38rem;
}

.blog-article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--blog-ink-soft);
}

.blog-article-hero__media {
  margin-top: 2.5rem;
  aspect-ratio: 21 / 9;
  border-radius: 0.25rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.blog-article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prose */
.blog-prose {
  max-width: var(--blog-measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--blog-ink-muted);
}

.blog-prose.blog-prose--with-header > h1:first-child {
  display: none;
}

.blog-prose h2 {
  font-family: var(--blog-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blog-ink);
  margin: 2.75rem 0 1rem;
  line-height: 1.3;
}

.blog-prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blog-ink);
  margin: 2rem 0 0.75rem;
}

.blog-prose p {
  margin-bottom: 1.35rem;
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.35rem 1.25rem;
  padding-left: 0.5rem;
}

.blog-prose li {
  margin-bottom: 0.4rem;
}

.blog-prose blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid #c9a88a;
  font-family: var(--blog-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--blog-ink);
  line-height: 1.55;
}

.blog-prose a {
  color: #059669;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-prose a:hover {
  color: #047857;
}

.blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 2rem 0;
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.blog-prose th,
.blog-prose td {
  border: 1px solid var(--blog-rule);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.blog-prose th {
  background: var(--blog-paper-warm);
  font-weight: 600;
  color: var(--blog-ink);
}

.blog-prose strong {
  color: var(--blog-ink);
  font-weight: 600;
}

/* Recommended links */
.blog-routes {
  max-width: var(--blog-measure);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.blog-routes__title {
  font-family: var(--blog-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--blog-ink);
  margin-bottom: 1.25rem;
}

.blog-routes__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-routes__link {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--blog-rule);
  border-radius: 0.25rem;
  text-decoration: none;
  color: var(--blog-ink);
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-routes__link:hover {
  border-color: #c9a88a;
  box-shadow: 0 4px 12px rgba(26, 24, 20, 0.06);
}

.blog-routes__path {
  font-size: 0.75rem;
  color: var(--blog-ink-soft);
  margin-top: 0.25rem;
}

/* Related */
.blog-related {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--blog-rule);
}

.blog-related__title {
  font-family: var(--blog-serif);
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
}

.blog-related__grid {
  display: grid;
  gap: 1.25rem;
}

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

/* Editorial CTA */
.blog-cta {
  max-width: var(--blog-measure);
  margin: 0 auto 4rem;
  padding: 2.5rem 2rem;
  background: #fff;
  border: 1px solid var(--blog-rule);
  border-radius: 0.25rem;
  text-align: center;
}

.blog-cta__text {
  font-family: var(--blog-serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--blog-ink);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.blog-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.blog-cta__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.blog-cta__btn--primary {
  background: #0a1628;
  color: #fff;
}

.blog-cta__btn--primary:hover {
  background: #1e293b;
}

.blog-cta__btn--ghost {
  border: 1px solid var(--blog-rule);
  color: var(--blog-ink);
  background: transparent;
}

.blog-cta__btn--ghost:hover {
  border-color: var(--blog-ink-soft);
}

/* Category page header */
.blog-category-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--blog-rule);
}

.blog-category-header__title {
  font-family: var(--blog-serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 400;
}

.blog-category-header__count {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--blog-ink-soft);
}

.blog-breadcrumb {
  font-size: 0.8125rem;
  color: var(--blog-ink-soft);
  margin-bottom: 1.5rem;
}

.blog-breadcrumb a {
  color: #059669;
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  text-decoration: underline;
}

.blog-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--blog-ink-muted);
}

.blog-empty[data-hidden="true"] {
  display: none;
}
