/* ==========================================================================
   Enigmas Nómadas — Sistema Visual Global
   Dirección: Blog profesional, fotográfico, contemporáneo y de autor
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens y Reset
   -------------------------------------------------------------------------- */
:root {
  --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --bg-page: #f7f8f6;
  --text-main: #1a2226;
  --text-muted: #4e5a60;
  --text-subtle: #6c777d;
  --accent-rust: #a84732;
  --border-subtle: #dce1e0;
  --border-light: #e3e6e5;
  --card-bg: #fbfbf9;
  --card-border: #e7ebe8;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-page);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: #dce7dc;
  color: #1a2226;
}

:focus-visible {
  outline: 2px solid #1c262b;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Contenedor Principal
   -------------------------------------------------------------------------- */
.shell {
  width: min(100% - 48px, 1140px);
  margin-inline: auto;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 32px, 1140px);
  }
}

/* --------------------------------------------------------------------------
   Cabecera del Sitio
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
  position: relative;
  z-index: 10;
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--text-main);
}

.brand-symbol {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.brand-accent {
  color: var(--accent-rust);
}

.header-note {
  font-size: 0.82rem;
  color: var(--text-subtle);
  display: none;
}

@media (min-width: 1040px) {
  .header-note {
    display: block;
  }
}

.site-header nav ul {
  display: flex;
  gap: clamp(14px, 2.2vw, 32px);
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.site-header nav a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3b464c;
  padding: 8px 0;
  display: inline-block;
  transition: color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .site-header nav a:hover {
    color: var(--text-main);
    transform: scale(1.025);
  }
}

.site-header nav a[aria-current="page"] {
  color: var(--text-main);
  font-weight: 750;
  border-bottom: 2px solid var(--accent-rust);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #ffffff;
  padding: 12px 18px;
  z-index: 100;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
  top: 16px;
}

@media (max-width: 820px) {
  .header-inner {
    padding: 16px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .site-header nav ul {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
}

/* --------------------------------------------------------------------------
   Pie de Página
   -------------------------------------------------------------------------- */
.site-footer {
  background: #1c262b;
  color: #eaedea;
  padding: clamp(48px, 6vw, 68px) 0 32px;
  border-top: 1px solid #2b363c;
  margin-top: clamp(60px, 8vw, 96px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.footer-brand-link {
  color: #f7f8f6;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: #f7f8f6;
}

.footer-brand span {
  color: #d66c55;
}

.footer-tagline {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #a4b0b6;
  margin: 0 0 20px;
  max-width: 440px;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d5dde0;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .social-badge:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.025);
  }
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  align-content: start;
}

.footer-links a {
  color: #d5dde0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 550;
  display: inline-block;
  transition: color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .footer-links a:hover {
    color: #ffffff;
    transform: scale(1.025);
  }
}

.footer-copyright {
  grid-column: 1 / -1;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #87949b;
  font-size: 0.78rem;
  display: block;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* --------------------------------------------------------------------------
   Sistema Unificado de Botones (Primario y Secundario)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transform: scale(1);
  transform-origin: center;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: #1c262b;
  color: #f7f8f6;
  border: 1px solid #1c262b;
}

.btn-secondary {
  background: #ffffff;
  color: #1c262b;
  border: 1px solid #ccd2d1;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: scale(1.035);
}

.btn-primary:hover {
  background: #2d3b42;
  border-color: #2d3b42;
  box-shadow: 0 4px 14px rgba(28, 38, 43, 0.12);
}

.btn-secondary:hover {
  background: #edf0ef;
  border-color: #b4bebd;
  color: #141c20;
  box-shadow: 0 4px 12px rgba(28, 38, 43, 0.05);
}

@media (hover: hover) {
  .btn:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: scale(1.035);
  }
}

/* --------------------------------------------------------------------------
   Hover de Enlaces Textuales
   -------------------------------------------------------------------------- */
main a:not(.btn):not(.button):not(nav a):not([class*="media-link"]):not(:has(img)) {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transform: scale(1);
  transform-origin: left center;
  transition: color 180ms ease, transform 180ms ease;
}

main a:not(.btn):not(.button):not(nav a):not([class*="media-link"]):not(:has(img)):hover {
  color: #425560;
  transform: scale(1.025);
  text-decoration: none;
}

@media (hover: hover) {
  main a:not(.btn):not(.button):not(nav a):not([class*="media-link"]):not(:has(img)):hover {
    color: #425560;
    transform: scale(1.025);
    text-decoration: none;
  }
}

/* --------------------------------------------------------------------------
   Encabezados y Metadatos Editoriales
   -------------------------------------------------------------------------- */
.category-name,
.eyebrow {
  display: inline-block;
  color: var(--accent-rust);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.meta-line,
.article-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-subtle);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.meta-line time,
.article-meta time {
  color: var(--text-subtle);
  font-size: 0.78rem;
}

.page-header,
.page-intro {
  padding-top: clamp(28px, 3.5vw, 48px);
  margin-bottom: clamp(32px, 4vw, 52px);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.page-title,
.page-header h1,
.page-intro h1 {
  margin: 4px 0 12px;
  font: 700 clamp(2rem, 3.4vw, 2.85rem)/1.15 var(--font-sans);
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.page-lead,
.page-intro .lead {
  margin: 0;
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 680px;
}

/* --------------------------------------------------------------------------
   Tipografía de Lectura (Prose para Artículos y Páginas Editoriales)
   -------------------------------------------------------------------------- */
.prose {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.82;
  color: #2b3337;
}

.prose h2 {
  font: 700 clamp(1.45rem, 2vw, 1.85rem)/1.25 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 2.2em 0 0.7em;
}

.prose h3 {
  font: 700 clamp(1.2rem, 1.6vw, 1.4rem)/1.3 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 1.8em 0 0.5em;
}

.prose p {
  margin: 0 0 1.5em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  margin: 2.2em 0;
  padding: 8px 0 8px 22px;
  border-left: 3px solid var(--accent-rust);
  font-style: italic;
  color: #3b464c;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2.8em 0;
}

.prose figure {
  margin: 2.4em 0;
}

.prose img {
  border-radius: 6px;
  margin: 2.2em 0;
  box-shadow: 0 4px 16px rgba(24, 34, 38, 0.05);
}

.prose a {
  word-break: break-word;
  overflow-wrap: break-word;
}

.prose figcaption {
  font-size: 0.84rem;
  color: var(--text-subtle);
  margin-top: 8px;
  text-align: center;
}

.article-reflection,
.prose .article-reflection {
  font-weight: 600;
  font-style: italic;
  margin-top: 2.6em;
  margin-bottom: 1.8em;
  margin-left: 2rem;
  max-width: 88%;
  line-height: 1.8;
  color: var(--text-main);
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

.article-reflection strong,
.article-reflection b,
.prose .article-reflection strong,
.prose .article-reflection b {
  font-weight: inherit;
}

@media (max-width: 640px) {
  .article-reflection,
  .prose .article-reflection {
    margin-left: 0.75rem;
    margin-top: 2em;
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Formularios y Campos
   -------------------------------------------------------------------------- */
.form-field {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
  color: #2c363c;
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid #ccd2d1;
  background: #ffffff;
  color: var(--text-main);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #1c262b;
  box-shadow: 0 0 0 3px rgba(28, 38, 43, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* --------------------------------------------------------------------------
   Página: Blog (/blog/)
   -------------------------------------------------------------------------- */
.blog-feed {
  display: flex;
  flex-direction: column;
}

.article-entry {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(24px, 3.5vw, 42px);
  align-items: center;
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--border-light);
}

.article-entry:first-child {
  padding-top: 8px;
}

.article-entry:last-child {
  border-bottom: none;
}

.entry-media-link {
  display: block;
  text-decoration: none;
  border-radius: 4px;
  overflow: hidden;
}

.entry-thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #e1e5e4;
  aspect-ratio: 16 / 10;
  max-height: 200px;
}

.entry-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 340ms ease;
}

@media (hover: hover) {
  .entry-media-link:hover .entry-thumbnail img {
    transform: scale(1.035);
  }
}

.entry-placeholder,
.article-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1c2726 0%, #293836 100%);
  color: #a4beba;
  text-align: center;
  padding: 16px;
}

.entry-placeholder .placeholder-symbol,
.article-placeholder .placeholder-symbol {
  opacity: 0.85;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.entry-placeholder .placeholder-tag,
.article-placeholder .placeholder-tag {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb3af;
}


.entry-body {
  padding: 4px 0;
}

.entry-title {
  margin: 6px 0 10px;
  font: 700 clamp(1.25rem, 1.75vw, 1.5rem)/1.25 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.entry-summary {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 720px;
}

.draft-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a84732;
  background: rgba(168, 71, 50, 0.08);
  padding: 2px 8px;
  border-radius: 3px;
}

@media (max-width: 680px) {
  .article-entry {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 0;
  }
  .entry-thumbnail {
    max-height: 230px;
  }
}

/* --------------------------------------------------------------------------
   Página: Artículo Individual ([slug])
   -------------------------------------------------------------------------- */
.article-page {
  width: 100%;
  margin: 0 auto;
  padding-top: clamp(24px, 3.5vw, 44px);
}

.article-header {
  width: min(100% - 32px, 1080px);
  margin: 0 auto clamp(20px, 3vw, 32px);
}

@media (max-width: 640px) {
  .article-header {
    width: min(100% - 24px, 1080px);
  }
}

.article-nav-back {
  margin-bottom: 20px;
}

.back-link {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-muted);
}

.draft-notice {
  font-size: 0.76rem;
  font-weight: 750;
  color: #a84732;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.article-category-line {
  margin-bottom: 4px;
}

.article-category-line .category-name {
  margin-bottom: 0;
}

.article-meta-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-subtle);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-meta-line time {
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.article-meta-line .article-author {
  color: var(--text-muted);
  font-weight: 550;
}

.article-meta-line .meta-sep {
  color: var(--text-subtle);
  opacity: 0.5;
}

.article-title-heading {
  margin: 10px 0 0;
  font: 700 clamp(1.45rem, 2.6vw, 2.15rem)/1.22 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-main);
  max-width: 960px;
}

.article-hero-bleed {
  width: min(100% - 32px, 1080px);
  margin: 0 auto clamp(20px, 2.5vw, 30px);
}

@media (max-width: 640px) {
  .article-hero-bleed {
    width: min(100% - 24px, 1080px);
    margin-bottom: 20px;
  }
}

.article-hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 580px;
  min-height: 260px;
  border-radius: 4px;
  overflow: hidden;
  background: #e1e5e4;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(65px, 24%, 150px);
  background: linear-gradient(
    to bottom,
    rgba(247, 248, 246, 0) 0%,
    rgba(247, 248, 246, 0.3) 40%,
    rgba(247, 248, 246, 0.8) 75%,
    #f7f8f6 100%
  );
  pointer-events: none;
}

.article-tags-wrap {
  max-width: 720px;
  margin: clamp(32px, 4.5vw, 48px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-tags-wrap .tags-label {
  font-weight: 700;
  color: var(--text-main);
  margin-right: 8px;
}

.article-tags-wrap .tags-list {
  color: var(--text-muted);
}

.article-end-card {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.article-end-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: clamp(24px, 3vw, 32px);
}

.article-end-title {
  margin: 4px 0 8px;
  font: 700 1.35rem/1.25 var(--font-sans);
  color: var(--text-main);
}

.article-end-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* --------------------------------------------------------------------------
   Página: Vídeos (/videos/)
   -------------------------------------------------------------------------- */
.video-featured-section {
  margin-bottom: clamp(48px, 6vw, 68px);
}

.video-featured-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(24px, 3.5vw, 40px);
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.video-player-mockup {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1c262b;
}

.video-featured-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.video-player-trigger {
  all: unset;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  transition: background 220ms ease;
}

.video-player-trigger:hover .video-featured-thumb,
.video-player-trigger:focus-visible .video-featured-thumb {
  transform: scale(1.03);
}

.video-player-trigger:hover,
.video-player-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.3);
}

.video-player-trigger:focus-visible {
  outline: 3px solid var(--accent-rust);
  outline-offset: -3px;
}

.video-play-indicator {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(28, 38, 43, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.35rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), background 220ms ease;
  pointer-events: none;
}

.video-player-trigger:hover .video-play-indicator,
.video-player-trigger:focus-visible .video-play-indicator {
  transform: scale(1.1);
  background: var(--accent-rust);
}

.play-icon {
  margin-left: 3px;
  line-height: 1;
}

.video-featured-info {
  display: flex;
  flex-direction: column;
}

.meta-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b363c;
  background: #e6ebe9;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-featured-title {
  margin: 10px 0 12px;
  font: 700 clamp(1.3rem, 2vw, 1.75rem)/1.24 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.video-featured-desc {
  margin: 0 0 20px;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--text-muted);
}

.video-featured-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.video-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ext-icon {
  font-size: 0.95em;
  line-height: 1;
}

/* Sección Destacados */
.videos-collection-section {
  margin-top: clamp(40px, 5vw, 56px);
}

.section-intro-line {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.section-mini-title {
  margin: 0;
  font: 700 1.25rem/1.2 var(--font-sans);
  color: var(--text-main);
}

.section-subtext {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-subtle);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 28px);
}

.video-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

@media (hover: hover) {
  .video-card:hover {
    transform: translateY(-3px);
    border-color: #cbd3d0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  }
}

.video-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1c262b;
  overflow: hidden;
  display: block;
}

.video-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover .video-card-thumb {
  transform: scale(1.04);
}

.video-order-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(28, 38, 43, 0.85);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.video-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(28, 38, 43, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.78rem;
  transition: background 200ms ease, transform 200ms ease;
}

.video-card:hover .video-badge {
  background: var(--accent-rust);
  transform: scale(1.08);
}

.video-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-card-body .meta-line {
  margin-bottom: 8px;
}

.video-date-note {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.video-card-title {
  margin: 0;
  font: 700 1.05rem/1.32 var(--font-sans);
  color: var(--text-main);
  flex-grow: 1;
}

.video-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 180ms ease;
}

.video-card-title a:hover {
  color: var(--accent-rust);
}

/* Banner de canal */
.video-channel-banner {
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(24px, 3.5vw, 36px);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.video-channel-banner-info h3 {
  margin: 0 0 6px;
  font: 700 1.25rem/1.2 var(--font-sans);
  color: var(--text-main);
}

.video-channel-banner-info p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
}

/* Modal de vídeo */
.video-modal {
  border: none;
  border-radius: 10px;
  padding: 0;
  background: #13191c;
  color: #f7f8f6;
  max-width: 960px;
  width: min(92vw, 960px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.video-modal::backdrop {
  background: rgba(15, 23, 28, 0.82);
  backdrop-filter: blur(8px);
}

.video-modal-wrapper {
  display: flex;
  flex-direction: column;
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #1a2226;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f7f8f6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 16px;
}

.video-modal-close {
  background: transparent;
  border: none;
  color: #d5dde0;
  font-size: 1.4rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  flex-shrink: 0;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.video-modal-iframe-container {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000000;
  position: relative;
}

.video-modal-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #1a2226;
  font-size: 0.82rem;
  color: #8c989e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal-direct {
  color: #d5dde0;
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease;
}

.video-modal-direct:hover {
  color: #ffffff;
}

/* Responsividad */
@media (max-width: 980px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .video-featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .video-channel-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .video-featured-actions {
    width: 100%;
  }
  .video-featured-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Página: Aplicaciones (/apps/)
   -------------------------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: clamp(18px, 2.2vw, 24px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

@media (hover: hover) {
  .app-card:hover {
    transform: translateY(-3px);
    border-color: #cbd3d0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }
}

.app-media-link {
  display: block;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
}

.app-media {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #1c262b;
  aspect-ratio: 16 / 9;
}

.app-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .app-media-link:hover .app-media img,
  .app-media-link:focus-visible .app-media img {
    transform: scale(1.04);
  }
}

.app-card-body {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card-body .category-name {
  margin-bottom: 6px;
}

.app-card-title {
  margin: 0 0 10px;
  font: 700 clamp(1.2rem, 1.5vw, 1.38rem)/1.26 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.app-card-title a {
  text-decoration: none;
  color: inherit;
  transition: color 180ms ease;
}

.app-card-title a:hover {
  color: var(--accent-rust);
}

.app-card-desc {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--text-muted);
  flex-grow: 1;
}

.app-card-action {
  margin-top: auto;
}

.app-card-action .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.apps-note-card {
  margin-top: clamp(36px, 5vw, 56px);
  padding: clamp(20px, 3vw, 28px);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.apps-note-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Página: Contacto (/contact/)
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.contact-aside-title {
  margin: 0 0 12px;
  font: 700 1.35rem/1.25 var(--font-sans);
  color: var(--text-main);
}

.contact-aside-desc {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.contact-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 10px 16px;
  border-radius: 4px;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .social-pill:hover {
    border-color: #abb6b4;
    background: #ffffff;
    transform: scale(1.025);
  }
}

.contact-form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: clamp(24px, 3.5vw, 36px);
}

.form-card-title {
  margin: 0 0 6px;
  font: 700 1.35rem/1.25 var(--font-sans);
  color: var(--text-main);
}

.form-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-row-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-error {
  display: none;
  font-size: 0.8rem;
  color: #c53030;
  margin-top: 5px;
  font-weight: 550;
}

.field-error.is-visible {
  display: block;
}

.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: #c53030;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.12);
}

.turnstile-wrap {
  margin-top: 8px;
  margin-bottom: 20px;
  min-height: 65px;
}

.form-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 20px;
}

.form-status-message {
  width: 100%;
  padding: 13px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  line-height: 1.5;
  display: none;
}

.form-status-message.is-success {
  display: block;
  background: #edf7ed;
  border: 1px solid #b7e1cd;
  color: #1b5e20;
}

.form-status-message.is-error {
  display: block;
  background: #fdf2f2;
  border: 1px solid #f5caca;
  color: #9c2424;
}

.form-status-message.is-loading {
  display: block;
  background: #f5f7f8;
  border: 1px solid #e1e6e8;
  color: #3b464c;
}

.form-privacy-note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

.form-privacy-note a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .form-row-duo {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* --------------------------------------------------------------------------
   Página: Sobre mí (/about/)
   -------------------------------------------------------------------------- */
.about-page {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: clamp(48px, 6vw, 72px);
}

.about-page .page-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: clamp(24px, 3.5vw, 36px);
}

.about-hero-media {
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 clamp(32px, 4.5vw, 48px);
  box-shadow: 0 8px 24px rgba(24, 34, 38, 0.06);
  background: #e1e5e4;
}

.about-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   Animaciones e Interactividad
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
}

/* Controlled article image layouts: shared with the local editor. */
.article-image{width:100%;max-width:100%;margin:2.2em auto;clear:both}
.article-image--small{width:35%}.article-image--medium{width:65%}.article-image--large{width:100%}
.article-image--left{margin-left:0;margin-right:auto}.article-image--right{margin-left:auto;margin-right:0}.article-image--center{margin-left:auto;margin-right:auto}
.article-image>img,.article-image-pair img{display:block;width:100%;height:auto;max-width:100%;margin:0!important}
.article-image-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:2.2em 0;clear:both}
.article-image-pair>.article-image{width:100%;margin:0}.article-image-pair:has(.ProseMirror-selectednode){outline:1px dashed #547e65;outline-offset:6px}
@media(max-width:640px){.article-image{width:100%;margin-left:auto;margin-right:auto}.article-image-pair{grid-template-columns:minmax(0,1fr)}}
/* End controlled article image layouts. */
