/* ══════════════════════════════════════
   Astra Caribe — Ghost Theme Stylesheet
   Based on "Cielo Abierto" direction
   ══════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #1A1F36;
  --text-secondary: #5A6178;
  --text-muted: #8B90A0;
  --primary: #1B4B9A;
  --primary-light: #E8EFF8;
  --featured-bg: #F4F9FD;
  --accent: #C4A235;
  --accent-light: #FBF6E4;
  --danger: #CC2D37;
  --divider: #ECEDF0;
  --tag-bg: #E8EFF8;
  --tag-text: #1B4B9A;
  --input-bg: #FFFFFF;
  --input-border: #D0D5E0;
  --radius: 6px;
  --radius-lg: 10px;
  --max-width: 1100px;
  --content-width: 720px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-main); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(27, 75, 154, 0.12); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--divider);
}
.site-header-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-brand {
  display: flex; align-items: center; gap: 10px;
}
.site-brand img {
  width: 36px; height: 36px; object-fit: contain;
}
.site-brand-name {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text);
}

/* Navigation */
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
  font-size: 14px; font-weight: 400; color: var(--text-secondary);
  padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: all 0.2s; text-decoration: none;
}
.site-nav a:hover,
.site-nav a.nav-current,
.site-nav .nav-current a {
  color: var(--primary); font-weight: 600;
  border-bottom-color: var(--primary);
}

/* Social links */
.site-socials { display: flex; gap: 12px; align-items: center; }
.site-socials a { color: var(--text-muted); transition: color 0.2s; }
.site-socials a:hover { color: var(--primary); }
.site-socials svg { width: 20px; height: 20px; }

/* ── Hero ── */
.site-hero {
  padding: 72px 24px 80px; text-align: center;
  background: var(--bg);
}
.site-hero-logo {
  width: 120px; height: 120px; object-fit: contain;
  margin: 0 auto 24px;
}
.site-hero h1 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 12px;
}
.site-hero p {
  font-size: 17px; font-weight: 400; line-height: 1.6;
  max-width: 520px; margin: 0 auto;
  color: var(--text-secondary);
}
/* #3 — línea de horizonte dorada */
.hero-horizon {
  width: 64px; height: 3px; margin: 28px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
}

/* ── Post Grid (Magazine Layout) ── */
.post-feed {
  max-width: var(--max-width); margin: 0 auto;
  padding: 48px 24px 64px;
}
.post-feed-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 24px;
}
/* #3 — encabezado de sección con regla dorada */
.feed-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.feed-head .post-feed-title { margin-bottom: 0; }
.feed-head .gold-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent-light), transparent); }
.post-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

/* ── Post Card ── */
.post-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}
.post-card-link {
  display: block; padding: 20px;
  color: inherit; text-decoration: none;
}
.post-card:hover {
  box-shadow: 0 4px 20px rgba(27, 75, 154, 0.12);
  transform: translateY(-3px);
}
.post-card.featured {
  grid-column: 1 / -1;
  background: var(--featured-bg);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.post-card.featured:hover {
  box-shadow: 0 6px 28px rgba(27, 75, 154, 0.12);
  transform: translateY(-3px);
}
/* #2 — destacado editorial: imagen + texto lado a lado */
.post-card.featured .post-card-link {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 0; padding: 0; align-items: stretch;
}
.post-card.featured .pf-media { min-height: 320px; }
.post-card.featured .pf-image { width: 100%; height: 100%; object-fit: cover; }
.post-card.featured .pf-body {
  padding: 40px; display: flex; flex-direction: column; justify-content: center;
}
.post-card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.post-card.featured .post-card-meta { margin-bottom: 16px; }
.post-card-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
}
.post-card-date {
  font-size: 12px; color: var(--text-muted);
}
.post-card-title {
  font-size: 18px; font-weight: 700; line-height: 1.3;
  color: var(--text); margin-bottom: 10px;
  letter-spacing: -0.01em; transition: color 0.2s;
}
.post-card:hover .post-card-title { color: var(--primary); }
.post-card.featured .post-card-title { font-size: 28px; }
.post-card-excerpt {
  font-size: 14px; line-height: 1.6; color: var(--text-secondary);
  margin-bottom: 8px;
}
.post-card.featured .post-card-excerpt { font-size: 16px; margin-bottom: 16px; }
.post-card-readmore {
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.post-card-readtime {
  font-size: 12px; color: var(--text-muted);
}

/* Featured image on card */
.post-card-image {
  border-radius: var(--radius);
  margin-bottom: 16px;
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}

/* #1 — placeholder de marca cuando no hay feature_image */
.ph {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1.5px 1.5px at 18% 28%, rgba(27,75,154,0.30) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 72% 62%, rgba(196,162,53,0.55) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 86% 24%, rgba(27,75,154,0.22) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 38% 74%, rgba(27,75,154,0.18) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 55% 40%, rgba(196,162,53,0.35) 1px, transparent 0),
    linear-gradient(155deg, #EFF4FB 0%, #E2EBF7 100%);
}
.ph::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(27,75,154,0.06));
}
.ph-mono {
  font-size: 40px; font-weight: 700; letter-spacing: 0.06em;
  color: rgba(27,75,154,0.16);
}
.post-card-link .ph { border-radius: var(--radius); margin-bottom: 16px; }
.post-card.featured .ph { aspect-ratio: auto; height: 100%; border-radius: 0; margin-bottom: 0; }

/* ── Subscribe Banner ── */
.subscribe-banner {
  background: var(--bg); padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--divider);
}
.subscribe-banner h3 {
  font-size: 22px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
}
.subscribe-banner p {
  font-size: 15px; color: var(--text-secondary);
  max-width: 420px; margin: 0 auto 24px;
}
.subscribe-form {
  display: flex; gap: 10px; max-width: 400px;
  margin: 0 auto; justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1; padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid var(--input-border); background: var(--input-bg);
  font-size: 14px; font-family: var(--font-main);
  outline: none; color: var(--text);
}
.subscribe-form input[type="email"]:focus {
  border-color: var(--primary);
}
.subscribe-form button {
  padding: 10px 20px; border-radius: var(--radius);
  border: none; background: var(--primary); color: #FFFFFF;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: var(--font-main); white-space: nowrap;
  transition: background 0.2s;
}
.subscribe-form button:hover { background: #163D7E; }

/* ── Footer ── */
.site-footer {
  background: #FFFFFF; padding: 48px 24px 32px;
  border-top: 1px solid var(--divider);
}
.site-footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 32px;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.footer-brand span { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.footer-tagline {
  font-size: 13px; color: var(--text-secondary); opacity: 0.7;
  max-width: 300px; line-height: 1.6;
}
.footer-columns { display: flex; gap: 32px; }
.footer-column { display: flex; flex-direction: column; gap: 10px; }
.footer-column-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-column a {
  font-size: 14px; color: var(--text-secondary); opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-column a:hover { opacity: 1; }
.footer-bottom {
  max-width: var(--max-width); margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid var(--divider);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom span {
  font-size: 12px; color: var(--text-muted);
}

/* ── Single Post ── */
.post-content {
  max-width: var(--content-width); margin: 0 auto;
  padding: 48px 24px 80px;
}
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--primary); font-weight: 500;
  margin-bottom: 32px;
}
.post-back:hover { text-decoration: underline; }
.post-header-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.post-header-tag {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
  background: var(--accent-light); padding: 4px 10px;
  border-radius: 4px;
}
.post-header-date { font-size: 13px; color: var(--text-muted); }
.post-title {
  font-size: 36px; font-weight: 700; line-height: 1.2;
  color: var(--text); margin-bottom: 16px; letter-spacing: -0.02em;
}
.post-excerpt {
  font-size: 18px; line-height: 1.6; color: var(--text-secondary);
  margin-bottom: 32px;
}
.post-feature-image {
  width: 100%; border-radius: var(--radius-lg);
  margin-bottom: 32px; aspect-ratio: 16/9; object-fit: cover;
}
.post-author {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 32px; border-bottom: 1px solid var(--divider);
  margin-bottom: 40px;
}
.post-author img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.post-author-name { font-size: 14px; font-weight: 600; color: var(--text); }
.post-author-role { font-size: 12px; color: var(--text-muted); }

/* Article body (Ghost content) */
.gh-content {
  font-size: 17px; line-height: 1.8; color: var(--text);
}
.gh-content p { margin-bottom: 20px; color: var(--text-secondary); }
.gh-content h2 {
  font-size: 22px; font-weight: 700; margin: 32px 0 16px;
  color: var(--text); letter-spacing: -0.01em;
}
.gh-content h3 {
  font-size: 19px; font-weight: 600; margin: 28px 0 12px;
  color: var(--text);
}
.gh-content ul, .gh-content ol {
  margin: 16px 0 24px 24px; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 8px;
}
.gh-content li { line-height: 1.7; }
.gh-content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 20px; margin: 24px 0;
  font-style: italic; color: var(--text-secondary);
}
.gh-content a { color: var(--primary); text-decoration: underline; }
.gh-content img {
  border-radius: var(--radius); margin: 24px 0;
}
.gh-content figcaption {
  font-size: 13px; color: var(--text-muted); text-align: center;
  margin-top: 8px;
}
.gh-content hr {
  border: none; border-top: 1px solid var(--divider);
  margin: 32px 0;
}
/* Koenig editor wide/full image classes */
.gh-content .kg-width-wide {
  max-width: 1040px; margin-left: auto; margin-right: auto;
}
.gh-content .kg-width-full {
  max-width: none; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
  width: 100vw;
}
.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
  width: 100%;
}
.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
  width: 100%; border-radius: var(--radius);
}
.gh-content .kg-card {
  margin: 24px 0;
}
.gh-content .kg-bookmark-card {
  border: 1px solid var(--divider); border-radius: var(--radius);
  overflow: hidden;
}
.gh-content .kg-bookmark-container {
  display: flex; text-decoration: none; color: inherit;
}
.gh-content .kg-bookmark-content {
  flex: 1; padding: 16px;
}
.gh-content .kg-bookmark-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
.gh-content .kg-bookmark-description {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
  overflow: hidden; max-height: 3em;
}
.gh-content .kg-bookmark-metadata {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 12px; color: var(--text-muted);
}
.gh-content .kg-bookmark-icon {
  width: 16px; height: 16px;
}
.gh-content .kg-bookmark-thumbnail {
  width: 200px; min-height: 100%;
}
.gh-content .kg-bookmark-thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
}
.gh-content .kg-embed-card {
  display: flex; justify-content: center;
}
.gh-content .kg-embed-card iframe {
  max-width: 100%;
}

/* ── Page (Acerca) ── */
.page-content {
  max-width: var(--content-width); margin: 0 auto;
  padding: 56px 24px 80px;
}
.page-header { text-align: center; margin-bottom: 48px; }
.page-header-image {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 20px;
}
.page-header h1 {
  font-size: 28px; font-weight: 700; color: var(--text);
  margin-bottom: 4px; letter-spacing: -0.02em;
}
.page-header .page-role {
  font-size: 15px; color: var(--primary); font-weight: 500;
}
.page-body {
  font-size: 16px; line-height: 1.75; color: var(--text-secondary);
}
.page-body p { margin-bottom: 20px; }

/* Goals box */
.goals-box {
  background: var(--featured-bg); border-radius: var(--radius-lg);
  padding: 32px; margin: 40px 0;
}
.goals-box h3 {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 16px;
}
.goals-box ul {
  list-style: none; padding: 0; display: flex;
  flex-direction: column; gap: 12px;
}
.goals-box li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--text-secondary); line-height: 1.5;
}
.goals-box li::before {
  content: '✦'; color: var(--accent); font-weight: 700;
  font-size: 14px; margin-top: 2px;
}

/* Social links on page */
.page-socials {
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--divider);
}
.page-socials h3 {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 16px;
}
.page-socials-list { display: flex; gap: 16px; }
.page-socials-list a {
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 14px; background: var(--tag-bg); color: var(--tag-text);
  font-weight: 500; transition: all 0.2s;
}
.page-socials-list a:hover { background: var(--primary); color: #FFFFFF; }

/* ── Artículos (channel page) ── */
.articulos-title {
  font-size: 28px; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.articulos-sub {
  font-size: 15px; color: var(--text-secondary); margin-bottom: 32px;
  max-width: 560px;
}
.articulos-empty {
  font-size: 15px; color: var(--text-muted);
  padding: 48px 0; text-align: center;
}

/* ── Category Filter (tag page + artículos) ── */
.tag-filter { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.tag-filter a,
.tag-filter button {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  font-weight: 500; background: var(--tag-bg); color: var(--tag-text);
  border: none; cursor: pointer; font-family: var(--font-main);
  transition: all 0.2s;
}
.tag-filter a:hover,
.tag-filter a.active,
.tag-filter button:hover,
.tag-filter button.active {
  background: var(--primary); color: #FFFFFF;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card.featured .post-card-link { grid-template-columns: 1fr; }
  .post-card.featured .pf-media { min-height: 200px; }
  .post-card.featured .pf-body { padding: 24px; }
  .post-card.featured .post-card-title { font-size: 22px; }
  .site-nav { gap: 16px; }
  .site-socials { display: none; }
  .site-hero { padding: 48px 24px 56px; }
  .site-hero-logo { width: 88px; height: 88px; }
  .site-hero h1 { font-size: 26px; }
  .post-title { font-size: 28px; }
  .footer-columns { flex-direction: column; gap: 24px; }
  .subscribe-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .site-header-inner { padding: 0 16px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 13px; }
  .post-feed { padding: 32px 16px 48px; }
  .post-content { padding: 32px 16px 64px; }
  .page-content { padding: 40px 16px 64px; }
}
