/* =============================================================
   ATERYM POSTS — Frontend CSS
   Paleta: #0693e3 (azul), #000 (negro), #fff (blanco)
   Font: Inter (Google Fonts)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Variables ---------- */
:root {
  --ap-blue:      #0693e3;
  --ap-blue-dk:   #0578c2;
  --ap-black:     #000000;
  --ap-white:     #ffffff;
  --ap-gray-dark: #32373c;
  --ap-gray:      #555555;
  --ap-gray-mid:  #888888;
  --ap-gray-lt:   #abb8c3;
  --ap-gray-bg:   #f5f6f8;
  --ap-border:    #e0e4ea;
  --ap-radius-sm: 8px;
  --ap-radius:    12px;
  --ap-radius-btn:29px;
  --ap-shadow:    0 4px 20px rgba(0,0,0,.08);
  --ap-shadow-hov:0 8px 32px rgba(6,147,227,.18);
  --ap-font:      'Inter', system-ui, sans-serif;
  --ap-max-w:     1200px;
  --ap-content-w: 780px;
}

/* ---------- Reset básico ---------- */
.aterym-page-wrap *,
.aterym-grid *,
.aterym-single-post * {
  box-sizing: border-box;
}

/* ---------- Contenedor ---------- */
.aterym-container {
  width: 100%;
  max-width: var(--ap-max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

/* =============================================================
   HERO (post individual)
   ============================================================= */

.aterym-hero {
  position: relative;
  background: var(--ap-black);
  color: var(--ap-white);
  padding-block: 120px 80px;
  margin-bottom: 56px;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
}

.aterym-hero--no-img {
  background: linear-gradient(135deg, #0693e3 0%, #003d7a 100%);
}

.aterym-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}

.aterym-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.60) 100%);
  z-index: 1;
}

.aterym-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--ap-content-w);
}

/* ---------- Post meta bar ---------- */
.aterym-post-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* ---------- Título ---------- */
.aterym-post-title {
  font-family: var(--ap-font);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ap-white);
  margin: 0 0 16px;
}

.aterym-post-subtitle {
  font-family: var(--ap-font);
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,.85);
  margin: 0 0 20px;
  max-width: 640px;
}

/* ---------- Byline ---------- */
.aterym-post-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ap-font);
  font-size: 13px;
  color: rgba(255,255,255,.75);
}

.aterym-byline-sep {
  opacity: .5;
}

/* =============================================================
   LAYOUT: post individual (main + sidebar)
   ============================================================= */

.aterym-post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}

@media (max-width: 900px) {
  .aterym-post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ---------- Prosa ---------- */
.aterym-prose {
  font-family: var(--ap-font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ap-gray-dark);
}

.aterym-prose h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ap-black);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ap-blue);
}

.aterym-prose h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ap-black);
  margin: 32px 0 12px;
}

.aterym-prose h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ap-gray-dark);
  margin: 24px 0 10px;
}

.aterym-prose p {
  margin: 0 0 20px;
}

.aterym-prose a {
  color: var(--ap-blue);
  text-decoration: underline;
}
.aterym-prose a:hover {
  color: var(--ap-blue-dk);
}

.aterym-prose ul,
.aterym-prose ol {
  margin: 0 0 20px 24px;
  padding: 0;
}

.aterym-prose li {
  margin-bottom: 8px;
}

.aterym-prose blockquote {
  border-left: 4px solid var(--ap-blue);
  background: var(--ap-gray-bg);
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
  font-style: italic;
  color: var(--ap-gray);
}

.aterym-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ap-radius-sm);
  margin-block: 8px;
}

.aterym-prose figure {
  margin: 24px 0;
}

.aterym-prose figcaption {
  font-size: 13px;
  color: var(--ap-gray-mid);
  text-align: center;
  margin-top: 8px;
}

.aterym-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}

.aterym-prose th,
.aterym-prose td {
  border: 1px solid var(--ap-border);
  padding: 10px 14px;
  text-align: left;
}

.aterym-prose th {
  background: var(--ap-blue);
  color: var(--ap-white);
  font-weight: 600;
}

.aterym-prose tr:nth-child(even) td {
  background: var(--ap-gray-bg);
}

/* =============================================================
   VIDEO EMBED
   ============================================================= */

.aterym-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--ap-radius);
  background: var(--ap-black);
  margin-bottom: 32px;
}

.aterym-video-wrap iframe,
.aterym-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================================
   TAGS
   ============================================================= */

.aterym-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
  font-family: var(--ap-font);
  font-size: 14px;
  color: var(--ap-gray);
}

.aterym-tag-link {
  background: var(--ap-gray-bg);
  color: var(--ap-gray-dark);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-btn);
  padding: 4px 14px;
  text-decoration: none;
  font-size: 13px;
  transition: background .2s, color .2s;
}
.aterym-tag-link:hover {
  background: var(--ap-blue);
  color: var(--ap-white);
  border-color: var(--ap-blue);
}

/* =============================================================
   NAVEGACIÓN prev/next
   ============================================================= */

.aterym-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--ap-border);
}

.aterym-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 20px;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  background: var(--ap-white);
  transition: border-color .2s, box-shadow .2s;
}
.aterym-post-nav__item:hover {
  border-color: var(--ap-blue);
  box-shadow: var(--ap-shadow-hov);
}

.aterym-post-nav__next {
  text-align: right;
}

.aterym-post-nav__label {
  font-family: var(--ap-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--ap-blue);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.aterym-post-nav__ttl {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-black);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .aterym-post-nav {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   SIDEBAR
   ============================================================= */

.aterym-post-sidebar {
  position: sticky;
  top: 24px;
}

.aterym-sidebar-widget {
  background: var(--ap-white);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.aterym-sidebar-widget__title {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ap-blue);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ap-blue);
}

/* Related */
.aterym-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aterym-related-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.aterym-related-item__img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: var(--ap-radius-sm);
  display: block;
}
.aterym-related-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aterym-related-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aterym-related-item__title {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-black);
  text-decoration: none;
  line-height: 1.35;
}
.aterym-related-item__title:hover {
  color: var(--ap-blue);
}

.aterym-related-item__date {
  font-family: var(--ap-font);
  font-size: 12px;
  color: var(--ap-gray-mid);
}

/* Categories */
.aterym-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aterym-cat-list li a {
  font-family: var(--ap-font);
  font-size: 14px;
  color: var(--ap-gray-dark);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--ap-border);
  transition: color .2s;
}
.aterym-cat-list li a:hover {
  color: var(--ap-blue);
}

.aterym-cat-list li a span {
  color: var(--ap-gray-mid);
  font-size: 12px;
}

/* =============================================================
   ARCHIVE HEADER
   ============================================================= */

.aterym-archive-header {
  background: linear-gradient(135deg, #0693e3 0%, #003d7a 100%);
  color: var(--ap-white);
  padding-block: 60px 48px;
  margin-bottom: 48px;
}

.aterym-archive-header__title {
  font-family: var(--ap-font);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ap-white);
}

.aterym-archive-header__desc {
  font-family: var(--ap-font);
  font-size: 17px;
  color: rgba(255,255,255,.85);
  max-width: 560px;
}

/* =============================================================
   FILTROS
   ============================================================= */

.aterym-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.aterym-filter-btn {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ap-gray-dark);
  background: var(--ap-white);
  border: 1.5px solid var(--ap-border);
  border-radius: var(--ap-radius-btn);
  padding: 8px 20px;
  text-decoration: none;
  transition: all .2s;
}
.aterym-filter-btn:hover,
.aterym-filter-btn.is-active {
  background: var(--ap-blue);
  color: var(--ap-white);
  border-color: var(--ap-blue);
}

/* =============================================================
   GRID DE POSTS
   ============================================================= */

.aterym-grid {
  display: grid;
  gap: 28px;
  margin-bottom: 48px;
}

.aterym-grid--cols-1 { grid-template-columns: 1fr; }
.aterym-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.aterym-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.aterym-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .aterym-grid--cols-3,
  .aterym-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .aterym-grid--cols-2,
  .aterym-grid--cols-3,
  .aterym-grid--cols-4 { grid-template-columns: 1fr; }
}

/* =============================================================
   CARD
   ============================================================= */

.aterym-card {
  background: var(--ap-white);
  border-radius: var(--ap-radius);
  overflow: hidden;
  box-shadow: var(--ap-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.aterym-card:hover {
  box-shadow: var(--ap-shadow-hov);
  transform: translateY(-4px);
}

/* Imagen */
.aterym-card__img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--ap-gray-bg);
}
.aterym-card__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: unset;
  transition: transform .35s;
}
.aterym-card:hover .aterym-card__img-wrap img {
  transform: scale(1.02);
}

.aterym-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0693e3 0%, #003d7a 100%);
}

/* Cuerpo */
.aterym-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

/* Meta */
.aterym-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aterym-card__date {
  font-family: var(--ap-font);
  font-size: 12px;
  color: var(--ap-gray-mid);
}

/* Título */
.aterym-card__title {
  font-family: var(--ap-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.aterym-card__title a {
  color: var(--ap-black);
  text-decoration: none;
  transition: color .2s;
}
.aterym-card__title a:hover {
  color: var(--ap-blue);
}

/* Excerpt */
.aterym-card__excerpt {
  font-family: var(--ap-font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ap-gray);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Link */
.aterym-card__link {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  transition: gap .2s, color .2s;
}
.aterym-card__link:hover {
  gap: 8px;
  color: var(--ap-blue-dk);
}

/* =============================================================
   BADGES Y CATEGORÍAS
   ============================================================= */

.aterym-badge {
  font-family: var(--ap-font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--ap-blue);
  color: var(--ap-white);
  border-radius: var(--ap-radius-btn);
  padding: 4px 12px;
  white-space: nowrap;
}

.aterym-badge--overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.aterym-category-link {
  font-family: var(--ap-font);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--ap-blue);
  color: var(--ap-white);
  text-decoration: none;
  border-radius: var(--ap-radius-btn);
  padding: 4px 14px;
  white-space: nowrap;
  transition: background .2s;
}
.aterym-category-link:hover {
  background: var(--ap-blue-dk);
  color: var(--ap-white);
}

/* =============================================================
   BOTÓN
   ============================================================= */

.aterym-btn {
  display: inline-block;
  font-family: var(--ap-font);
  font-size: 15px;
  font-weight: 600;
  background: var(--ap-blue);
  color: var(--ap-white);
  border-radius: var(--ap-radius-btn);
  padding: 12px 28px;
  text-decoration: none;
  border: 2px solid var(--ap-blue);
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.aterym-btn:hover {
  background: var(--ap-blue-dk);
  border-color: var(--ap-blue-dk);
  box-shadow: 0 4px 16px rgba(6,147,227,.3);
}

.aterym-btn--outline {
  background: transparent;
  color: var(--ap-blue);
}
.aterym-btn--outline:hover {
  background: var(--ap-blue);
  color: var(--ap-white);
}

/* =============================================================
   PAGINACIÓN
   ============================================================= */

.aterym-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0;
}

.aterym-pagination .page-numbers {
  font-family: var(--ap-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-gray-dark);
  background: var(--ap-white);
  border: 1.5px solid var(--ap-border);
  border-radius: var(--ap-radius-sm);
  padding: 8px 14px;
  text-decoration: none;
  transition: all .2s;
}
.aterym-pagination .page-numbers:hover,
.aterym-pagination .page-numbers.current {
  background: var(--ap-blue);
  color: var(--ap-white);
  border-color: var(--ap-blue);
}

/* =============================================================
   ARCHIVE WRAP
   ============================================================= */

.aterym-archive-wrap {
  padding-bottom: 80px;
}

.aterym-no-posts {
  font-family: var(--ap-font);
  font-size: 16px;
  color: var(--ap-gray);
  text-align: center;
  padding: 48px;
}

/* =============================================================
   SHORTCODE: nota individual inline
   ============================================================= */

.aterym-single-post {
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  overflow: hidden;
  margin: 32px 0;
  background: var(--ap-white);
  box-shadow: var(--ap-shadow);
}

.aterym-single-post__hero img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.aterym-single-post__inner {
  padding: 36px 40px;
}

.aterym-single-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.aterym-single-post__title {
  font-family: var(--ap-font);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: var(--ap-black);
  margin: 0 0 14px;
}

.aterym-single-post__subtitle {
  font-family: var(--ap-font);
  font-size: 17px;
  color: var(--ap-gray);
  margin: 0 0 24px;
}

.aterym-single-post__date,
.aterym-single-post__author {
  font-family: var(--ap-font);
  font-size: 13px;
  color: var(--ap-gray-mid);
}

.aterym-single-post__footer {
  margin-top: 28px;
}

@media (max-width: 640px) {
  .aterym-single-post__inner { padding: 24px 20px; }
}
