/* Extracted page styles from resources.php */

/* =========================================================
   RESOURCES PAGE - SERVICES HERO STYLE + INTERACTIVE
========================================================= */

.kt-res-page {
  --res-cyan: #06b6d4;
  --res-cyan-dark: #0891b2;
  --res-blue: #0e3f6c;
  --res-blue-2: #123f68;
  --res-text: var(--text, #0f172a);
  --res-muted: var(--text-muted, #64748b);
  --res-bg: var(--bg, #ffffff);
  --res-bg-2: var(--bg-2, rgba(241, 245, 249, 0.45));
  --res-card: var(--card-bg, #ffffff);
  --res-border: var(--border, rgba(148, 163, 184, 0.28));

  min-height: 100vh;
  padding-top: var(--nav-h, 80px);
  background: var(--res-bg);
  color: var(--res-text);
  overflow: hidden;
}

[data-theme="dark"] .kt-res-page {
  --res-text: #f8fafc;
  --res-muted: rgba(226, 232, 240, 0.78);
  --res-bg: #0e3f6c;
  --res-bg-2: #123f68;
  --res-card: rgba(255, 255, 255, 0.08);
  --res-border: rgba(255, 255, 255, 0.16);

  background:
    radial-gradient(circle at 12% 10%, rgba(6, 182, 212, 0.18), transparent 32%),
    radial-gradient(circle at 86% 26%, rgba(255, 255, 255, 0.08), transparent 26%),
    #0e3f6c;
}

.kt-res-page * {
  box-sizing: border-box;
}

.kt-res-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* Animated cyan separator */
.kt-res-line {
  position: relative;
  height: 1px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.36), transparent);
}

.kt-res-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #06b6d4, #67e8f9, transparent);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.9);
  animation: ktResLineMove 3.8s linear infinite;
}

@keyframes ktResLineMove {
  0% { left: -35%; }
  100% { left: 100%; }
}

/* Shared */
.kt-res-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--res-cyan);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kt-res-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--res-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.kt-res-section-title {
  margin: 0 0 14px;
  color: var(--res-text);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.kt-res-section-title span {
  color: var(--res-cyan);
}

.kt-res-section-lead {
  max-width: 680px;
  margin: 0;
  color: var(--res-muted);
  line-height: 1.75;
  font-size: 1rem;
}

/* Buttons */
.kt-res-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  transition: 0.25s ease;
}

.kt-res-btn.primary {
  background: var(--res-cyan-dark);
  color: #fff !important;
  border: 1px solid var(--res-cyan-dark);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.18);
}

.kt-res-btn.primary:hover {
  transform: translateY(-2px);
  background: var(--res-cyan);
  border-color: var(--res-cyan);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.22);
}

.kt-res-btn.ghost {
  background: transparent;
  color: var(--res-text) !important;
  border: 1px solid var(--res-border);
}

.kt-res-btn.ghost:hover {
  transform: translateY(-2px);
  color: var(--res-cyan) !important;
  border-color: rgba(6, 182, 212, 0.55);
}

/* Hero - same style as Services page */
.kt-res-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 9vw, 132px) 0 clamp(78px, 8vw, 112px);
  text-align: left;
  border-bottom: 1px solid var(--res-border);
  background: var(--res-bg);
}

.kt-res-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.kt-res-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.20;
  display: block;
}

.kt-res-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--res-bg) 0%,
    rgba(255, 255, 255, 0.92) 54%,
    rgba(255, 255, 255, 0.38) 100%
  );
}

[data-theme="dark"] .kt-res-hero-bg img {
  opacity: 0.32;
}

[data-theme="dark"] .kt-res-hero-bg::after {
  background: linear-gradient(
    90deg,
    #0e3f6c 0%,
    rgba(14, 63, 108, 0.92) 54%,
    rgba(14, 63, 108, 0.52) 100%
  );
}

.kt-res-hero .kt-res-container {
  position: relative;
  z-index: 1;
}

.kt-res-hero-content {
  max-width: 920px;
}

.kt-res-hero h1 {
  max-width: 900px;
  margin: 0 0 24px;
  color: var(--res-text);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.055em;
}

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

.kt-res-hero p {
  max-width: 780px;
  margin: 0 0 34px;
  color: var(--res-muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.kt-res-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  margin-top: 34px;
}

.kt-res-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.kt-res-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--res-text);
  background: rgba(6, 182, 212, 0.06);
  font-size: 0.82rem;
  font-weight: 800;
  transition: 0.25s ease;
}

.kt-res-pill:hover {
  background: rgba(6, 182, 212, 0.14);
  color: var(--res-cyan);
  transform: translateY(-2px);
}

[data-theme="dark"] .kt-res-pill {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

/* Topics */
.kt-res-topics {
  padding: 64px 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(6, 182, 212, 0.08), transparent 30%),
    var(--res-bg-2);
  border-bottom: 1px solid var(--res-border);
}

.kt-res-topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kt-res-topic-card {
  min-height: 100%;
  padding: 28px;
  border-radius: 20px;
  background: var(--res-card);
  border: 1px solid var(--res-border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.kt-res-topic-card:hover,
.kt-res-topic-card.is-active {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.10);
}

.kt-res-topic-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.10);
  color: var(--res-cyan);
  font-size: 1.2rem;
  font-weight: 950;
}

.kt-res-topic-card h3 {
  margin: 0 0 10px;
  color: var(--res-text);
  font-size: 1.05rem;
  font-weight: 950;
}

.kt-res-topic-card p {
  margin: 0;
  color: var(--res-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

/* Articles */
.kt-res-articles {
  padding: clamp(76px, 9vw, 112px) 0;
  background: var(--res-bg);
}

.kt-res-articles-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.kt-res-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.kt-res-filter {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--res-border);
  background: transparent;
  color: var(--res-text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
  transition: 0.25s ease;
}

.kt-res-filter:hover,
.kt-res-filter.is-active {
  color: #ffffff;
  background: var(--res-cyan-dark);
  border-color: var(--res-cyan-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.16);
}

.kt-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.kt-res-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 30px;
  border-radius: 22px;
  background: var(--res-card);
  border: 1px solid var(--res-border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.kt-res-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 20px 48px rgba(6, 182, 212, 0.12);
}

.kt-res-card.is-hidden {
  display: none;
}

.kt-res-tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  color: var(--res-cyan);
  background: rgba(6, 182, 212, 0.10);
  border: 1px solid rgba(6, 182, 212, 0.20);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kt-res-card h3 {
  margin: 0 0 14px;
  color: var(--res-text);
  font-size: 1.12rem;
  line-height: 1.36;
  font-weight: 950;
  transition: color 0.25s ease;
}

.kt-res-card:hover h3 {
  color: var(--res-cyan);
}

.kt-res-card p {
  flex: 1;
  margin: 0 0 24px;
  color: var(--res-muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.kt-res-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--res-cyan);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 950;
  transition: gap 0.25s ease;
}

.kt-res-card:hover .kt-res-read {
  gap: 13px;
}

/* CTA */
.kt-res-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 9vw, 112px) 0;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.24), transparent 28%),
    #0e3f6c;
}

.kt-res-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.kt-res-cta .kt-res-container {
  position: relative;
  z-index: 1;
}

.kt-res-cta h2 {
  max-width: 820px;
  margin: 0 auto 18px;
  color: #ffffff;
  font-size: clamp(1.9rem, 3.7vw, 3rem);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.kt-res-cta h2 span {
  color: var(--res-cyan);
}

.kt-res-cta p {
  max-width: 660px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.kt-res-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.kt-res-cta .kt-res-btn.ghost {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24);
}

.kt-res-cta .kt-res-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
}

/* Reveal */
.kt-res-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.kt-res-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .kt-res-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .kt-res-page {
    padding-top: var(--nav-h, 72px);
  }

  .kt-res-container {
    width: min(100% - 28px, 1180px);
  }

  .kt-res-hero {
    padding: 64px 0 70px;
  }

  .kt-res-hero-bg::after {
    background: linear-gradient(
      90deg,
      var(--res-bg) 0%,
      rgba(255, 255, 255, 0.96) 72%,
      rgba(255, 255, 255, 0.75) 100%
    );
  }

  [data-theme="dark"] .kt-res-hero-bg::after {
    background: linear-gradient(
      90deg,
      #0e3f6c 0%,
      rgba(14, 63, 108, 0.94) 72%,
      rgba(14, 63, 108, 0.78) 100%
    );
  }

  .kt-res-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3.3rem);
  }

  .kt-res-actions,
  .kt-res-cta-actions {
    flex-direction: column;
  }

  .kt-res-btn {
    width: 100%;
  }

  .kt-res-topics,
  .kt-res-articles {
    padding: 58px 0;
  }
}

@media (max-width: 560px) {
  .kt-res-topics-grid,
  .kt-res-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kt-res-line::before,
  .kt-res-reveal,
  .kt-res-card,
  .kt-res-topic-card,
  .kt-res-filter {
    animation: none !important;
    transition: none !important;
  }

  .kt-res-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
