/* =====================================================================
   COSTA DE LA LUZ · Estilos del BLOG  (css/blog.css)
   ===================================================================== */

/* ----- Hero ----- */
.blog-hero {
  margin-top: 0; padding: 8.5rem 0 3.5rem;
  background: linear-gradient(120deg, var(--navy) 0%, var(--primary) 100%);
  color: #fff; text-align: center;
}
.blog-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin-bottom: 1rem; }
.blog-hero p { color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto; font-size: 1.12rem; }
.blog-stats { display: flex; justify-content: center; gap: 3rem; margin-top: 2.5rem; }
.bstat-num { display: block; font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1; }
.bstat-lbl { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ----- Toolbar (búsqueda + filtros) ----- */
.blog-toolbar { position: sticky; top: 64px; z-index: 500; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 1rem 0; }
.blog-toolbar .container { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.search-box input {
  width: 100%; padding: .7rem 1rem .7rem 2.6rem; border: 1px solid var(--border-medium, #d6dde4);
  border-radius: 999px; font-family: var(--sans); font-size: .98rem; background: var(--sand-soft);
}
.search-box input:focus { outline: none; border-color: var(--primary); background: #fff; }

.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-btn {
  padding: .5rem 1rem; border-radius: 999px; font-family: var(--sans); font-weight: 600; font-size: .9rem;
  color: var(--ink-soft); background: var(--sand-soft); border: 1px solid var(--line); transition: all .2s var(--ease);
}
.filter-btn:hover { color: var(--primary); border-color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.sort-box select {
  padding: .65rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--sans); font-size: .92rem; color: var(--ink); background: var(--sand-soft); cursor: pointer;
}

/* ----- Layout ----- */
.blog-content { padding: 3rem 0 4.5rem; background: var(--sand-soft); }
.blog-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 3rem; align-items: start; }
.results-counter { color: var(--ink-soft); font-weight: 600; margin-bottom: 1.4rem; }

/* ----- Grid de tarjetas ----- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.blog-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--sh);
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }

.blog-card-img {
  position: relative; display: block; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.blog-card:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-cat {
  position: absolute; top: .9rem; left: .9rem; background: rgba(255,255,255,.93); color: var(--primary);
  padding: .3rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.blog-card-time {
  position: absolute; bottom: .9rem; right: .9rem; background: rgba(15,47,79,.78); color: #fff;
  padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem;
}
.blog-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-body h2 { font-size: 1.25rem; line-height: 1.3; margin-bottom: .6rem; }
.blog-card-body h2 a:hover { color: var(--primary); }
.blog-card-body p { font-size: .96rem; line-height: 1.6; flex: 1; }
.blog-card-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; color: var(--primary); font-weight: 700; font-size: .92rem; }
.blog-card-link i { transition: transform .25s var(--ease); }
.blog-card:hover .blog-card-link i { transform: translateX(4px); }

.no-results { text-align: center; padding: 3rem; color: var(--ink-soft); font-size: 1.1rem; }

/* ----- Sidebar ----- */
.blog-sidebar { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 1.6rem; }
.blog-sidebar .sidebar-widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.blog-sidebar .sidebar-widget h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.cat-list li { margin-bottom: .3rem; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center; padding: .6rem .7rem; border-radius: 8px;
  font-weight: 600; color: var(--ink-soft); transition: background .2s var(--ease), color .2s var(--ease);
}
.cat-list a:hover { background: var(--sand-soft); color: var(--primary); }
.cat-list a span { background: var(--sand); color: var(--navy); font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; font-weight: 700; }
.sidebar-pueblos { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-pueblos a { display: flex; align-items: center; gap: .6rem; padding: .55rem .4rem; border-radius: 8px; font-weight: 600; color: var(--ink-soft); font-size: .95rem; transition: background .2s var(--ease), color .2s var(--ease); }
.sidebar-pueblos a:hover { background: var(--sand-soft); color: var(--primary); }
.sidebar-pueblos i { color: var(--teal); }

/* ----- Responsive ----- */
@media (max-width: 920px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .blog-sidebar .sidebar-widget { flex: 1; min-width: 260px; }
}
@media (max-width: 768px) {
  .blog-toolbar { position: static; }
  .blog-toolbar .container { flex-direction: column; align-items: stretch; }
  .filter-row { justify-content: flex-start; overflow-x: auto; }
  .blog-stats { gap: 1.8rem; }
}
