/* ==========================================================================
   Template Design Page — Modern, Minimal & Clean (#9E0C17 on White)
   ========================================================================== */

.template-page {
  background: #ffffff;
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   1. Hero Section
   -------------------------------------------------------------------------- */
.template-hero {
  padding: clamp(48px, 6vw, 76px) 0 clamp(40px, 4vw, 56px);
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.template-hero__container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(36px, 5vw, 64px);
}

.template-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 580px;
}

.template-hero__eyebrow-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 14px 6px 10px;
  border-radius: 9999px;
  background: #fff5f5;
  border: 1px solid #fee2e2;
}

.template-hero__sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #9E0C17;
}

.template-hero__sparkle svg {
  width: 15px;
  height: 15px;
}

.template-hero__eyebrow {
  color: #9E0C17;
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.template-hero__title {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.template-hero__title-accent {
  color: #9E0C17;
}

.template-hero__desc {
  margin: 0 0 28px;
  color: #475569;
  font-size: 16px;
  line-height: 1.65;
}

.template-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* Button styles */
.template-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 0 22px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.template-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.template-btn__icon svg {
  width: 18px;
  height: 18px;
}

.template-btn__arrow {
  font-size: 16px;
  transition: transform 180ms ease;
}

.template-btn:hover .template-btn__arrow {
  transform: translateX(3px);
}

.template-btn--primary {
  background: #9E0C17;
  color: #ffffff;
  border: 1.5px solid #9E0C17;
}

.template-btn--primary:hover {
  background: #800a12;
  border-color: #800a12;
  transform: translateY(-2px);
}

.template-btn--secondary {
  background: #ffffff;
  color: #9E0C17;
  border: 1.5px solid #9E0C17;
}

.template-btn--secondary:hover {
  background: #fff5f5;
  transform: translateY(-2px);
}

.template-hero__visual {
  width: 100%;
}

.template-hero__image-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #e8e8e8;
  background: #ffffff;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.06);
}

.template-hero__image-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

/* --------------------------------------------------------------------------
   2. 3 Steps Guide Cards
   -------------------------------------------------------------------------- */
.template-steps {
  padding: clamp(48px, 6vw, 72px) 0;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
}

.template-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.template-step-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  background: #ffffff;
  padding: 26px 24px;
  box-shadow: 0 4px 14px rgb(15 23 42 / 0.02);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.template-step-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.05);
}

.template-step-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.template-step-card__num {
  font-size: 22px;
  font-weight: 850;
  color: #9E0C17;
  letter-spacing: -0.04em;
}

.template-step-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #fee2e2;
  color: #9E0C17;
}

.template-step-card__icon svg {
  width: 20px;
  height: 20px;
}

.template-step-card__title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.template-step-card__desc {
  margin: 0;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Shared Section Intro
   -------------------------------------------------------------------------- */
.template-section-intro {
  max-width: 760px;
  margin: 0 auto clamp(36px, 4vw, 48px);
  text-align: center;
}

.template-section-eyebrow {
  margin: 0 0 12px;
  color: #9E0C17;
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.template-section-title {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(2.1rem, 3.5vw, 3.2rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.template-section-lead {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   3. 6 Style Gallery Cards
   -------------------------------------------------------------------------- */
.template-gallery {
  padding: clamp(56px, 6vw, 88px) 0;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.template-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 28px);
}

.template-style-card {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #e8e8e8;
  border-radius: 22px;
  background: #ffffff;
  padding: clamp(24px, 3vw, 32px);
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.03);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.template-style-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgb(15 23 42 / 0.06);
}

.template-style-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.template-style-card__num {
  font-size: 20px;
  font-weight: 850;
  color: #9E0C17;
  letter-spacing: -0.03em;
}

.template-style-card__tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: #fff5f5;
  border: 1px solid #fee2e2;
  color: #9E0C17;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.template-style-card__title {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.template-style-card__desc {
  margin: 0 0 24px;
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

.template-style-card__footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.template-style-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9E0C17;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.template-style-card__btn-arrow {
  transition: transform 160ms ease;
}

.template-style-card__btn:hover .template-style-card__btn-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .template-hero__container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .template-hero__content {
    max-width: 100%;
  }
  .template-steps__grid,
  .template-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .template-hero {
    padding: 36px 0 40px;
  }
  .template-hero__title {
    font-size: 26px;
  }
  .template-hero__desc {
    font-size: 14.5px;
    margin-bottom: 22px;
  }
  .template-hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .template-btn {
    width: 100%;
  }
  .template-steps__grid,
  .template-gallery__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .template-step-card,
  .template-style-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-btn,
  .template-btn__arrow,
  .template-step-card,
  .template-style-card,
  .template-style-card__btn,
  .template-style-card__btn-arrow {
    transition: none !important;
  }
}
