/* ═══════════════════════════════════════════════════════════
   Resources Page
   ═══════════════════════════════════════════════════════════ */

/* ── Hero ── */
.res-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 28px;
  align-items: center;
  animation: fadeInUp 0.8s var(--ease-out-expo);
}

.res-hero h1 {
  max-width: 560px;
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.res-hero h1 span { color: var(--blue); }

.res-hero .hero-text {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
}

.res-hero .search-input {
  max-width: 470px;
  margin-top: 20px;
}

/* ── Hero Visual ── */
.res-visual {
  position: relative;
  min-height: 280px;
}

.vis-bubble {
  position: absolute;
  left: 40px;
  top: 20px;
  width: 76px;
  height: 54px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 8px 20px rgba(38,104,255,0.2);
}

.vis-bubble::before {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: var(--blue-deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.vis-bubble::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 40px;
  height: 10px;
  border-radius: 10px;
  background: radial-gradient(circle, #fff 0 5px, transparent 6px) left center/18px 10px repeat-x;
}

.vis-laptop {
  position: absolute;
  left: 130px;
  top: 12px;
  width: 290px;
  height: 170px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fdfefe, #e8edf5);
  border: 6px solid #334b78;
  box-shadow: var(--shadow-md);
}

.vis-laptop::after {
  content: "";
  position: absolute;
  left: -28px;
  right: -28px;
  bottom: -18px;
  height: 18px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, #c4ccd9, #8d97a6);
}

.vis-line {
  position: absolute;
  left: 18px;
  height: 8px;
  border-radius: 8px;
  background: #c7d4ee;
}

.vl1 { top: 22px; width: 74px; }
.vl2 { top: 54px; width: 120px; }
.vl3 { top: 80px; width: 120px; }

.vis-chart {
  position: absolute;
  left: 22px;
  right: 18px;
  bottom: 24px;
  height: 64px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, transparent 0 12%, rgba(38,104,255,0.92) 12% 14%, transparent 14% 22%, rgba(38,104,255,0.92) 22% 24%, transparent 24% 32%, rgba(38,104,255,0.92) 32% 34%, transparent 34% 42%, rgba(38,104,255,0.92) 42% 44%, transparent 44% 100%),
    linear-gradient(180deg, #fff, #f4f7fd);
}

.vis-steth {
  position: absolute;
  right: 72px;
  top: 22px;
  width: 120px;
  height: 180px;
  border: 6px solid #36588d;
  border-color: transparent transparent #36588d #36588d;
  border-radius: 0 0 90px 90px;
}

.vis-plant {
  position: absolute;
  right: 18px;
  bottom: 8px;
  width: 46px;
  height: 46px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #f2f2f2, #d2d7df);
}

.vis-plant::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 30px;
  width: 34px;
  height: 44px;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #58b84b, #2f8d34);
}

/* ── Content Layout ── */
.res-content {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 36px;
}

.res-main { flex: 1; min-width: 0; }

/* ── Filters ── */
.res-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.res-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.res-filters a:hover {
  color: var(--blue);
  border-color: var(--line);
  background: rgba(38,104,255,0.03);
}

.res-filters a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(38,104,255,0.2);
}

/* ── Article Grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.article-card {
  overflow: hidden;
  padding-bottom: 16px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease-out-expo);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-thumb {
  height: 100px;
}

.article-thumb.blue { background: linear-gradient(135deg, rgba(38,104,255,0.1), rgba(38,104,255,0.02)); }
.article-thumb.mint { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.03)); }
.article-thumb.violet { background: linear-gradient(135deg, rgba(124,92,252,0.14), rgba(124,92,252,0.03)); }
.article-thumb.amber { background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.03)); }
.article-thumb.rose { background: linear-gradient(135deg, rgba(244,63,94,0.12), rgba(244,63,94,0.03)); }
.article-thumb.ice { background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(59,130,246,0.03)); }

.article-tag {
  display: inline-flex;
  margin: 14px 18px 0;
  min-height: 24px;
  padding: 0 10px;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.article-card h2 {
  margin: 12px 18px 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-card > p {
  margin: 0 18px 14px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 18px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.article-meta a {
  color: var(--blue);
  font-weight: 700;
  transition: gap 0.2s;
}

/* ── Sidebar ── */
.res-sidebar {
  width: 320px;
  display: grid;
  gap: 16px;
  flex-shrink: 0;
}

.side-card {
  padding: 22px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.side-card h3 {
  margin: 0 0 16px;
  font-size: 1.3rem;
}

.side-card ul, .side-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.side-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.side-card li b {
  color: var(--muted);
  font-size: 13px;
}

.side-card ol li { justify-content: flex-start; }

.side-card > a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}

.mini-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(38,104,255,0.12), rgba(38,104,255,0.03));
  flex-shrink: 0;
}

.side-card ol p {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
}

.subscribe-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.sub-form {
  display: flex;
  gap: 8px;
}

.sub-form input {
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.sub-form input:focus { border-color: var(--blue); }

.sub-form button {
  min-width: 100px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(38,104,255,0.25);
}

/* ── Responsive ── */
@media (max-width: 1280px) {
  .res-hero { grid-template-columns: 1fr; }
  .res-content { flex-direction: column; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .res-sidebar { width: 100%; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .article-grid, .res-sidebar { grid-template-columns: 1fr; }
}
