/*
Theme Name: HDS Blog
Theme URI: https://hostingdelsur.net
Description: Blog theme for Hosting del Sur — inherits design system from Astro via /design-system/
Version: 1.3.0
Author: Hosting del Sur
Text Domain: hds-blog
*/

/* ==========================================================================
   Article typography — emulates Tailwind Typography "prose" without plugin
   ========================================================================== */
.hds-article {
  color: var(--hds-fg);
  font-size: 1.125rem;
  line-height: 1.85;
  letter-spacing: -0.003em;
}
.hds-article > * + * { margin-top: 1.25em; }
.hds-article p { margin: 0 0 1.25em; }
.hds-article h2 {
  margin-top: 2.2em;
  margin-bottom: 1em;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hds-fg);
  letter-spacing: -0.02em;
  font-family: var(--font-display, ui-serif, Georgia, serif);
}
.hds-article h3 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hds-fg);
  letter-spacing: -0.01em;
}
.hds-article h4 {
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hds-fg);
}
.hds-article ul, .hds-article ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}
.hds-article ul { list-style: disc; }
.hds-article ol { list-style: decimal; }
.hds-article li { margin: 0.5em 0; }
.hds-article li::marker { color: var(--color-hds-naranja); }
.hds-article a {
  color: var(--color-hds-naranja);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.hds-article a:hover { text-decoration-thickness: 2px; }
.hds-article blockquote {
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  border-left: 4px solid var(--color-hds-naranja);
  font-style: italic;
  color: var(--hds-fg-soft);
  background: rgba(250, 246, 238, 0.02);
  border-radius: 0 8px 8px 0;
}
.hds-article blockquote p { margin: 0; }
.hds-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  background: rgba(127, 127, 127, 0.12);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  word-break: break-word;
}
.hds-article pre {
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  background: #0F0E0C;
  color: #FAF6EE;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}
.hds-article pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.hds-article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.hds-article figure { margin: 2em 0; }
.hds-article figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--hds-fg-muted);
  margin-top: 0.75em;
  font-style: italic;
}
.hds-article hr {
  margin: 3em auto;
  width: 80%;
  border: 0;
  border-top: 1px solid var(--hds-line);
}
.hds-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95rem;
}
.hds-article th, .hds-article td {
  border: 1px solid var(--hds-line);
  padding: 0.6em 0.9em;
  text-align: left;
}
.hds-article th { background: rgba(127,127,127,0.08); font-weight: 600; }
.hds-article tr:nth-child(even) td { background: rgba(127,127,127,0.04); }
.hds-article table { border-radius: 8px; overflow: hidden; }
.hds-article strong { color: var(--hds-fg); font-weight: 700; }
.hds-article em { font-style: italic; }
.hds-article sup, .hds-article sub { font-size: 0.75em; line-height: 0; }

/* First paragraph after header — slightly larger lead */
.hds-article > p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--hds-fg-soft);
}

/* ==========================================================================
   Blog index — cards have proper vertical breathing room
   ========================================================================== */
.blog-list .glass-card {
  margin-bottom: 2.5rem;
  padding: 2rem 2.25rem;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s ease;
}
.blog-list .glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}
@media (min-width: 768px) {
  .blog-list .glass-card { padding: 2.25rem 2.5rem; }
}

/* ==========================================================================
   Single post — wider container + post-nav spacing
   ========================================================================== */
.hds-single {
  max-width: min(80%, 1600px);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hds-single .post-footer {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--hds-line);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   WordPress utility overrides
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--hds-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-hds-naranja);
}

/* Align WordPress caption blocks */
.wp-caption {
  max-width: 100%;
  text-align: center;
}
.wp-caption .wp-caption-text {
  font-size: 0.875rem;
  color: var(--hds-fg-muted);
  font-style: italic;
  margin-top: 0.5em;
}

/* WordPress image alignment helpers */
.alignleft { float: left; margin: 0.5em 1.5em 1em 0; max-width: 100%; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; max-width: 100%; }
.aligncenter { display: block; margin: 1.5em auto; }
.alignnone { margin: 1.5em 0; }

/* ==========================================================================
   Theme toggle cursor + button affordance
   ========================================================================== */
#theme-toggle {
  cursor: pointer;
}

/* ==========================================================================
   WPML — hide navbar EN lang toggle on blog (ES default; no EN posts yet)
   The shared Astro navbar EN button points to /en/ (main site), not /blog/en/.
   Hide it on the blog to avoid sending visitors away from the WP section.
   When EN translations exist, replace with WPML language switcher widget.
   ========================================================================== */
body.blog header#navbar a[hreflang="en"] {
  display: none !important;
}
