/**
 * Page Sections
 * Aqelis Health Marketing Website
 */

/* Top Banner */
.top-banner {
  width: 100%;
  background: var(--color-bg-primary);
}

.top-banner__image {
  width: 100%;
  height: auto;
  display: block;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-bg-primary);
  z-index: var(--z-index-fixed);
  transition: box-shadow var(--transition-base);
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.header__logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-decoration: none;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.header__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__link {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.header__link:hover {
  color: var(--color-primary);
}

.header__cta {
  display: flex;
  gap: var(--space-md);
}

/* Mobile Menu Toggle */
.header__menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  color: var(--color-text-primary);
}

/* Mobile Menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-menu__link {
  display: block;
  padding: var(--space-md);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition-base);
}

.mobile-menu__link:hover {
  background: var(--color-bg-secondary);
}

.mobile-menu__cta {
  margin-top: var(--space-md);
  text-align: center;
}

/* Header nav list */
.header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-link {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.header__nav-link:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .header__nav,
  .header__cta {
    display: none;
  }

  .header__menu-toggle {
    display: block;
  }
}

/* Hero Section */
.hero {
  position: relative;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  padding-top: calc(80px + var(--space-4xl));
  padding-bottom: var(--space-5xl);
  overflow: hidden;
}

.hero__container {
  position: relative;
  z-index: 1;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.hero__text {
  max-width: 600px;
}

.hero__title {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.hero__description {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
  color: var(--color-text-secondary);
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
}

/* Features Section */
.features {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-secondary);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

/* Workflow / How It Works Section */
.workflow {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-secondary);
}

.workflow__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
  position: relative;
}

.workflow__steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--color-primary),
    var(--color-accent)
  );
  z-index: 0;
}

.workflow__step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.workflow__step-number {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  background: var(--color-primary);
  color: var(--color-text-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 0 0 8px var(--color-bg-secondary);
}

.workflow__step-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.workflow__step-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

/* Benefits Section */
.benefits {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-alt);
}

.benefits__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.benefits__text {
  max-width: 540px;
}

.benefits__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.benefits__description {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: var(--line-height-relaxed);
}

.benefits__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits__image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefits__image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* Security Section */
.security {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-secondary);
}

.security__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
}

/* CTA Section */
.cta {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  position: relative;
  overflow: hidden;
}

.cta__container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cta__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.cta__text {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2xl);
  color: var(--color-text-secondary);
}

.cta__form {
  max-width: 600px;
  margin: 0 auto;
}

.cta__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.cta__form-group {
  margin: 0;
}

.cta__form-input {
  width: 100%;
  padding: var(--space-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  background-color: rgba(255, 255, 255, 0.95);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.cta__form-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.95);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.cta__form-button {
  width: 100%;
}

.cta__privacy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* Footer */
.footer {
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  max-width: 320px;
}

.footer__logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.footer__description {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg);
  color: var(--color-text-muted);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-elevated);
  color: var(--color-text-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.footer__social-link:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
}

.footer__section-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__link-item {
  margin-bottom: var(--space-sm);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: var(--color-text-primary);
}

.footer__bottom {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-bg-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer__legal-link:hover {
  color: var(--color-text-primary);
}

/* Responsive Breakpoints */

/* Desktop (1024px and below) */
@media (max-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-5xl);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow__steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow__steps::before {
    display: none;
  }

  .security__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--color-bg-primary);
    flex-direction: column;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .header__nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header__links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .header__cta {
    flex-direction: column;
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero__title {
    font-size: var(--font-size-4xl);
  }

  .hero__description {
    font-size: var(--font-size-lg);
  }

  .hero__image {
    order: -1;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .workflow__steps {
    grid-template-columns: 1fr;
  }

  .benefits__content {
    grid-template-columns: 1fr;
  }

  .benefits__image {
    order: -1;
  }

  .security__grid {
    grid-template-columns: 1fr;
  }

  .cta__form-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .hero {
    padding-top: calc(72px + var(--space-2xl));
    padding-bottom: var(--space-3xl);
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__description {
    font-size: var(--font-size-base);
  }

  .hero__actions {
    flex-direction: column;
  }

  .features,
  .workflow,
  .benefits,
  .security,
  .cta,
  .footer {
    padding: var(--space-3xl) 0;
  }

  .section-title {
    margin-bottom: var(--space-2xl);
  }

  .cta__title {
    font-size: var(--font-size-2xl);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer__legal {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* ============================================
   Product Screenshots Section
   ============================================ */

.screenshots {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-alt);
}

.screenshots__category-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.screenshots__desktop {
  margin-bottom: var(--space-4xl);
}

.screenshots__desktop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}

.screenshot-card {
  margin: 0;
}

.screenshot-card__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background-color: var(--color-bg-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.screenshot-card__frame--desktop {
  border: 3px solid #2d2d2d;
  border-radius: var(--radius-lg);
}

.screenshot-card__frame--desktop::before {
  content: '';
  display: block;
  background: linear-gradient(90deg, #ff5f56 0%, #ff5f56 33%, #ffbd2e 33%, #ffbd2e 66%, #27ca40 66%, #27ca40 100%);
  height: 8px;
  background-size: 36px 8px;
  background-repeat: no-repeat;
  background-position: 8px center;
  background-color: #2d2d2d;
  padding: 12px 0;
}

.screenshot-card__frame img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-card:hover .screenshot-card__frame {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

.screenshot-card__caption {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-align: center;
}

/* Mobile Screenshots */
.screenshots__mobile-grid {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.screenshot-card--mobile {
  max-width: 200px;
}

.screenshot-card__phone-frame {
  position: relative;
  background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 32px;
  padding: 12px;
  box-shadow: var(--shadow-xl), inset 0 1px 1px rgba(255,255,255,0.1);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.screenshot-card__phone-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: #1a1a1a;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.screenshot-card__phone-frame::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  z-index: 3;
}

.screenshot-card__phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.screenshot-card--mobile:hover .screenshot-card__phone-frame {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl), inset 0 1px 1px rgba(255,255,255,0.1);
}

/* Screenshots Responsive */
@media (max-width: 1024px) {
  .screenshots__desktop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots__desktop-grid .screenshot-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .screenshots__desktop-grid {
    grid-template-columns: 1fr;
  }

  .screenshots__desktop-grid .screenshot-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }

  .screenshots__mobile-grid {
    gap: var(--space-xl);
  }

  .screenshot-card--mobile {
    max-width: 160px;
  }
}

@media (max-width: 480px) {
  .screenshots {
    padding: var(--space-3xl) 0;
  }

  .screenshot-card--mobile {
    max-width: 140px;
  }

  .screenshot-card__phone-frame {
    border-radius: 24px;
    padding: 8px;
  }

  .screenshot-card__phone-frame::before {
    width: 40px;
    height: 14px;
    top: 6px;
  }

  .screenshot-card__phone-frame img {
    border-radius: 16px;
  }
}

/* ============================================
   Technical Architecture Section
   ============================================ */

.architecture {
  padding: var(--space-5xl) 0;
  background: var(--color-bg-elevated);
}

.architecture__subsection-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

/* System Architecture Diagram */
.architecture__diagram {
  margin-bottom: var(--space-4xl);
}

/* Architecture Images */
.architecture__image-container {
    margin: 0;
    text-align: center;
}

.architecture__image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.architecture__flow-diagrams,
.architecture__flow-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.architecture__flow-diagram {
    margin: 0;
    text-align: center;
}

.architecture__flow-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    background: var(--color-bg-card);
}

.architecture__flow-diagram figcaption {
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.architecture__diagram-container {
  max-width: 700px;
  margin: 0 auto;
}

.arch-diagram {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-xl);
}

.arch-diagram__header {
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-bg-elevated);
  margin-bottom: var(--space-xl);
}

.arch-diagram__apps {
  display: flex;
  justify-content: space-around;
  gap: var(--space-xl);
}

.arch-diagram__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.arch-diagram__app-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-sm);
}

.arch-diagram__app-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.arch-diagram__app-tech {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.arch-diagram__connector {
  display: flex;
  justify-content: center;
  color: var(--color-text-muted);
  padding: var(--space-sm) 0;
}

.arch-diagram__connector svg {
  max-width: 300px;
}

.arch-diagram__database {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0;
  color: var(--color-accent);
}

.arch-diagram__database span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-xs);
}

.arch-diagram__services {
  display: flex;
  justify-content: space-around;
  gap: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-bg-elevated);
}

.arch-diagram__service {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--color-text-secondary);
}

.arch-diagram__service svg {
  margin-bottom: var(--space-xs);
  color: var(--color-accent);
}

.arch-diagram__service span {
  font-size: var(--font-size-xs);
}

.arch-diagram__service-detail {
  color: var(--color-text-muted);
}

/* Data Flow */
.architecture__flow {
  margin-bottom: var(--space-4xl);
}

.architecture__flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.flow-step {
  flex: 0 1 200px;
  text-align: center;
}

.flow-step__number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.flow-step__content {
  padding: 0 var(--space-sm);
}

.flow-step__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.flow-step__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

.flow-step__arrow {
  display: flex;
  align-items: center;
  padding-top: var(--space-md);
  color: var(--color-primary);
}

/* Technology Stack */
.architecture__stack {
  margin-bottom: var(--space-4xl);
}

.architecture__stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-xl);
}

.tech-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.tech-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  color: white;
}

.tech-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.tech-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.tech-card__list li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tech-card__list li:last-child {
  border-bottom: none;
}

/* API Endpoints */
.architecture__api {
  margin-bottom: var(--space-4xl);
}

.architecture__code-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.code-block {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-block__header {
  background: var(--color-bg-primary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-bg-elevated);
}

.code-block__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block__content {
  padding: var(--space-md);
  margin: 0;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  overflow-x: auto;
}

.code-block__content code {
  font-family: inherit;
}

/* Database Schema */
.architecture__schema-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.schema-group {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.schema-group__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
}

.schema-group__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schema-group__list li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.schema-group__list li:last-child {
  border-bottom: none;
}

.schema-group__list code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: var(--font-size-xs);
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-medium);
}

/* Architecture Responsive */
@media (max-width: 1024px) {
  .architecture__stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .architecture__code-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture__code-panel .code-block:last-child {
    grid-column: span 2;
  }

  .architecture__schema-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture__schema-grid .schema-group:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .architecture {
    padding: var(--space-4xl) 0;
  }

  .architecture__subsection-title {
    font-size: var(--font-size-xl);
  }

  .arch-diagram {
    padding: var(--space-xl);
  }

  .arch-diagram__apps {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .arch-diagram__services {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .arch-diagram__connector {
    display: none;
  }

  .architecture__flow-steps {
    flex-direction: column;
    align-items: center;
  }

  .flow-step {
    flex: 0 1 auto;
    max-width: 300px;
  }

  .flow-step__arrow {
    transform: rotate(90deg);
    padding: var(--space-sm) 0;
  }

  .architecture__stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture__stack-grid .tech-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }

  .architecture__code-panel {
    grid-template-columns: 1fr;
  }

  .architecture__code-panel .code-block:last-child {
    grid-column: span 1;
  }

  .architecture__schema-grid {
    grid-template-columns: 1fr;
  }

  .architecture__schema-grid .schema-group:last-child {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .architecture {
    padding: var(--space-3xl) 0;
  }

  .architecture__stack-grid {
    grid-template-columns: 1fr;
  }

  .architecture__stack-grid .tech-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }

  .code-block__content {
    font-size: var(--font-size-xs);
  }
}

/* Vision Section */
.architecture__vision {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.vision__content {
  max-width: 800px;
  margin: 0 auto;
}

.vision__text {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.vision__text:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .vision__text {
    font-size: var(--font-size-base);
  }
}
