/* ═══════════════════════════════════════════════════════════════
   Irish Compass — Blog Page Layout
   ═══════════════════════════════════════════════════════════════ */

/* ── Page ──────────────────────────────────────────────────────── */
.blog-page {
  background: #ffffff;
  max-width: 100%;
  padding: 60px 260px 0;
}

/* ── Blog Header ────────────────────────────────────────────────── */
.blog-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 12px;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  background-color: #2d544a;
  color: #ffffff;
}

/* ── Filter / Search ───────────────────────────────────────────── */
.blog-filter {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.blog-search-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.blog-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  padding: 13px 48px 13px 46px;
  border: 1.5px solid #e5e7eb;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.blog-search-input:focus {
  outline: none;
  border-color: #2d544a;
  box-shadow: 0 0 0 3px rgba(45, 84, 74, 0.1);
}

.blog-search-input::placeholder { color: #9ca3af; }

.blog-search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #2d544a;
  border: none;
  border-radius: 50px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.blog-search-submit:hover { background: #224039; }

/* ── Search Results Header ──────────────────────────────────────── */
.search-results-header {
  margin-bottom: 32px;
}

.search-results-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.search-results-in {
  font-weight: 400;
  color: #6b7280;
  font-size: 1.4rem;
}

.search-results-count {
  font-size: 0.9rem;
  color: #6b7280;
}

.search-back-link {
  color: #2d544a;
  font-weight: 600;
  text-decoration: none;
}

.search-back-link:hover { text-decoration: underline; }

[data-theme="dark"] .search-results-title { color: #f9fafb; }
[data-theme="dark"] .search-results-count { color: #9ca3af; }
[data-theme="dark"] .blog-search-submit   { background: #2d544a; }

.blog-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.blog-filter-pill {
  padding: 6px 18px;
  border-radius: 50px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.blog-filter-pill:hover {
  border-color: #2d544a;
  color: #2d544a;
}

.blog-filter-pill.active {
  background: #2d544a;
  border-color: #2d544a;
  color: #fff;
}

.blog-no-results {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 0;
  color: #9ca3af;
  font-size: 1rem;
}

.blog-no-results i { font-size: 2rem; opacity: 0.4; }

/* Dark mode filter */
[data-theme="dark"] .blog-search-input  { background: #1f2937; border-color: #374151; color: #f9fafb; }
[data-theme="dark"] .blog-search-input:focus { border-color: #2d544a; }
[data-theme="dark"] .blog-search-input::placeholder { color: #6b7280; }
[data-theme="dark"] .blog-search-clear  { background: #374151; color: #9ca3af; }
[data-theme="dark"] .blog-filter-pill   { background: #1f2937; border-color: #374151; color: #d1d5db; }
[data-theme="dark"] .blog-filter-pill:hover { border-color: #2d544a; color: #fff; }
[data-theme="dark"] .blog-filter-pill.active { background: #2d544a; border-color: #2d544a; color: #fff; }
[data-theme="dark"] .blog-no-results    { color: #6b7280; }

/* ── Hero Section ───────────────────────────────────────────────── */
.blog-hero {
  display: flex;
  gap: 24px;
  margin-bottom: 48px;
  align-items: stretch;
}

/* ── Featured Card (left) — imagem full com overlay ─────────────── */
.blog-card.featured-card {
  flex: 1.5;
  position: relative;
  min-width: 0;
  min-height: 400px;
  display: block;
}

.featured-bg {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
}

.featured-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

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

.featured-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.38) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px;
}

.featured-overlay .blog-tag {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
}

.featured-overlay .blog-tag::before {
  background: rgba(255, 255, 255, 0.7);
}

.featured-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.featured-excerpt {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 14px;
  margin-top: 0;
}

.featured-author-name {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
}

.featured-date {
  color: rgba(255, 255, 255, 0.75) !important;
}

.featured-footer .card-author img {
  filter: brightness(1.1);
}

.featured-footer .card-author-ig {
  color: rgba(255, 255, 255, 0.92) !important;
}
.featured-footer .card-author-ig:hover {
  color: #fff !important;
}

/* ── Hero Grid (right 2×2) ──────────────────────────────────────── */
.hero-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  background: #ffffff;
}

/* Mini-cards: força layout coluna, sem overflow */
.hero-grid .blog-card {
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #f0f0f0;
}

/* Imagem dos mini-cards: altura fixa, sem aspect-ratio */
.hero-card-img {
  aspect-ratio: unset !important;
  height: 155px;
  width: 100%;
  flex-shrink: 0;
}

/* Corpo dos mini-cards */
.hero-grid .blog-card-body {
  padding: 14px 16px 16px;
}

/* Título dos mini-cards */
.hero-grid .blog-card-title {
  font-size: 0.92rem;
  -webkit-line-clamp: 3;
  flex: 1;
  margin-bottom: 0;
}

/* Rodapé nos mini-cards */
.hero-grid .card-footer {
  display: flex;
  margin-top: auto;
  padding-top: 10px;
}

/* ── Blog Card (shared) ─────────────────────────────────────────── */
.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.10),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.blog-card-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

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

.blog-card:hover .blog-card-img-wrap img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Tag ────────────────────────────────────────────────────────── */
.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2D544A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.blog-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ab080;
  flex-shrink: 0;
}

/* ── Card Titles ────────────────────────────────────────────────── */
.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title-lg {
  font-size: 1.2rem;
  -webkit-line-clamp: 2;
  margin-bottom: 10px;
  flex: unset;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 4px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Card Footer (author + date) ────────────────────────────────── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card-author span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
}

.card-date {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}


/* ── 3-Column Grid Section ──────────────────────────────────────── */
.blog-grid-section {
  margin-top: 12px;
}

.blog-grid-3col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  row-gap: 28px;
}

/* Garante layout vertical em qualquer contexto */
.blog-grid-3col .blog-card,
.blog-hero .blog-card {
  display: flex !important;
  flex-direction: column !important;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 52px 0 48px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: all 0.15s;
  cursor: pointer;
  user-select: none;
}

.page-btn:hover:not(.dots):not(.active) {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  font-weight: 700;
}

.page-btn.dots {
  border: none;
  background: transparent;
  cursor: default;
  color: #9ca3af;
}

.page-btn.arrow {
  font-size: 1.1rem;
  color: #9ca3af;
}

/* ── Newsletter Section ─────────────────────────────────────────── */
.blog-newsletter {
  background: #ffffff;
  padding: 80px 0 100px;
}

.newsletter-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-pill {
  margin-bottom: 28px;
}

.newsletter-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.newsletter-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 36px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.newsletter-input {
  flex: 1;
  padding: 14px 22px;
  border: 1.5px solid #d1d5db;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1f2937;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.newsletter-input:focus {
  outline: none;
  border-color: #2d544a;
  box-shadow: 0 0 0 3px rgba(45, 84, 74, 0.12);
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #2d544a;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.15s;
}

.newsletter-btn:hover {
  background: #224039;
  transform: translateY(-1px);
}

.newsletter-success {
  display: none;
  color: #065f46;
  background: #d1fae5;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.9rem;
  margin-top: 16px;
}

/* ── Instagram author link ──────────────────────────────────────── */
.card-author-ig {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c2185b;
  text-decoration: none;
  transition: color 0.15s;
}
.card-author-ig:hover { color: #880e4f; text-decoration: underline; }

/* ── Dark Mode ──────────────────────────────────────────────────── */
[data-theme="dark"] .blog-page          { background: #111827; }
[data-theme="dark"] .hero-grid          { background: #111827; }
[data-theme="dark"] .hero-grid .blog-card { border-color: #374151; }
[data-theme="dark"] .featured-overlay  { background: linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.45) 55%, transparent 100%); }
[data-theme="dark"] .blog-main-title   { color: #f9fafb; }
[data-theme="dark"] .blog-subtitle     { color: #9ca3af; }
[data-theme="dark"] .blog-card         { background: #1f2937; box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2); }
[data-theme="dark"] .blog-card-title   { color: #f9fafb; }
[data-theme="dark"] .blog-card-excerpt { color: #9ca3af; }
[data-theme="dark"] .card-author span  { color: #e5e7eb; }
[data-theme="dark"] .card-footer       { border-top-color: #374151; }
[data-theme="dark"] .page-btn          { background: #1f2937; border-color: #374151; color: #e5e7eb; }
[data-theme="dark"] .page-btn:hover:not(.dots):not(.active) { background: #374151; }
[data-theme="dark"] .newsletter-badge  { background: #1f2937; border-color: #374151; color: #e5e7eb; }
[data-theme="dark"] .newsletter-title  { color: #f9fafb; }
[data-theme="dark"] .newsletter-input  { background: #1f2937; border-color: #374151; color: #f9fafb; }
[data-theme="dark"] .blog-newsletter   { background: transparent; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .blog-hero                   { flex-direction: column; }
  .blog-card.featured-card     { flex: unset; width: 100%; min-height: 400px; }
  .hero-grid                   { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .hero-card-img               { height: 120px; }
  .blog-grid-3col              { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 700px) {
  .blog-page                   { padding: 40px 20px 0; }
  .blog-main-title             { font-size: 2.2rem; }
  .blog-card.featured-card     { min-height: 320px; }
  .featured-title              { font-size: 1.4rem; }
  .hero-grid                   { grid-template-columns: 1fr; }
  .blog-grid-3col              { grid-template-columns: 1fr; }
  .newsletter-title            { font-size: 2rem; }
  .newsletter-form             { flex-direction: column; }
  .newsletter-fan              { width: 260px; height: 180px; }
  .fan-card                    { width: 120px; height: 145px; }
}
