/* ==========================================
   RESOURCES PAGE STYLES
   ========================================== */

/* --- Page Hero --- */
.res-hero {
  padding: 120px 24px 60px;
  background: #fff;
  text-align: center;
  border-bottom: 1px solid #E5E7EB;
}
.res-hero__label {
  font-family: 'Inter', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin-bottom: 12px;
}
.res-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  color: #1A1A1A;
  line-height: 1.4;
  margin-bottom: 16px;
}
.res-hero__sub {
  font-size: 1rem;
  color: #6B7280;
  line-height: 1.8;
}

/* --- Filter Section --- */
.res-filter {
  padding: 32px 0;
  background: #F8F9FA;
  border-bottom: 1px solid #E5E7EB;
}
.res-filter__group {
  margin-bottom: 16px;
}
.res-filter__group:last-child {
  margin-bottom: 0;
}
.res-filter__label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 8px;
  letter-spacing: .05em;
}
.res-filter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.res-filter__tag {
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #6B7280;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.res-filter__tag:hover {
  border-color: #1E3A5F;
  color: #1E3A5F;
}
.res-filter__tag--active {
  background: #1A1A1A;
  color: #fff;
  border-color: #1A1A1A;
}
.res-filter__tag--active:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* --- Resource Grid --- */
.res-list {
  padding: 56px 0 80px;
  background: #fff;
}
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Resource Card --- */
.res-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #fff;
  overflow: hidden;
  transition: all .3s;
  text-decoration: none;
  color: inherit;
}
.res-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  border-color: #D1D5DB;
}
.res-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.res-card__thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .3s;
}
.res-card:hover .res-card__thumb-inner {
  transform: scale(1.03);
}
.res-card__thumb--blue {
  background: linear-gradient(135deg, #1E3A5F 0%, #2D5F8A 100%);
  color: #fff;
}
.res-card__thumb--green {
  background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
  color: #fff;
}
.res-card__thumb--dark {
  background: linear-gradient(135deg, #1A1A1A 0%, #374151 100%);
  color: #fff;
}
.res-card__thumb-icon svg {
  stroke: currentColor;
  opacity: .7;
}
.res-card__thumb-text {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  opacity: .85;
}
.res-card__body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.res-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.6;
  margin-bottom: 12px;
  flex-grow: 1;
}
.res-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.res-card__tag {
  font-size: .65rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 100px;
  background: #F3F4F6;
  color: #6B7280;
  letter-spacing: .03em;
}

/* No results */
.res-empty {
  text-align: center;
  padding: 80px 24px;
}
.res-empty p {
  font-size: 1rem;
  color: #6B7280;
  margin-bottom: 24px;
}

/* --- Resource Detail Page --- */
.res-detail {
  padding: 120px 24px 80px;
  background: #fff;
}
.res-detail__inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* Breadcrumb */
.res-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: .8rem;
  color: #9CA3AF;
  flex-wrap: wrap;
}
.res-breadcrumb a {
  color: #6B7280;
  transition: color .2s;
}
.res-breadcrumb a:hover {
  color: #1E3A5F;
}
.res-breadcrumb__sep {
  color: #D1D5DB;
}

/* Detail layout - 2 column */
.res-detail__layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
}

/* Left: Content */
.res-detail__content {
  position: relative;
}
.res-detail__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  letter-spacing: .05em;
}
.res-detail__tag--newbiz {
  background: #1E3A5F;
  color: #fff;
}
.res-detail__tag--dx {
  background: #0F766E;
  color: #fff;
}
.res-detail__title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  color: #1A1A1A;
  line-height: 1.5;
  margin-bottom: 20px;
}
.res-detail__desc {
  font-size: 1rem;
  color: #333;
  line-height: 1.9;
  margin-bottom: 32px;
}

/* Preview images */
.res-detail__previews {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}
.res-detail__preview-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #F8F9FA;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.res-detail__preview-img svg {
  opacity: .15;
}

/* Table of contents */
.res-detail__toc {
  margin-bottom: 40px;
}
.res-detail__toc-title {
  font-size: .9rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 12px;
}
.res-detail__toc-list {
  list-style: none;
  padding: 0;
}
.res-detail__toc-list li {
  font-size: .85rem;
  color: #333;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.res-detail__toc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D1D5DB;
}

/* Right: Form sidebar */
.res-detail__sidebar {
  position: sticky;
  top: 88px;
}
.res-detail__form-card {
  background: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 32px 28px;
}
.res-detail__form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
  text-align: center;
  margin-bottom: 8px;
}
.res-detail__form-sub {
  font-size: .8rem;
  color: #6B7280;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.6;
}
.res-form__group {
  margin-bottom: 16px;
}
.res-form__label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}
.res-form__label .required {
  color: #DC2626;
  font-size: .7rem;
  margin-left: 4px;
}
.res-form__input,
.res-form__select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: .9rem;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.res-form__input:focus,
.res-form__select:focus {
  outline: none;
  border-color: #1E3A5F;
  box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}
.res-form__input::placeholder {
  color: #9CA3AF;
}
.res-form__select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.res-form__submit {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: #1E3A5F;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  margin-top: 8px;
}
.res-form__submit:hover {
  background: #254A73;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,58,95,.25);
}
.res-form__privacy {
  font-size: .7rem;
  color: #9CA3AF;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}
.res-form__privacy a {
  color: #6B7280;
  text-decoration: underline;
}

/* Related resources */
.res-related {
  padding: 80px 0;
  background: #F8F9FA;
}
.res-related__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1A1A1A;
  text-align: center;
  margin-bottom: 40px;
}
.res-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .res-detail__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .res-detail__sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .res-hero {
    padding: 100px 20px 40px;
  }
  .res-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .res-related__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .res-filter__tags {
    gap: 6px;
  }
  .res-filter__tag {
    font-size: .75rem;
    padding: 5px 12px;
  }
  .res-detail {
    padding: 100px 20px 60px;
  }
  .res-detail__form-card {
    padding: 24px 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .res-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .res-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Textarea */
.res-form__textarea {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  line-height: 1.6;
}

/* Form success state */
.res-form__success {
  text-align: center;
  padding: 16px 0;
}
.res-form__success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #10B981;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.res-form__success-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 12px;
}
.res-form__success-text {
  font-size: .85rem;
  color: #6B7280;
  line-height: 1.7;
  margin-bottom: 24px;
}
.res-form__success-link {
  color: #1E3A5F;
  font-weight: 600;
  text-decoration: underline;
}
.res-form__success-cta {
  border-top: 1px solid #E5E7EB;
  padding-top: 24px;
  margin-top: 8px;
}
.res-form__success-cta-text {
  font-size: .8rem;
  color: #6B7280;
  margin-bottom: 12px;
}

/* Form error message */
.res-form__error {
  background: #FEF2F2;
  color: #DC2626;
  font-size: .8rem;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #FECACA;
  animation: fadeIn .3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header active link */
.header__nav-link--active {
  color: #1A1A1A;
}
