:root {
  --blue: #256ee7;
  --black: #000000;
  --white: #ffffff;
  --gray-1: #86868b;
  --gray-2: #aeaeb2;
  --gray-3: #c7c7cc;
  --gray-4: #d1d1d6;
  --gray-5: #e5e5ea;
  --gray-6: #f2f2f2;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 48px 0;
}

.section.bottom-padding {
  padding-bottom: 64px;
}

/* Navbar */
.navbar {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.brand img {
  height: 32px;
  width: auto;
}

.navbar-functions {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  display: inline-flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  padding: 4px 0;
  position: relative;
}

.nav-link .hover-line {
  height: 1px;
  background: var(--black);
  width: 0;
  transition: width 0.2s ease;
  position: absolute;
  bottom: 0;
  left: 0;
}

.nav-link:hover .hover-line,
.nav-link.active .hover-line {
  width: 100%;
}

.navbar-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-4);
}

/* Hero / title */
.title-wrapper-shop {
  padding: 48px 0 32px;
}

.title-1-shop {
  font-size: 40px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  line-height: 1.2;
}

.heading-6 {
  font-size: 16px;
  color: var(--gray-1);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Category tags */
.cms-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cms-link-underline {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  border: 1px solid var(--gray-4);
  border-radius: 100px;
  padding: 8px 16px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.cms-link-underline:hover,
.cms-link-underline.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #f0f5ff;
}

/* App grid */
.cms-product-list-3x {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}

@media (max-width: 768px) {
  .cms-product-list-3x {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cms-product-list-3x {
    grid-template-columns: 1fr;
  }
}

.cms-product-item {
  display: flex;
  flex-direction: column;
}

.product-thumb-3x {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-5);
  box-shadow: 0 0 0 1px #0000001a, 0 1px 3px #0000001a;
  transition: box-shadow 0.2s ease;
  background: var(--gray-6);
  aspect-ratio: 16/9;
}

.product-thumb-3x:hover {
  box-shadow: 0 0 0 1px #0000001a, 0 4px 12px #0000001f;
}

.product-thumb-3x img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe, #f0f5ff);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 16px;
}

.title-product-thumb-3x {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin-top: 10px;
  line-height: 1.3;
}

.thumb-caption {
  font-size: 13px;
  color: var(--gray-1);
  margin-top: 4px;
  line-height: 1.4;
}

.underline-product-thumb {
  height: 1px;
  background: var(--gray-5);
  margin-top: 16px;
}

/* App detail */
.app-detail {
  max-width: 800px;
}

.app-detail-header {
  margin-bottom: 32px;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--gray-1);
  font-size: 14px;
}

.app-creator {
  color: var(--gray-1);
  font-size: 14px;
}

.app-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.category-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue);
  background: #f0f5ff;
  border: 1px solid #c5d8f9;
  border-radius: 100px;
  padding: 4px 12px;
}

.app-description {
  font-size: 16px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Rich text body from Webflow */
.app-details {
  font-size: 16px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 40px;
}

.app-details h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.app-details h3 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; }
.app-details p  { margin-bottom: 16px; }
.app-details ul, .app-details ol { padding-left: 24px; margin-bottom: 16px; }
.app-details li { margin-bottom: 6px; }
.app-details strong { font-weight: 600; }

/* Webflow responsive video embed
   Structure: <figure style="padding-bottom:75%"><div><iframe></iframe></div></figure>
   The figure gets position:relative + height:0, padding-bottom sets the aspect ratio,
   the inner div and iframe fill it absolutely. */
.app-details figure.w-richtext-figure-type-video {
  position: relative;
  width: 100%;
  height: 0;
  /* padding-bottom:75% already set inline by Webflow — sets the aspect ratio */
  overflow: hidden;
  margin: 32px 0;
}

.app-details figure.w-richtext-figure-type-video > div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.app-details figure.w-richtext-figure-type-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Author avatar */
.app-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.author-name {
  font-size: 14px;
  color: var(--gray-1);
}

.author-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.button-apply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 4px;
  min-height: 45px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.button-apply:hover {
  background: var(--black);
  color: var(--white);
}

/* Learning Center */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 768px) {
  .learning-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.category-thumb {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-5);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.category-thumb:hover {
  box-shadow: 0 4px 16px #0000001a;
}

.category-thumb-img {
  aspect-ratio: 16/9;
  background: var(--gray-6);
  overflow: hidden;
}

.category-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f0fe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 32px;
}

.category-thumb-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-thumb h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.3;
  margin-bottom: 8px;
}

.category-thumb-description {
  font-size: 14px;
  color: var(--gray-1);
  line-height: 1.5;
  flex: 1;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--gray-5);
  padding: 40px 0;
  background: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-logo img {
  height: 24px;
  width: auto;
}

.footer-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.footer-link {
  font-size: 13px;
  color: var(--gray-1);
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--black);
}

.footer-sub {
  font-size: 13px;
  color: var(--gray-2);
}

/* Page heading */
.page-heading {
  padding: 48px 0 16px;
}

.page-heading h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.page-heading p {
  font-size: 16px;
  color: var(--gray-1);
}
