/* ══════════════════════════════════════════
   NEXORA RESOURCES — resources.css
   Extends style.css — do not modify style.css
══════════════════════════════════════════ */

/* ── HERO ── */
.res-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 55%, #0d0d0d 100%);
  padding: 120px 0 64px;
  overflow: hidden;
  text-align: center;
}
.res-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.res-hero-glow {
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(229,57,53,0.2), transparent 70%);
}
.res-hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}
.res-hero-inner { position: relative; z-index: 1; }

.res-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(229,57,53,0.12);
  border: 1px solid rgba(229,57,53,0.3);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.res-hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.res-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

/* SEARCH */
.res-search {
  display: flex;
  align-items: center;
  max-width: 580px;
  margin: 0 auto 22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
}
.res-search-icon {
  position: absolute;
  left: 18px;
  color: var(--gray);
  font-size: 0.9rem;
}
.res-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 15px 16px 15px 44px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--dark);
  background: transparent;
}
.res-search-input::placeholder { color: #aaa; }
.res-search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 15px 28px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.res-search-btn:hover { background: var(--red-dark); }

/* TAGS */
.res-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.res-tags-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  margin-right: 4px;
}
.res-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 20px;
  transition: all .2s;
}
.res-tag:hover {
  background: rgba(229,57,53,0.15);
  border-color: rgba(229,57,53,0.4);
  color: #fff;
}

/* ── RESOURCE CATEGORIES ── */
.res-categories { background: #fff; }

.res-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.res-cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all .25s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.res-cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(229,57,53,0.2);
}
.res-cat-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: rgba(229,57,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--red);
  transition: all .25s;
}
.res-cat-card:hover .res-cat-icon {
  background: var(--red);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}
.res-cat-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
}
.res-cat-desc {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  flex: 1;
}
.res-cat-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s;
  margin-top: 4px;
}
.res-cat-cta:hover { gap: 9px; color: var(--red-dark); }

/* ── FEATURED ARTICLES ── */
.res-articles { background: var(--bg); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}
/* First article spans 2 cols + 2 rows as featured */
.featured-article {
  grid-column: span 2;
  grid-row: span 2;
  flex-direction: column;
}
.featured-article .article-thumb { height: 280px; }
.featured-article .article-title { font-size: 1.5rem; }
.featured-article .article-excerpt { font-size: 0.95rem; }

.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.article-thumb {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thumb-grad-1 { background: linear-gradient(135deg, #0d1f0d 0%, #082008 100%); }
.thumb-grad-2 { background: linear-gradient(135deg, #0d0a1a 0%, #10082a 100%); }
.thumb-grad-3 { background: linear-gradient(135deg, #1a0505 0%, #2a0808 100%); }
.thumb-grad-4 { background: linear-gradient(135deg, #001020 0%, #001530 100%); }
.thumb-grad-5 { background: linear-gradient(135deg, #1a0d00 0%, #1f1000 100%); }
.article-thumb-icon {
  font-size: 2.6rem;
  color: rgba(255,255,255,0.85);
  transition: transform .3s;
}
.article-card:hover .article-thumb-icon { transform: scale(1.12); }
.article-cat-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(229,57,53,0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}
.article-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--gray);
}
.article-cat { color: var(--red); font-weight: 700; }
.article-dot { color: var(--border); }
.article-time i { font-size: 0.7rem; }
.article-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
}
.article-excerpt {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  flex: 1;
}
.article-read {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s;
  margin-top: 2px;
}
.article-read:hover { gap: 9px; color: var(--red-dark); }

/* ── TUTORIALS ── */
.res-tutorials { background: #fff; }

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.tutorial-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.tutorial-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 16px rgba(229,57,53,0.1);
  transform: translateX(4px);
}
.tutorial-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(229,57,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--red);
  flex-shrink: 0;
  transition: all .2s;
}
.tutorial-card:hover .tutorial-icon { background: var(--red); color: #fff; }
.tutorial-info { flex: 1; }
.tutorial-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.tutorial-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diff-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.diff-beginner { background: rgba(16,185,129,0.1); color: var(--success); }
.diff-intermediate { background: rgba(245,158,11,0.1); color: #f59e0b; }
.diff-advanced { background: rgba(229,57,53,0.1); color: var(--red); }
.tutorial-time {
  font-size: 0.72rem;
  color: var(--gray);
}
.tutorial-time i { font-size: 0.68rem; }
.tutorial-arrow {
  color: var(--border);
  font-size: 0.85rem;
  transition: all .2s;
}
.tutorial-card:hover .tutorial-arrow { color: var(--red); transform: translateX(3px); }

/* ── LEARNING PATHS ── */
.res-paths { background: var(--bg); }

.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.path-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.path-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.path-card-featured {
  border-color: var(--red);
  box-shadow: 0 10px 40px rgba(229,57,53,0.15);
}
.path-popular-badge {
  position: absolute;
  top: -11px; left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.path-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.path-level-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.beginner-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.intermediate-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }
.advanced-icon { background: rgba(229,57,53,0.1); color: var(--red); }
.path-level-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.path-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
}
.path-topics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.path-topics li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  color: var(--dark);
  font-weight: 500;
}
.path-topics li i {
  color: var(--success);
  font-size: 0.82rem;
}
.path-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.path-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.path-progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 3px;
  transition: width 1s ease;
}
.path-progress-label {
  font-size: 0.72rem;
  color: var(--gray);
  font-weight: 600;
  white-space: nowrap;
}
.path-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* ── LATEST INSIGHTS ── */
.res-insights { background: #fff; }

.insights-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.insight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.insight-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.insight-thumb {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.9);
}
.insight-grad-1 { background: linear-gradient(135deg, #0d1f0d, #082008); }
.insight-grad-2 { background: linear-gradient(135deg, #0d0a1a, #10082a); }
.insight-grad-3 { background: linear-gradient(135deg, #1a0505, #2a0808); }
.insight-grad-4 { background: linear-gradient(135deg, #001020, #001530); }
.insight-grad-5 { background: linear-gradient(135deg, #1a0d00, #1f1000); }
.insight-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.insight-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
}
.insight-summary {
  font-size: 0.76rem;
  color: var(--gray);
  line-height: 1.55;
  flex: 1;
}
.insight-body .article-read { font-size: 0.76rem; }

/* ── NEWSLETTER ── */
.res-newsletter {
  background: var(--bg);
  padding: 64px 0;
}
.newsletter-inner {
  position: relative;
  background: linear-gradient(135deg, #111 0%, #1a0505 55%, #0d0d0d 100%);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.newsletter-glow {
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 400px;
  background: radial-gradient(circle, rgba(229,57,53,0.18), transparent 70%);
  pointer-events: none;
}
.newsletter-content { position: relative; z-index: 1; }
.newsletter-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(229,57,53,0.15);
  border: 1px solid rgba(229,57,53,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--red);
  margin: 0 auto 20px;
}
.newsletter-headline {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.newsletter-text {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.newsletter-input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-size: 0.88rem;
  color: #fff;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input:focus { border-color: var(--red); }
.newsletter-btn { white-space: nowrap; }
.newsletter-success {
  display: none;
  margin-top: 16px;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}
.newsletter-success.show {
  display: block;
  animation: fadeInUp .4s ease;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media(max-width:1100px) {
  .res-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .insights-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:900px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-article { grid-column: span 2; grid-row: span 1; }
  .featured-article .article-thumb { height: 180px; }
  .featured-article .article-title { font-size: 1.2rem; }
  .paths-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .tutorials-grid { grid-template-columns: 1fr; }
}
@media(max-width:768px) {
  .res-hero-title { font-size: 2.1rem; }
  .res-hero { padding: 100px 0 52px; }
  .res-search { flex-wrap: wrap; }
  .articles-grid { grid-template-columns: 1fr; }
  .featured-article { grid-column: span 1; }
  .insights-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-headline { font-size: 1.5rem; }
}
@media(max-width:480px) {
  .res-cat-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .res-hero-title { font-size: 1.8rem; }
  .res-search-btn { width: 100%; }
}