/* =============================================
   DESKTOP — min-width: 768px
   Reglas exclusivas para pantallas grandes
   ============================================= */

@media (min-width: 768px) {

  :root {
    --header-height: 72px;
    --gutter: 24px;
  }

  body { font-size: 1.0625rem; line-height: 1.75; }

  .container { padding-left: var(--gutter); padding-right: var(--gutter); }

  /* ── HEADER ── */
  .site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
  }

  .site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
  }

  .site-logo__img { height: 34px; width: auto; }

  .nav-toggle { display: none !important; }

  .site-nav {
    display: flex !important;
    align-items: center;
    gap: 2rem;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .site-nav a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0;
    min-height: auto;
  }

  .site-nav a:hover, .site-nav a.is-active { color: var(--color-primary); }

  /* ── HOME HERO ── */
  .hero {
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 4rem 0;
  }

  .hero__badge {
    display: inline-block;
    background: rgba(38,208,124,0.15);
    border: 1px solid rgba(38,208,124,0.35);
    color: var(--color-accent);
    border-radius: var(--radius-full);
    padding: 0.25rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
  }

  .hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    font-size: 1.125rem;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
  }

  /* ── POSTS GRID ── */
  .posts-section { padding: 4rem 0; }

  .section-header { margin-bottom: 3rem; }

  .section-header__label {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent-dark);
    margin-bottom: 0.5rem;
  }

  .section-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
  }

  .post-card {
    display: flex; flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
  }

  .post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
  }

  .post-card__image { aspect-ratio: 16/9; overflow: hidden; background: var(--color-bg-alt); }

  .post-card__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
  }

  .post-card:hover .post-card__image img { transform: scale(1.04); }

  .post-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

  .post-card__category {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--color-accent-dark); margin-bottom: 0.5rem;
  }

  .post-card__title { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.5rem; }
  .post-card__excerpt { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.6; flex: 1; margin-bottom: 1rem; }
  .post-card__meta { display: flex; gap: 1rem; font-size: 0.8125rem; color: var(--color-text-light); padding-top: 1rem; border-top: 1px solid var(--color-border-light); }
  .post-card__read-more { font-size: 0.875rem; font-weight: 600; color: var(--color-primary); margin-top: auto; }

  /* ── ARTICLE HERO ── */
  .article-hero {
    position: relative;
    background: var(--color-bg-dark);
    color: #fff;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .article-hero__image {
    display: block;
    position: absolute; inset: 0; z-index: 0; opacity: 0.35;
  }

  .article-hero__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .article-hero::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to top, rgba(0,43,73,0.97) 0%, rgba(0,43,73,0.75) 50%, rgba(0,43,73,0.45) 100%);
    pointer-events: none;
  }

  .article-hero__overlay {
    position: relative; z-index: 2;
    padding: 3rem 0 2rem;
  }

  .breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; margin-bottom: 2rem; opacity: 0.85;
  }

  .breadcrumb a { color: #fff; }
  .breadcrumb__sep { opacity: 0.5; }

  .article-hero__category {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
  }

  .article-hero__title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800; line-height: 1.2;
    letter-spacing: -0.03em;
    max-width: 800px;
    margin-bottom: 1.5rem;
  }

  .article-hero__meta {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    font-size: 0.9375rem; opacity: 0.85;
  }

  /* ── ARTICLE LAYOUT ── */
  .article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 0 4rem;
  }

  .toc {
    position: static;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
  }

  .toc__toggle { display: none !important; }
  .toc__panel { display: block !important; }

  .toc__title {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
  }

  .toc ol li { margin-bottom: 0.5rem; }
  .toc ol li a { font-size: 0.875rem; line-height: 1.4; padding: 0.25rem 0 0.25rem 0.5rem; }

  .prose { font-size: 1.0625rem; line-height: 1.8; }
  .prose > * + * { margin-top: 1.5rem; }

  .prose h2 {
    font-size: 1.625rem; font-weight: 700; line-height: 1.3;
    margin-top: 3rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border-light);
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
  }

  .prose h3 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; scroll-margin-top: calc(var(--header-height) + 1.5rem); }
  .prose h4 { font-size: 1.0625rem; font-weight: 700; color: var(--color-primary-dark); margin-top: 1.5rem; }

  .prose .lead {
    font-size: 1.1875rem; line-height: 1.7;
    color: var(--color-text-muted);
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
  }

  /* ── TABLA ── */
  .table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
  }

  .table-wrapper::before, .table-wrapper::after { display: none; }

  .prose table { font-size: 0.9375rem; }
  .prose th { padding: 1rem 1.5rem; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
  .prose td { padding: 1rem 1.5rem; }
  .prose tbody tr:hover { background: var(--color-accent-light); }

  /* ── REASON CARDS ── */
  .reason-cards { display: grid; gap: 1rem; margin: 2rem 0; }

  .reason-card {
    display: grid; grid-template-columns: 40px 1fr; gap: 1rem;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
  }

  .reason-card:hover { border-color: var(--color-primary-light); }

  .reason-card__number {
    width: 40px; height: 40px;
    background: var(--color-accent); color: var(--color-primary-dark);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.125rem;
  }

  .reason-card__title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.25rem; }
  .reason-card__text { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.65; }

  /* ── STEPS ── */
  .steps { margin: 2rem 0; position: relative; }

  .step {
    display: grid; grid-template-columns: 48px 1fr; gap: 1rem;
    padding-bottom: 2rem; position: relative;
  }

  .step:not(:last-child)::before {
    content: ''; position: absolute;
    left: 23px; top: 48px; bottom: 0; width: 2px;
    background: var(--color-border);
  }

  .step__marker {
    width: 48px; height: 48px;
    background: var(--color-accent); color: var(--color-primary-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; z-index: 1;
  }

  .step__title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.25rem; }
  .step__text { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.65; }

  /* ── GRIDS ── */
  .actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem; margin: 2rem 0;
  }

  .actor-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem; text-align: center;
  }

  .actor-card__icon {
    width: 48px; height: 48px;
    background: var(--color-primary); color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin: 0 auto 1rem;
  }

  .actor-card__name { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.375rem; }
  .actor-card__desc { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.55; }

  .payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem; margin: 2rem 0;
  }

  .payment-item {
    display: flex; gap: 1rem; padding: 1.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .payment-item:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-sm); }

  .payment-item__icon {
    width: 44px; height: 44px;
    background: var(--color-bg-alt); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem; flex-shrink: 0;
  }

  /* ── CALLOUTS ── */
  .callout {
    padding: 1.5rem; border-radius: var(--radius-md);
    margin: 2rem 0; border-left: 4px solid;
  }

  .callout--info { background: #eef4f8; border-color: var(--color-primary); }
  .callout--tip { background: var(--color-accent-light); border-color: var(--color-accent); }
  .callout__title { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.5rem; }
  .callout p { font-size: 0.9375rem; color: var(--color-text-muted); margin: 0; }

  /* ── TAGS ── */
  .tags {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--color-border);
  }

  .tag {
    display: inline-block;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.25rem 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    transition: all 0.2s;
  }

  .tag:hover { background: var(--color-accent); color: var(--color-primary-dark); border-color: var(--color-accent); }

  /* ── RELATED POSTS ── */
  .related-posts {
    background: var(--color-bg-alt);
    padding: 4rem 0;
    border-top: 4px solid var(--color-accent);
  }

  .related-posts__header { text-align: center; max-width: 560px; margin: 0 auto 3rem; }
  .related-posts__label { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-dark); margin-bottom: 0.5rem; }
  .related-posts__title { font-size: 1.75rem; font-weight: 800; color: var(--color-primary); margin-bottom: 0.5rem; }
  .related-posts__subtitle { font-size: 1rem; color: var(--color-text-muted); line-height: 1.6; }
  .related-posts__grid { margin-bottom: 2rem; }
  .related-posts__footer { text-align: center; padding-top: 1rem; }
  .btn { width: auto; }

  /* ── FOOTER ── */
  .site-footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 2rem;
  }

  .site-footer__inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }

  .site-footer__logo { height: 30px; filter: brightness(0) invert(1); }
  .site-footer__links { display: flex; gap: 1.5rem; }
  .site-footer__links a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
  .site-footer__links a:hover { color: #fff; }
  .site-footer__copy { font-size: 0.8125rem; opacity: 0.5; text-align: center; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
}

/* Desktop wide — sidebar TOC */
@media (min-width: 1024px) {
  .article-hero { min-height: 440px; }

  .article-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
  }
}
