/**
 * Bosaname Resources Page Styles
 *
 * Hero, Topics, Featured, Formats, Latest, Newsletter.
 * Loaded ONLY on home.php (is_home()) via inc/enqueue.php.
 */

/* ── Hero (structural — shared base in components/hero.css) ── */
.bosa-res-hero {
  background: var(--bosa-primary-dark);
}

.bosa-res-hero-inner {
  padding: 80px 16px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.bosa-res-hero-text {
  color: #fff;
}

.bosa-res-hero-label {
  margin-bottom: 16px;
}

.bosa-res-hero-title {
  margin: 0;
}

.bosa-res-hero-desc {
  margin-top: 16px;
  max-width: 520px;
}

/* Search form — unique to Resources */
.bosa-res-hero-search {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 540px;
}

.bosa-res-hero-search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0 16px;
}

.bosa-res-hero-search-input svg {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.bosa-res-hero-search-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  padding: 14px 0;
}

.bosa-res-hero-search-input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.bosa-res-hero-search-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  justify-content: center;
}

.bosa-res-hero-img {
  border-radius: 16px;
  overflow: hidden;
}

.bosa-res-hero-img img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ── Topics ── */
.bosa-res-topics {
  background: #fff;
  padding: 32px 0;
  border-bottom: 1px solid var(--bosa-border);
}

.bosa-res-topics-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.bosa-res-topics-inner::-webkit-scrollbar {
  display: none;
}

.bosa-res-topic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--bosa-border);
  background: var(--bosa-canvas);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--bosa-ink);
  min-width: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bosa-res-topic:hover {
  border-color: var(--bosa-primary);
  background: rgba(22, 163, 74, 0.04);
}

.bosa-res-topic.is-active {
  background: var(--bosa-primary-dark);
  color: #fff;
  border-color: var(--bosa-primary-dark);
}

.bosa-res-topic svg {
  color: var(--bosa-primary);
}

.bosa-res-topic.is-active svg {
  color: #fff;
}

.bosa-res-topic-label {
  font-size: 12px;
  font-weight: 600;
}

/* ── Section Header (shared) ── */
.bosa-res-section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.bosa-res-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bosa-primary);
  margin-bottom: 8px;
}

.bosa-res-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--bosa-ink);
  margin: 0;
}

.bosa-res-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bosa-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.2s;
}

.bosa-res-section-link:hover {
  gap: 10px;
}

/* ── Featured Resources ── */
.bosa-res-featured {
  background: #fff;
  padding: 64px 0;
}

.bosa-res-featured-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.bosa-res-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.bosa-res-card {
  background: var(--bosa-canvas);
  border: 1px solid var(--bosa-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bosa-res-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.bosa-res-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.bosa-res-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bosa-res-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.bosa-res-card-badge.artikel {
  background: var(--bosa-primary);
}

.bosa-res-card-badge.guide {
  background: #0891b2;
}

.bosa-res-card-badge.case-study {
  background: var(--bosa-primary-dark);
}

.bosa-res-card-body {
  padding: 20px;
}

.bosa-res-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bosa-ink);
  line-height: 1.4;
  margin: 0 0 8px;
}

.bosa-res-card-title a {
  color: inherit;
  text-decoration: none;
}

.bosa-res-card-title a:hover {
  color: var(--bosa-primary);
}

.bosa-res-card-excerpt {
  font-size: 14px;
  color: var(--bosa-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bosa-res-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--bosa-muted);
}

.bosa-res-card-author-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bosa-res-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.bosa-res-card-author-name {
  font-weight: 600;
  color: var(--bosa-ink);
}

/* ── Format Resources ── */
.bosa-res-formats {
  background: var(--bosa-surface);
  padding: 64px 0;
}

.bosa-res-formats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.bosa-res-formats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bosa-res-format-card {
  background: var(--bosa-canvas);
  border: 1px solid var(--bosa-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bosa-res-format-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.bosa-res-format-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.1);
  color: var(--bosa-primary);
  margin: 0 auto 16px;
}

.bosa-res-format-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--bosa-ink);
  margin: 0 0 8px;
}

.bosa-res-format-card p {
  font-size: 13px;
  color: var(--bosa-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.bosa-res-format-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bosa-primary);
  text-decoration: none;
  transition: gap 0.2s;
}

.bosa-res-format-link:hover {
  gap: 8px;
}

/* ── Latest Articles ── */
.bosa-res-latest {
  background: #fff;
  padding: 64px 0;
}

.bosa-res-latest-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.bosa-res-latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.bosa-res-latest-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--bosa-border);
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bosa-res-latest-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.bosa-res-latest-thumb {
  flex-shrink: 0;
  width: 100%;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
}

.bosa-res-latest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bosa-res-latest-body {
  flex: 1;
  min-width: 0;
}

.bosa-res-latest-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--bosa-muted);
  margin-bottom: 8px;
}

.bosa-res-latest-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bosa-res-latest-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bosa-ink);
  line-height: 1.4;
  margin: 0 0 8px;
}

.bosa-res-latest-title a {
  color: inherit;
  text-decoration: none;
}

.bosa-res-latest-title a:hover {
  color: var(--bosa-primary);
}

.bosa-res-latest-excerpt {
  font-size: 13px;
  color: var(--bosa-muted);
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bosa-res-latest-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bosa-primary);
  text-decoration: none;
  transition: gap 0.2s;
}

.bosa-res-latest-link:hover {
  gap: 8px;
}

/* ── Newsletter CTA ── */
.bosa-res-newsletter {
  padding: 64px 0;
}

.bosa-res-newsletter-inner {
  background: var(--bosa-primary-dark);
  border-radius: 24px;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.bosa-res-newsletter-text {
  color: #fff;
}

.bosa-res-newsletter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.2);
  color: var(--bosa-primary);
  margin-bottom: 16px;
}

.bosa-res-newsletter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bosa-primary);
  margin-bottom: 12px;
}

.bosa-res-newsletter-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 12px;
}

.bosa-res-newsletter-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
}

.bosa-res-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bosa-res-newsletter-input-row {
  display: flex;
  gap: 0;
}

.bosa-res-newsletter-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.bosa-res-newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.bosa-res-newsletter-input:focus {
  border-color: var(--bosa-primary);
}

.bosa-res-newsletter-btn {
  padding: 14px 24px;
  background: var(--bosa-primary);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.bosa-res-newsletter-btn:hover {
  background: #15803d;
}

.bosa-res-newsletter-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.bosa-res-newsletter-disclaimer svg {
  color: var(--bosa-primary);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .bosa-res-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bosa-res-formats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bosa-res-latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bosa-res-latest-card {
    flex-direction: row;
  }
  .bosa-res-latest-thumb {
    width: 120px;
    height: 100px;
  }
}

@media (min-width: 1024px) {
  .bosa-res-hero-inner {
    grid-template-columns: 1fr 1fr;
    padding: 120px 24px 60px;
    gap: 48px;
  }
  .bosa-res-hero-title {
    font-size: 48px;
  }
  .bosa-res-hero-search {
    flex-direction: row;
    gap: 0;
  }
  .bosa-res-hero-search-input {
    border-right: none;
    border-radius: 8px 0 0 8px;
  }
  .bosa-res-hero-search-cat {
    border-radius: 0 8px 8px 0;
    justify-content: flex-start;
  }
  .bosa-res-hero-img img {
    height: 380px;
  }
  .bosa-res-featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bosa-res-formats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .bosa-res-latest-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bosa-res-newsletter-inner {
    grid-template-columns: 1fr 1fr;
    padding: 48px;
    gap: 48px;
  }
  .bosa-res-section-header {
    flex-direction: row;
    align-items: flex-end;
    gap: 0;
  }
}
