/* ============================================================
   BLOOMLY — PAGES.CSS
   Inner page styles, responsive polish, print, accessibility
   ============================================================ */

/* ── ANCHOR SCROLL MARGIN ── */
[id] { scroll-margin-top: 84px; }

/* ── LEGAL RESPONSIVE ── */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ── ABOUT PAGE ── */
@media (max-width: 768px) {
  .about-team-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

/* ── CONTACT PAGE ── */
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-info-card { position: static; }
}

/* ── BLOG DETAIL ── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
.article-body ul { margin-left: 1.25rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 800;
  color: var(--text);
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
  scroll-margin-top: 84px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}
.article-body p { font-size: var(--t-base); color: var(--text-secondary); line-height: 1.75; margin-bottom: 1rem; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body li { font-size: var(--t-base); color: var(--text-secondary); line-height: 1.65; }

/* ── CATEGORY PAGE ── */
@media (max-width: 640px) {
  .cat-hero-grid { grid-template-columns: 1fr; }
}

/* ── MODAL MOBILE ── */
@media (max-width: 540px) {
  .modal__bd .g-2 { grid-template-columns: 1fr; }
}

/* ── FOOTER RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 580px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ── NEWSLETTER CARD RESPONSIVE ── */
@media (max-width: 640px) {
  .newsletter-card { padding: var(--s-6); }
  .newsletter-card__input-wrap { flex-direction: column; border-radius: var(--r-xl); padding: var(--s-4); }
  .newsletter-card__input { padding-block: var(--s-2); }
  .newsletter-card .btn { border-radius: var(--r-lg); }
}

/* ── FEATURED CARD ── */
@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__thumb { min-height: 200px; font-size: 5rem; }
}

/* ── COOKIE ── */
@media (max-width: 480px) {
  .cookie { left: var(--s-3); right: var(--s-3); bottom: var(--s-3); }
}

/* ── POST CARD GRID ── */
@media (max-width: 900px) {
  .g-3.posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .g-3.posts-grid { grid-template-columns: 1fr; }
}

/* ── READING PROGRESS ── */
.read-progress {
  position: fixed;
  top: 68px;
  left: 0;
  height: 3px;
  background: var(--grad-primary);
  z-index: 999;
  width: 0;
  transition: width 0.1s;
  border-radius: 0 var(--r-full) var(--r-full) 0;
}

/* ── FAQ ── */
.faq-item { border-bottom: 1.5px solid rgba(124,58,237,0.1); }
.faq-item:first-child { border-top: 1.5px solid rgba(124,58,237,0.1); }
.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-fast);
}
.faq-btn:hover { color: var(--violet); }
.faq-icon {
  width: 30px; height: 30px;
  background: var(--violet-pale);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--violet);
  flex-shrink: 0;
  transition: transform var(--dur-mid) var(--ease-bounce), background var(--dur-mid);
  box-shadow: var(--clay-sm);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--grad-primary); color: #fff; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease-out); }
.faq-answer__inner { padding-bottom: var(--s-5); font-size: var(--t-base); color: var(--text-secondary); line-height: 1.7; max-width: 680px; }

/* ── SKIP LINK ── */
.skip { outline: none; }

/* ── HIGH CONTRAST ── */
@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; forced-color-adjust: none; }
  .cat-badge { border: 1px solid ButtonText; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .hero__float-badge { animation: none; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── SELECTION ── */
::selection { background: var(--violet-pale); color: var(--violet-dark); }
::-moz-selection { background: var(--violet-pale); color: var(--violet-dark); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--violet-light); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

/* ── BACK TO TOP ── */
.btt { z-index: 350; }
.cookie { z-index: 4000; }

/* ── PRINT ── */
@media print {
  .nav, .footer, .cookie, .modal-overlay, .btt, .blob-bg,
  .marquee-band, .newsletter-card, .read-progress { display: none !important; }
  .page-content { padding-top: 0; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .post-card, .card { box-shadow: none; border: 1px solid #ccc; }
}
