/* ============================================
   FitCraft — Shared Styles for Content Pages
   ============================================ */

/* --- FONTS --- */
@font-face {
  font-family: 'Gilroy';
  src: url('../Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilroy';
  src: url('../Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- RESET & VARIABLES --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #FFFFFF;
  --bg-alt: #F5F7FA;
  --bg-card: #F5F7FA;
  --bg-card-hover: #EDF0F5;
  --accent: #1B2A4A;
  --accent-light: rgba(27, 42, 74, .06);
  --accent-glow: rgba(27, 42, 74, .12);
  --cta-primary: #E8652B;
  --cta-primary-hover: #D4571E;
  --cta-secondary: #1B2A4A;
  --text-primary: #1B2A4A;
  --text-muted: #4A5568;
  --text-dim: #8C9BAD;
  --gradient-accent: linear-gradient(135deg, #1B2A4A, #2D4A7A);
  --font-display: 'Gilroy', sans-serif;
  --font-body: 'Gilroy', sans-serif;
  --max-w: 1140px;
  --section-pad: clamp(64px, 8vw, 96px);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* --- FOCUS STATES --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(232, 101, 43, .4);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* --- NAV --- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.topnav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topnav-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(14%) sepia(25%) saturate(1500%) hue-rotate(185deg) brightness(95%);
}
.topnav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.topnav-links a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .3s ease;
  position: relative;
}
.topnav-links a:not(.topnav-cta):hover {
  color: var(--text-primary);
}
.topnav-links a.active:not(.topnav-cta) {
  color: var(--accent);
}
.topnav-links a.active:not(.topnav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--cta-primary);
  border-radius: 50%;
}
.topnav-cta {
  padding: 10px 24px !important;
  font-size: .88rem !important;
  white-space: nowrap;
  color: #fff !important;
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  background: var(--cta-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 60px;
  border: none;
  cursor: pointer;
  transition: all .3s ease;
  box-shadow: 0 4px 24px rgba(232, 101, 43, .3);
}
.btn-primary:hover {
  background: var(--cta-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 101, 43, .4);
}
.btn-primary svg { width: 18px; height: 18px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1.5px solid rgba(27, 42, 74, .3);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  border-radius: 60px;
  cursor: pointer;
  transition: all .3s ease;
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(27, 42, 74, .05);
  transform: translateY(-1px);
}

/* --- UTILITY --- */
.section-label {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cta-primary);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--cta-primary);
  border-radius: 2px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.18;
  letter-spacing: 0.3px;
  color: var(--text-primary);
}

/* --- FOOTER --- */
.site-footer {
  padding: 40px 0 32px;
  background: #0F1B33;
  border-top: none;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  height: 28px;
  width: auto;
  opacity: .5;
  filter: brightness(0) invert(1);
  transition: opacity .3s;
}
.footer-logo:hover { opacity: .8; }
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,.08);
  border: none;
  margin: 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 20px;
}
.footer-links {
  display: flex;
  gap: 28px;
}
.footer-links a {
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  transition: color .2s;
}
.footer-links a:hover { color: rgba(255,255,255,.8); }
.footer-copy {
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- CONTENT ARTICLE STYLES --- */
.content-page {
  padding-top: 80px; /* space for fixed nav */
}

.article-header {
  background: linear-gradient(160deg, #1B2A4A 0%, #2D4A7A 55%, #3D5A8A 100%);
  padding: clamp(48px, 8vw, 80px) 0 clamp(40px, 6vw, 64px);
  color: #fff;
  text-align: center;
}
.article-header .section-label {
  color: rgba(255,255,255,.7);
}
.article-header .section-label::before {
  background: rgba(255,255,255,.5);
}
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.article-header .subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.article-header .updated-date {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  margin-top: 16px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(20px, 4vw, 40px);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.25;
  margin: 48px 0 20px;
  color: var(--text-primary);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.3;
  margin: 36px 0 14px;
  color: var(--text-primary);
}
.article-body p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-body ul, .article-body ol {
  margin: 0 0 24px 24px;
  color: var(--text-muted);
  line-height: 1.8;
}
.article-body li {
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body a:not(.btn-primary):not(.btn-ghost) {
  color: var(--cta-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:not(.btn-primary):not(.btn-ghost):hover {
  color: var(--cta-primary-hover);
}
.article-body blockquote {
  border-left: 3px solid var(--cta-primary);
  padding: 16px 0 16px 24px;
  margin: 28px 0;
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.75;
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
}

/* --- TL;DR SUMMARY (GEO optimization — quotable by AI models) --- */
.tldr {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 0 0 32px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.tldr strong {
  color: var(--text-primary);
  font-weight: 700;
}
.tldr-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* --- COMPARISON TABLE --- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: .95rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(27,42,74,.06);
}
.compare-table thead {
  background: var(--accent);
  color: #fff;
}
.compare-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .5px;
}
.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(27,42,74,.06);
  color: var(--text-muted);
}
.compare-table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}
.compare-table tbody tr:hover {
  background: var(--bg-card-hover);
}
.compare-table .feature-label {
  font-weight: 600;
  color: var(--text-primary);
}
.compare-table .check {
  color: #16a34a;
  font-weight: 700;
}
.compare-table .cross {
  color: var(--text-dim);
}

/* --- VERDICT BOX --- */
.verdict-box {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 32px;
  margin: 40px 0;
  border: 1px solid rgba(27,42,74,.08);
}
.verdict-box h3 {
  margin-top: 0 !important;
  font-size: 1.3rem !important;
}
.verdict-box p:last-child {
  margin-bottom: 0;
}

/* --- INLINE CTA --- */
.cta-inline {
  background: linear-gradient(135deg, #1B2A4A, #2D4A7A);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 48px 0;
}
.cta-inline h3 {
  color: #fff !important;
  font-size: 1.3rem !important;
  margin: 0 0 8px !important;
}
.cta-inline p {
  color: rgba(255,255,255,.85) !important;
  font-size: 1.1rem !important;
  margin-bottom: 20px !important;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-inline .btn-primary {
  margin: 0 auto;
  color: #fff !important;
  text-decoration: none !important;
}
.cta-inline .btn-primary:hover {
  color: #fff !important;
}

/* --- BOTTOM CTA BANNER --- */
.bottom-cta {
  background: linear-gradient(160deg, #1B2A4A 0%, #2D4A7A 55%, #3D5A8A 100%);
  padding: clamp(48px, 8vw, 80px) 0;
  text-align: center;
  color: #fff;
}
.bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}
.bottom-cta p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.bottom-cta .btn-primary {
  margin: 0 auto;
  color: #fff !important;
  text-decoration: none !important;
}

/* --- FAQ SECTION --- */
.faq-section {
  margin: 48px 0 0;
}
.faq-section h2 {
  margin-bottom: 24px;
}
.faq-item {
  border-bottom: 1px solid rgba(27,42,74,.08);
  padding: 20px 0;
}
.faq-item:first-of-type {
  border-top: 1px solid rgba(27,42,74,.08);
}
.faq-item h3 {
  font-size: 1.1rem !important;
  margin: 0 0 8px !important;
  cursor: default;
}
.faq-item p {
  margin-bottom: 0 !important;
}

/* --- BREADCRUMB --- */
.breadcrumb {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb a:hover {
  color: rgba(255,255,255,.8);
}
.breadcrumb span {
  margin: 0 8px;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .topnav-links a:not(.topnav-cta) { display: none; }
  .topnav-cta {
    padding: 8px 16px !important;
    font-size: .8rem !important;
    box-shadow: none;
  }

  .compare-table {
    font-size: .85rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 10px 12px;
  }

  .cta-inline {
    padding: 28px 20px;
  }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .footer-bottom { justify-content: center; }

  .article-header {
    padding: 40px 0 32px;
  }
}

@media (max-width: 480px) {
  .section-heading { font-size: 1.5rem; }
  .article-header h1 { font-size: 1.8rem; }

  .compare-table {
    display: block;
    overflow-x: auto;
  }
}
