/* CodeRush - Content Pages */

body {
  overflow: auto;
  min-height: 100vh;
}

/* ================================================
   PAGE HEADER (visible by default on content pages)
   ================================================ */

.header.visible {
  transform: translateY(0);
  opacity: 1;
}

.nav-link.active {
  color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ================================================
   PAGE HERO
   ================================================ */

.page-hero {
  padding: 140px 0 80px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto;
  color: var(--color-text-light);
}

/* ================================================
   SECTIONS
   ================================================ */

.page-section {
  padding: 80px 0;
}
.page-section.alt {
  background: var(--color-bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ================================================
   CARD GRID
   ================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.card-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}
.card-grid-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.card-grid-center > .card {
  flex: 0 1 350px;
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: var(--color-accent);
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  margin-bottom: 10px;
}
.card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Tech badges inside cards */
.card .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tech-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-tag-bg, var(--color-bg-alt));
  color: var(--color-tag-text, var(--color-text-light));
  border-radius: 20px;
}

/* ================================================
   TECH LOGO GRID (Services page)
   ================================================ */

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.tech-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 80px;
}
.tech-logo-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.4);
  transition: filter 0.3s;
}
.tech-logo-item:hover img {
  filter: none;
}
.tech-logo-item span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
}
[data-theme="dark"] .tech-logo-item img {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.7;
}
[data-theme="dark"] .tech-logo-item:hover img {
  filter: none;
  opacity: 1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tech-logo-item img {
    filter: grayscale(1) brightness(0) invert(1);
    opacity: 0.7;
  }
  :root:not([data-theme="light"]) .tech-logo-item:hover img {
    filter: none;
    opacity: 1;
  }
}

/* ================================================
   STATS ROW (About page)
   ================================================ */

/* ================================================
   STAT GRID (About page — 2x2 square)
   ================================================ */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-box .stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
  line-height: 1.1;
}
.stat-box .stat-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
  margin-top: 6px;
}

/* ================================================
   TWO-COLUMN LAYOUT (About page)
   ================================================ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.two-col .col-text h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 20px;
}
.two-col .col-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ================================================
   TIMELINE (Process page)
   ================================================ */

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 60px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-step {
  position: relative;
  margin-bottom: 48px;
}
.timeline-step:last-child {
  margin-bottom: 0;
}
.step-number {
  position: absolute;
  left: -60px;
  top: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50%;
  z-index: 1;
}
.timeline-step h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.timeline-step p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ================================================
   CASE STUDY CARDS (Work page)
   ================================================ */

.case-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.case-card-body {
  padding: 28px;
}
.case-card .case-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 20px;
  margin-bottom: 12px;
}
.case-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.case-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Industry tags */
.industry-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.industry-tag {
  padding: 10px 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ================================================
   FAQ ACCORDION (Process page)
   ================================================ */

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
}
.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.3s;
}
.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ================================================
   CTA SECTION
   ================================================ */

.cta-section {
  padding: 80px 0;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================
   PAGE FOOTER
   ================================================ */

.page-footer {
  padding: 24px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.page-footer p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ================================================
   SCROLL ANIMATIONS
   ================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .page-hero { padding: 120px 0 60px; }
  .page-section { padding: 60px 0; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .card-grid,
  .card-grid-2col {
    grid-template-columns: 1fr;
  }
  .card-grid-center > .card {
    flex: 1 1 100%;
  }

  .timeline {
    padding-left: 50px;
  }
  .timeline::before {
    left: 18px;
  }
  .step-number {
    left: -50px;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .nav .theme-switch {
    order: 99;
  }
}
