/* Cameras Decoded blog article — desktop sidebars.
   Mobile (<1100px): single column, unchanged.
   Desktop (>=1100px): fixed sidebars, article stays centered as-is. */

@media (min-width: 1100px) {
  /* Left rail: latest articles — fixed to left of viewport */
  .cd-rail-left {
    position: fixed;
    left: max(24px, calc((100vw - 1400px) / 2));
    top: 100px;
    width: 230px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 10;
  }

  /* Right rail: TOC + share — fixed to right of viewport */
  .cd-rail-right {
    position: fixed;
    right: max(24px, calc((100vw - 1400px) / 2));
    top: 100px;
    width: 230px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 10;
  }

  .cd-rail-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(141, 235, 0, 0.8);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(141, 235, 0, 0.15);
  }

  a.cd-rail-card {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: transform 0.15s;
  }

  a.cd-rail-card:hover {
    transform: translateX(3px);
  }

  a.cd-rail-card:last-child {
    border-bottom: none;
  }

  a.cd-rail-card .cd-rail-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #e8f5e9;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  a.cd-rail-card .cd-rail-card-meta {
    font-size: 11px;
    color: rgba(232, 245, 233, 0.45);
    margin-top: 3px;
  }

  .cd-toc-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
  }

  .cd-toc-list li {
    margin-bottom: 2px;
  }

  .cd-toc-list a {
    display: block;
    font-size: 13px;
    color: rgba(232, 245, 233, 0.6);
    text-decoration: none;
    padding: 6px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
    transition: all 0.15s;
  }

  .cd-toc-list a:hover,
  .cd-toc-list a.cd-toc-active {
    color: #c6ff4d;
    border-left-color: #8deb00;
    background: rgba(141, 235, 0, 0.06);
  }

  .cd-share-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }

  .cd-share-btn {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e8f5e9;
    background: rgba(141, 235, 0, 0.08);
    border: 1px solid rgba(141, 235, 0, 0.25);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
  }

  .cd-share-btn:hover {
    background: rgba(141, 235, 0, 0.16);
  }
}

/* Below 1100px: rails stack below the article as full-width sections */
@media (max-width: 1099px) {
  .cd-rail-left,
  .cd-rail-right {
    position: static;
    width: 100%;
    max-width: 720px;
    margin: 32px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid rgba(141, 235, 0, 0.15);
  }

  .cd-rail-right {
    margin-bottom: 40px;
  }

  a.cd-rail-card {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
  }

  a.cd-rail-card:last-child {
    border-bottom: none;
  }

  a.cd-rail-card .cd-rail-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #e8f5e9;
    line-height: 1.35;
  }

  a.cd-rail-card .cd-rail-card-meta {
    font-size: 12px;
    color: rgba(232, 245, 233, 0.45);
    margin-top: 3px;
  }

  .cd-toc-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
  }

  .cd-toc-list li {
    margin-bottom: 2px;
  }

  .cd-toc-list a {
    display: block;
    font-size: 14px;
    color: rgba(232, 245, 233, 0.7);
    text-decoration: none;
    padding: 8px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
  }

  .cd-toc-list a.cd-toc-active {
    color: #c6ff4d;
    border-left-color: #8deb00;
    background: rgba(141, 235, 0, 0.06);
  }

  .cd-share-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }

  .cd-share-btn {
    flex: 1;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #e8f5e9;
    background: rgba(141, 235, 0, 0.08);
    border: 1px solid rgba(141, 235, 0, 0.25);
    border-radius: 8px;
    text-decoration: none;
  }
}
