/*
Theme Name: Humildemente Ungido
Theme URI: https://elungidohumildemente.org
Description: Custom dark/gold theme for Humildemente Ungido blog
Version: 1.0
Author: Humildemente Ungido
Text Domain: hu-theme
*/

/* ── FONTS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Lato:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ── VARIABLES ──────────────────────────────────────────── */
:root {
  --bg:          #0a0a0a;
  --bg-card:     #111111;
  --bg-card2:    #161616;
  --gold:        #c9a84c;
  --gold-light:  #e8c96b;
  --gold-dim:    #8a6e2a;
  --cream:       #f0e6d3;
  --cream-dim:   #b8a898;
  --white:       #ffffff;
  --border:      rgba(201,168,76,0.25);
  --border-hover:rgba(201,168,76,0.7);
  --font-serif:  'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body:   'Lato', sans-serif;
  --radius:      4px;
  --max-width:   760px;
  --transition:  0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; display: block; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 400; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);  font-weight: 400; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.4em; color: var(--cream); }

blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-card2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--cream);
}
blockquote cite { display: block; margin-top: 0.5rem; font-size: 0.85rem; color: var(--gold); font-style: normal; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.4em; color: var(--cream); }
li { margin-bottom: 0.4em; }

strong { color: var(--gold-light); }
em { color: var(--cream); }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-logo img { width: 48px; height: 48px; border-radius: 50%; }
.site-logo .logo-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.site-logo .logo-tagline {
  font-size: 0.65rem;
  color: var(--cream-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Main Nav */
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  color: var(--cream-dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover, .site-nav a.current { color: var(--gold); background: rgba(201,168,76,0.08); }

/* Lang toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}
.lang-toggle a {
  color: var(--cream-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}
.lang-toggle a.active { background: var(--gold); color: var(--bg); font-weight: 700; }

/* Social icons in header */
.header-social { display: flex; gap: 0.6rem; }
.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cream-dim);
  font-size: 0.8rem;
  transition: all var(--transition);
}
.header-social a:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.08); }

/* ── HERO BANNER (archive/home) ─────────────────────────── */
.archive-hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}
.archive-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.archive-hero .ornament {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.archive-hero h1 { color: var(--gold); margin-bottom: 0.5rem; }
.archive-hero p { color: var(--cream-dim); max-width: 520px; margin: 0 auto; font-size: 1rem; }

/* ── CATEGORY GRID (TEMAS page / archive list) ──────────── */
.categories-section { padding: 3rem 0 5rem; }
.categories-section h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.4rem;
}
.categories-section .section-sub {
  text-align: center;
  color: var(--cream-dim);
  margin-bottom: 3rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.category-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.12);
}
.category-card:hover::before { opacity: 1; }

.category-card .cat-icon {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  filter: sepia(1) saturate(2) hue-rotate(5deg);
}
.category-card .cat-en {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold);
  line-height: 1.2;
}
.category-card .cat-es {
  font-size: 0.75rem;
  color: var(--cream-dim);
  letter-spacing: 0.05em;
}

/* ── POST GRID (archive) ────────────────────────────────── */
.posts-section { padding: 3rem 0 5rem; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.1);
}
.post-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-card2), #1a1200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
  line-height: 1.35;
  flex: 1;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--gold); }
.post-card-excerpt { font-size: 0.88rem; color: var(--cream-dim); margin-bottom: 1rem; }
.post-card-meta {
  font-size: 0.75rem;
  color: var(--cream-dim);
  display: flex;
  gap: 1rem;
  align-items: center;
}
.post-card-meta .read-more {
  margin-left: auto;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-card-meta .read-more:hover { color: var(--gold-light); }

/* ── SINGLE POST ────────────────────────────────────────── */
.single-post-wrapper { padding: 3rem 0 6rem; }

.post-header { margin-bottom: 3rem; }
.post-header .post-cats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.post-header .post-cat-link {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}
.post-header .post-cat-link:hover { border-color: var(--gold); background: rgba(201,168,76,0.08); }
.post-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 400;
}
.post-meta {
  font-size: 0.8rem;
  color: var(--cream-dim);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.post-featured-img {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-featured-img img { width: 100%; max-height: 460px; object-fit: cover; }

/* Post content */
.post-content { font-size: 1.05rem; line-height: 1.85; }
.post-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--gold);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.post-content h3 { color: var(--gold-light); margin-top: 2rem; }
.post-content p { color: var(--cream); }
.post-content a { color: var(--gold); border-bottom: 1px dotted var(--border); }
.post-content a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.post-content ul li::marker { color: var(--gold); }

/* Scripture callout */
.post-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.75rem;
  background: var(--bg-card2);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
}

/* Post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.post-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
}
.post-tag:hover { color: var(--gold); border-color: var(--border-hover); }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.share-bar span { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-dim); }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--cream-dim);
  transition: all var(--transition);
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.06); }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
.post-nav-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all var(--transition);
}
.post-nav-item:hover { border-color: var(--border-hover); background: var(--bg-card2); }
.post-nav-item .nav-label { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-dim); margin-bottom: 0.4rem; }
.post-nav-item .nav-title { font-family: var(--font-serif); font-size: 1rem; color: var(--gold); line-height: 1.3; }
.post-nav-item.next { text-align: right; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
  font-size: 0.9rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--cream-dim); }
.widget ul li a:hover { color: var(--gold); }

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--cream-dim);
  transition: all var(--transition);
}
.pagination a:hover, .pagination .current {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: #060606;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo-text { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold); }
.footer-brand p { color: var(--cream-dim); font-size: 0.9rem; margin-top: 0.75rem; max-width: 300px; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cream-dim);
  transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-col h4 { font-family: var(--font-serif); color: var(--gold); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--cream-dim); font-size: 0.88rem; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p { color: var(--cream-dim); font-size: 0.78rem; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.btn-gold {
  background: var(--gold);
  color: var(--bg);
}
.btn-gold:hover { background: var(--gold-light); color: var(--bg); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--bg); }

/* ── ORNAMENT DIVIDER ───────────────────────────────────── */
.divider-ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--gold-dim);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .site-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .post-nav { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .container--narrow { padding: 0 1rem; }
}

/* ── WORDPRESS UTILITIES ────────────────────────────────── */
.aligncenter { display: block; margin: 1.5rem auto; }
.alignleft   { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright  { float: right; margin: 0 0 1rem 1.5rem; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--cream-dim); text-align: center; margin-top: 0.4rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
