/* ==========================================================================
   BLOG GEOAXIS — se carga después de main.css y home.css
   ========================================================================== */

/* ---------------------------------------------------------------- portada */
.page-blog .main-content > .blog-hero {
  padding-top: 110px;
  padding-bottom: 50px;
  position: relative;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(212, 255, 0, 0.12), transparent 55%),
    repeating-linear-gradient(0deg, rgba(212, 255, 0, 0.04) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(212, 255, 0, 0.04) 0 1px, transparent 1px 48px);
  border-bottom: 1px solid rgba(212, 255, 0, 0.12);
  max-width: none;
}
.blog-kicker {
  color: var(--lima);
  font-family: "Skyrox", sans-serif;
  letter-spacing: 3px;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 18px;
}
.blog-hero h1 span { display: block; }
.blog-hero p:last-child {
  max-width: 560px;
  line-height: 1.6;
  color: rgba(245, 245, 241, 0.8);
  border-left: 3px solid var(--lima);
  padding-left: 18px;
}

/* ------------------------------------------------------------ filtros */
.page-blog .main-content > .blog-list { padding-top: 40px; }
.blog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.chip {
  padding: 8px 16px;
  border: 1px solid rgba(212, 255, 0, 0.3);
  border-radius: 999px;
  color: rgba(245, 245, 241, 0.8);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--lima); color: var(--lima); }
.chip.is-active { background: var(--lima); border-color: var(--lima); color: var(--navy); font-weight: 700; }

/* ------------------------------------------------------------ tarjetas */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  border: 1px solid rgba(212, 255, 0, 0.15);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 255, 0, 0.55);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(212, 255, 0, 0.12);
}
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.post-card__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #060b1c;
}
.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.post-card:hover .post-card__img img { transform: scale(1.06); }
.post-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 2.5rem;
  color: rgba(212, 255, 0, 0.35);
}
.post-chip {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 12px;
  border: 1px solid var(--lima);
  border-radius: 5px;
  background: rgba(11, 19, 43, 0.85);
  color: var(--lima);
  font-family: "Skyrox", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.post-chip--static { position: static; display: inline-block; }
.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: rgba(245, 245, 241, 0.55);
  margin-bottom: 10px;
}
.post-card h2 {
  font-family: "Gotham", sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.post-excerpt {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(245, 245, 241, 0.72);
  margin-bottom: 14px;
}
.post-card .bento-more { margin-top: auto; }

/* La más reciente, grande */
@media (min-width: 993px) {
  .post-card.is-featured { grid-column: 1 / -1; }
  .post-card.is-featured .post-card__link { flex-direction: row; }
  .post-card.is-featured .post-card__img { flex: 0 0 58%; aspect-ratio: auto; min-height: 380px; }
  .post-card.is-featured .post-card__img img { position: absolute; inset: 0; }
  .post-card.is-featured .post-card__body { justify-content: center; padding: 40px; }
  .post-card.is-featured h2 { font-size: 1.8rem; }
  .post-card.is-featured .bento-more { margin-top: 10px; }
}

.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  color: rgba(245, 245, 241, 0.6);
}

.blog-empty {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed rgba(212, 255, 0, 0.25);
  border-radius: 18px;
  color: rgba(245, 245, 241, 0.7);
}
.blog-empty > i { font-size: 2.6rem; color: var(--lima); margin-bottom: 18px; }
.blog-empty h1, .blog-empty h2 { color: var(--paper); margin-bottom: 10px; }
.blog-empty .btn-geo { margin-top: 24px; }
.page-blog .main-content > .blog-empty--page { margin: 120px auto 0; max-width: 640px; }

/* ------------------------------------------------------------ artículo */
.page-blog .main-content > .post { max-width: calc(860px + 10%); margin: 0 auto; padding: 90px 5% 0; }
.post-header { margin-bottom: 30px; }
.post-back {
  display: inline-block;
  margin: 0 16px 20px 0;
  color: rgba(245, 245, 241, 0.6);
  text-decoration: none;
  font-family: "Skyrox", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
}
.post-back:hover { color: var(--lima); }
.post-header h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.12;
  margin: 18px 0 20px;
}
.post-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: rgba(245, 245, 241, 0.7);
  font-size: 0.9rem;
}
.post-facts i { color: var(--lima); margin-right: 6px; }

.post-cover {
  margin: 0 0 36px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(212, 255, 0, 0.2);
}
.post-cover img { display: block; width: 100%; max-height: 560px; object-fit: cover; }

.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(245, 245, 241, 0.88);
}
.post-body > * + * { margin-top: 1.1em; }
.post-body .post-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--paper);
  border-left: 3px solid var(--lima);
  padding-left: 18px;
}
.post-body h2, .post-body h3 {
  font-family: "Skyrox", sans-serif;
  color: var(--lima);
  margin-top: 1.8em;
  letter-spacing: 1px;
}
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.2rem; }
.post-body ul { padding-left: 1.3em; }
.post-body li + li { margin-top: 0.35em; }
.post-body li::marker { color: var(--lima); }
.post-body a { color: var(--lima); }
.post-body strong { color: var(--paper); }

.post-gallery { margin-top: 50px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gallery-grid figure { margin: 0; }
.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 255, 0, 0.15);
  cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-grid figcaption { font-size: 0.8rem; color: rgba(245, 245, 241, 0.6); margin-top: 6px; }

.post-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 50px;
  padding-top: 26px;
  border-top: 1px solid rgba(212, 255, 0, 0.12);
}
.post-share span { letter-spacing: 2px; font-size: 0.85rem; margin-right: 6px; }
.post-share a, .post-share button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(212, 255, 0, 0.4);
  background: rgba(212, 255, 0, 0.05);
  color: var(--lima);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.25s;
}
.post-share a:hover, .post-share button:hover, .post-share .is-done {
  background: var(--lima);
  color: var(--navy);
}

.page-blog .main-content > .blog-related { margin-top: 80px; }

.admin-strip {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #1c2a14;
  border-bottom: 1px solid var(--lima);
  font-size: 0.9rem;
}
.admin-strip a { color: var(--lima); }

/* Galería a pantalla completa */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 16, 0.95);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { margin-top: 12px; color: rgba(245, 245, 241, 0.8); }
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(212, 255, 0, 0.5);
  background: rgba(11, 19, 43, 0.8);
  color: var(--lima);
  font-size: 1.2rem;
  cursor: pointer;
}
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 992px) {
  .page-blog .main-content > .blog-hero { padding: 50px 16px 36px; }
  .page-blog .main-content > .blog-list,
  .page-blog .main-content > .post { padding-left: 16px; padding-right: 16px; }
  .page-blog .main-content > .post { padding-top: 30px; }
  .post-grid { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================== */
.is-admin .main-content.admin { padding-left: 0; padding-top: 0; }
.main-content.admin > .admin-wrap { max-width: 1200px; margin: 0 auto; padding: 30px 20px 80px; }
.main-content.admin > .admin-narrow { max-width: 520px; }
.admin h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 14px 0 24px; }
.admin-muted { color: rgba(245, 245, 241, 0.6); text-decoration: none; }
.admin-muted:hover { color: var(--lima); }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.admin-top__right { display: flex; gap: 20px; align-items: center; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.admin-title .btn-geo { padding: 12px 24px; }

.admin-link {
  background: none;
  border: 0;
  color: rgba(245, 245, 241, 0.75);
  font: inherit;
  cursor: pointer;
  padding: 6px 4px;
}
.admin-link:hover { color: var(--lima); }
.admin-link.is-danger:hover { color: #ff6b6b; }

.admin-flash {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid rgba(212, 255, 0, 0.5);
  background: rgba(212, 255, 0, 0.08);
}
.admin-flash.is-error { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.1); color: #ffb3b3; }

.main-content.admin > .admin-login {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 40px 30px;
  text-align: center;
  border: 1px solid rgba(212, 255, 0, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-login img { max-width: 220px; height: auto; margin-bottom: 20px; }
.admin-login form { text-align: left; margin: 20px 0; display: grid; gap: 18px; }

.admin-form label { display: grid; gap: 6px; margin-bottom: 18px; font-size: 0.9rem; color: rgba(245, 245, 241, 0.85); }
.admin-form small, .admin-login small { color: rgba(245, 245, 241, 0.5); }
.admin input[type=text], .admin input[type=password], .admin input[type=date],
.admin select, .admin textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 245, 241, 0.18);
  background: #060b1c;
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
}
.admin textarea { resize: vertical; line-height: 1.6; }
.admin input:focus, .admin select:focus, .admin textarea:focus {
  outline: none;
  border-color: var(--lima);
  box-shadow: 0 0 0 3px rgba(212, 255, 0, 0.15);
}
.admin input[type=date] { color-scheme: dark; }
.admin input[type=file] { width: 100%; color: rgba(245, 245, 241, 0.7); font-size: 0.85rem; }

.admin-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-cols aside { position: sticky; top: 20px; display: grid; gap: 18px; }
.admin-card {
  padding: 20px;
  border: 1px solid rgba(212, 255, 0, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-card h2 { font-family: "Gotham", sans-serif; text-transform: none; letter-spacing: 0; font-size: 1rem; margin-bottom: 12px; }
.admin-card .btn-geo { width: 100%; text-align: center; margin-top: 6px; }
.admin-check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; cursor: pointer; }
.admin-check input { margin-top: 4px; accent-color: var(--lima); width: 18px; height: 18px; }
.admin-check--small { font-size: 0.85rem; margin: 8px 0 12px !important; }
.admin-cover { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 6px; }
.admin-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 10px; }
.admin-previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--lima); }
.admin-gallery { display: grid; gap: 12px; margin-bottom: 14px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.admin-gallery__item { display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; align-items: center; }
.admin-gallery__item img { grid-row: span 2; width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.admin-gallery__item input[type=text] { padding: 6px 10px; font-size: 0.85rem; }
.admin-gallery__item .admin-check--small { margin: 0 !important; }

.admin-help { font-size: 0.85rem; color: rgba(245, 245, 241, 0.7); margin-top: -8px; }
.admin-help summary { cursor: pointer; color: var(--lima); }
.admin-help ul { margin: 10px 0 0 1.2em; line-height: 1.8; }
.admin-help code { background: #060b1c; padding: 1px 6px; border-radius: 4px; color: var(--lima); }

.admin-list { list-style: none; display: grid; gap: 10px; }
.admin-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 245, 241, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-list li:hover { border-color: rgba(212, 255, 0, 0.35); }
.admin-list__main { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; min-width: 0; }
.admin-list__main img, .admin-list__noimg {
  flex: 0 0 72px; width: 72px; height: 50px; object-fit: cover; border-radius: 6px;
  display: grid; place-items: center; background: #060b1c; color: rgba(212, 255, 0, 0.4);
}
.admin-list__main span { display: grid; gap: 4px; min-width: 0; }
.admin-list__main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-list__main small { color: rgba(245, 245, 241, 0.55); }
.admin-status { font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(245, 245, 241, 0.3); color: rgba(245, 245, 241, 0.6); }
.admin-status.is-live { border-color: var(--lima); color: var(--lima); }
.admin-actions { display: flex; gap: 6px; }

.is-saving { opacity: 0.6; pointer-events: none; }

@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
  .admin-cols aside { position: static; }
  .admin-row { grid-template-columns: 1fr; gap: 0; }
  .admin-list li { grid-template-columns: 1fr auto; }
  .admin-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
