/* =========================================================
   ResumeGrow — Resume Templates page (rg-rt-)
   ========================================================= */
:root {
  --rg-rt-blue: var(--rg-primary, #4D7CFE);
  --rg-rt-blue-dark: #3A63D9;
  --rg-rt-navy: var(--rg-text, #1A2B4C);
  --rg-rt-muted: #5A6B85;
  --rg-rt-bg-soft: #EAF1FF;
  --rg-rt-bg-softer: #F5F8FF;
  --rg-rt-border: #E3E9F4;
  --rg-rt-star: #F5B400;
  --rg-rt-radius: 14px;
  --rg-rt-shadow: 0 10px 30px rgba(26,43,76,.08);
}

.rg-rt-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rg-rt-container--narrow { max-width: 860px; }

/* Buttons */
.rg-rt-btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  line-height: 1;
}
.rg-rt-btn--primary { background: var(--rg-rt-blue); color: #fff; box-shadow: 0 8px 20px rgba(77,124,254,.3); }
.rg-rt-btn--primary:hover { background: var(--rg-rt-blue-dark); transform: translateY(-1px); }
.rg-rt-btn--outline { background: #fff; color: var(--rg-rt-blue); border-color: var(--rg-rt-blue); }
.rg-rt-btn--outline:hover { background: var(--rg-rt-bg-soft); }
.rg-rt-btn--lg { padding: 16px 36px; font-size: 16px; }

/* Section heads */
.rg-rt-section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.rg-rt-h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 14px; font-weight: 800; }
.rg-rt-h2 span { display: inline; }
.rg-rt-h2 .rg-rt-dark { color: var(--rg-rt-navy); }
.rg-rt-h2 .rg-rt-accent { color: var(--rg-rt-blue); }
.rg-rt-h2 .rg-rt-dark + .rg-rt-accent { margin-left: .35em; }
.rg-rt-section-sub { font-size: 16px; color: var(--rg-rt-muted); margin: 0; }

/* ═════ HERO ═════ */
.rg-rt-hero {
  background: linear-gradient(180deg, #fff 0%, var(--rg-rt-bg-softer) 100%);
  padding: 80px 0 100px;
}
.rg-rt-hero__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.rg-rt-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .12em;
  font-size: 12px; font-weight: 700; color: var(--rg-rt-blue); margin-bottom: 18px;
}
.rg-rt-hero__title {
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.1; font-weight: 800; margin: 0 0 20px;
}
.rg-rt-hero__title .rg-rt-accent { color: var(--rg-rt-blue); display: inline; }
.rg-rt-hero__title .rg-rt-dark   { color: var(--rg-rt-navy); display: inline; margin-left: .25em; }
.rg-rt-hero__sub { color: var(--rg-rt-muted); font-size: 17px; line-height: 1.6; margin: 0 0 28px; max-width: 540px; }
.rg-rt-hero__logos-label { margin: 36px 0 14px; font-size: 13px; color: var(--rg-rt-muted); }
.rg-rt-hero__logos { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: center; }
.rg-rt-logo { height: 28px; display: flex; align-items: center; opacity: .55; filter: grayscale(1); transition: opacity .2s; }
.rg-rt-logo:hover { opacity: .9; }
.rg-rt-logo img { max-height: 28px; width: auto; }
.rg-rt-logo__placeholder { font-weight: 700; color: #94A3B8; font-size: 15px; letter-spacing: .02em; }

.rg-rt-hero__right { position: relative; min-height: 460px; }
.rg-rt-hero__panel {
  position: relative; background: var(--rg-rt-bg-soft); border-radius: 28px;
  padding: 40px; min-height: 460px;
}
.rg-rt-hero__mock {
  position: absolute; width: 220px; aspect-ratio: 3/4; background: #fff;
  border-radius: 12px; box-shadow: var(--rg-rt-shadow); overflow: hidden;
}
.rg-rt-hero__mock img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rg-rt-hero__mock--back  { top: 40px;  left: 60px;  transform: rotate(-8deg); width: 200px; opacity: .9; }
.rg-rt-hero__mock--mid   { top: 70px;  left: 50%;   transform: translateX(-50%) rotate(2deg); width: 230px; z-index: 2; }
.rg-rt-hero__mock--front { bottom: 40px; right: 50px; transform: rotate(6deg); width: 210px; z-index: 3; }

/* ═════ TEMPLATES ═════ */
.rg-rt-templates { padding: 90px 0; background: #fff; }
.rg-rt-carousel { position: relative; }
.rg-rt-carousel__viewport { overflow: hidden; padding: 8px 4px 24px; }
.rg-rt-carousel__track {
  display: flex; gap: 24px; list-style: none; margin: 0; padding: 0;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.rg-rt-card {
  flex: 0 0 calc((100% - 48px) / 3); background: #fff; border: 1px solid var(--rg-rt-border);
  border-radius: var(--rg-rt-radius); padding: 16px; transition: transform .2s, box-shadow .2s;
}
.rg-rt-card:hover { transform: translateY(-4px); box-shadow: var(--rg-rt-shadow); }
.rg-rt-card__media {
  position: relative; display: block; width: 100%; aspect-ratio: 3/4;
  background: var(--rg-rt-bg-softer); border: 1px solid var(--rg-rt-border);
  border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0;
}
.rg-rt-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rg-rt-card__placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #94A3B8; font-weight: 600;
}
.rg-rt-card__zoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  display: grid; place-items: center; background: rgba(255,255,255,.92);
  border-radius: 50%; color: var(--rg-rt-blue); box-shadow: 0 4px 10px rgba(0,0,0,.08);
  opacity: 0; transition: opacity .2s;
}
.rg-rt-card__media:hover .rg-rt-card__zoom { opacity: 1; }
.rg-rt-card__title { margin: 14px 4px 4px; font-size: 16px; font-weight: 700; color: var(--rg-rt-navy); text-align: center; }

.rg-rt-nav {
  position: absolute; top: 38%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rg-rt-border);
  background: #fff; color: var(--rg-rt-navy); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--rg-rt-shadow); z-index: 4;
  transition: background .15s, color .15s;
}
.rg-rt-nav:hover { background: var(--rg-rt-blue); color: #fff; border-color: var(--rg-rt-blue); }
.rg-rt-nav--prev { left: -22px; }
.rg-rt-nav--next { right: -22px; }
.rg-rt-nav[disabled] { opacity: .4; cursor: not-allowed; }

.rg-rt-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.rg-rt-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
  background: #CBD6EA; cursor: pointer; transition: background .15s, width .15s;
}
.rg-rt-dots button[aria-current="true"] { background: var(--rg-rt-blue); width: 22px; border-radius: 4px; }

.rg-rt-templates__cta { text-align: center; margin-top: 32px; }

/* Modal */
.rg-rt-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; }
.rg-rt-modal[hidden] { display: none; }
.rg-rt-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.7); backdrop-filter: blur(4px); }
.rg-rt-modal__panel {
  position: relative; background: #fff; border-radius: 18px; max-width: 880px; width: 100%;
  max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.2fr 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.rg-rt-modal__panel--full { grid-template-columns: 1fr; max-width: 720px; }
.rg-rt-modal__close {
  position: absolute; top: 12px; right: 14px; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.06); font-size: 22px;
  cursor: pointer; line-height: 1; color: var(--rg-rt-navy); z-index: 2;
}
.rg-rt-modal__close:hover { background: rgba(0,0,0,.12); }
.rg-rt-modal__media { background: var(--rg-rt-bg-softer); display: grid; place-items: center; min-height: 360px; padding: 16px; }
.rg-rt-modal__media img { max-width: 100%; max-height: 88vh; width: auto; height: auto; display: block; }
.rg-rt-modal__panel--full .rg-rt-modal__media { min-height: 0; padding: 24px; }
.rg-rt-modal__panel--full .rg-rt-modal__media img { max-height: 86vh; }
.rg-rt-modal__body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.rg-rt-modal__title { margin: 0; font-size: 22px; color: var(--rg-rt-navy); }
.rg-rt-modal__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rg-rt-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═════ STEPS ═════ */
.rg-rt-steps { background: var(--rg-rt-bg-soft); padding: 90px 0; }
.rg-rt-steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.rg-rt-step { background: #fff; border-radius: var(--rg-rt-radius); padding: 32px 28px; text-align: center; box-shadow: 0 4px 14px rgba(26,43,76,.05); }
.rg-rt-step__media {
  width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 24px;
  background: var(--rg-rt-bg-soft); display: grid; place-items: center; overflow: hidden;
}
.rg-rt-step__media img { width: 100%; height: 100%; object-fit: cover; }
.rg-rt-step__num { font-size: 48px; font-weight: 800; color: var(--rg-rt-blue); }
.rg-rt-step__title { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--rg-rt-navy); }
.rg-rt-step__desc { margin: 0; color: var(--rg-rt-muted); font-size: 15px; line-height: 1.6; }
.rg-rt-steps__cta { text-align: center; margin-top: 48px; }

/* ═════ COMMUNITY ═════ */
.rg-rt-community { background: var(--rg-rt-bg-soft); padding: 90px 0; }
.rg-rt-community .rg-rt-card__media { display: none; }
.rg-rt-testimonial {
  flex: 0 0 calc((100% - 48px) / 3);
  background: #fff; border-radius: var(--rg-rt-radius); padding: 28px;
  box-shadow: 0 4px 14px rgba(26,43,76,.06); display: flex; flex-direction: column; gap: 16px;
}
.rg-rt-stars { display: flex; gap: 2px; }
.rg-rt-testimonial__quote { color: var(--rg-rt-navy); font-size: 15px; line-height: 1.65; margin: 0; flex: 1; }
.rg-rt-testimonial__footer { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.rg-rt-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--rg-rt-blue); color: #fff; display: grid; place-items: center; font-weight: 700;
  flex-shrink: 0;
}
.rg-rt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rg-rt-testimonial__meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.rg-rt-testimonial__name { color: var(--rg-rt-navy); font-size: 15px; }
.rg-rt-testimonial__title { color: var(--rg-rt-muted); font-size: 13px; }

/* ═════ FAQ ═════ */
.rg-rt-faq { padding: 90px 0; background: #fff; }
.rg-rt-faq__list { list-style: none; margin: 0; padding: 0; }
.rg-rt-faq__item { border-bottom: 1px solid var(--rg-rt-border); }
.rg-rt-faq__item:first-child { border-top: 1px solid var(--rg-rt-border); }
.rg-rt-faq__item details summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px; cursor: pointer; list-style: none; font-weight: 600;
  color: var(--rg-rt-navy); font-size: 16px;
}
.rg-rt-faq__item details summary::-webkit-details-marker { display: none; }
.rg-rt-faq__icon { color: var(--rg-rt-blue); transition: transform .2s; flex-shrink: 0; }
.rg-rt-faq__item details[open] .rg-rt-faq__icon { transform: rotate(180deg); }
.rg-rt-faq__a { padding: 0 4px 22px; color: var(--rg-rt-muted); line-height: 1.65; font-size: 15px; }

/* ═════ CTA BANNER ═════ */
.rg-rt-cta {
  background: linear-gradient(135deg, #1A2B4C 0%, #2A4685 60%, #3A63D9 100%);
  padding: 90px 0; text-align: center; color: #fff;
}
.rg-rt-cta__title { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.15; margin: 0 0 18px; color: #fff; }
.rg-rt-cta__sub { color: rgba(255,255,255,.75); font-size: 17px; margin: 0 auto 32px; max-width: 560px; }

/* Scroll to top */
.rg-rt-scroll-top {
  position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: var(--rg-rt-blue); color: #fff;
  display: grid; place-items: center; cursor: pointer; z-index: 999;
  box-shadow: 0 8px 20px rgba(77,124,254,.4); transition: transform .2s, opacity .2s;
}
.rg-rt-scroll-top:hover { transform: translateY(-3px); }
.rg-rt-scroll-top[hidden] { display: none; }

/* ═════ RESPONSIVE ═════ */
@media (max-width: 960px) {
  .rg-rt-hero { padding: 60px 0 70px; }
  .rg-rt-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .rg-rt-hero__right { min-height: 380px; }
  .rg-rt-card { flex-basis: calc((100% - 24px) / 2); }
  .rg-rt-testimonial { flex-basis: calc((100% - 24px) / 2); }
  .rg-rt-steps__grid { grid-template-columns: 1fr; }
  .rg-rt-modal__panel { grid-template-columns: 1fr; }
  .rg-rt-nav--prev { left: 4px; }
  .rg-rt-nav--next { right: 4px; }
}
@media (max-width: 600px) {
  .rg-rt-templates, .rg-rt-steps, .rg-rt-community, .rg-rt-faq, .rg-rt-cta { padding: 64px 0; }
  .rg-rt-card, .rg-rt-testimonial { flex-basis: 100%; }
  .rg-rt-hero__panel { padding: 24px; min-height: 380px; }
  .rg-rt-hero__mock { width: 150px; }
  .rg-rt-hero__mock--back  { width: 140px; left: 20px; }
  .rg-rt-hero__mock--mid   { width: 160px; }
  .rg-rt-hero__mock--front { width: 150px; right: 20px; }
  .rg-rt-hero__logos { gap: 18px 24px; }
}
