/* Public template gallery (/invitation-templates). Pushed by templates/gallery.blade.php. */

/* ── Hero ── */
.tplg-hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-gradient);
  color: var(--white);
  padding: 76px 40px 84px;
  text-align: center;
}
.tplg-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.tplg-hero h1 {
  margin: 0 0 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.tplg-hero h1 span { color: var(--cyan); }
.tplg-hero p {
  margin: 0 auto;
  max-width: 600px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.tplg-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.tplg-hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.tplg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
}

/* ── Content column ── */
.tplg-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px 24px;
}

/* ── Category chips. A bare <nav> would pick up global.css's site-nav rule. ── */
nav.tplg-chips {
  position: relative;
  z-index: 2;
  top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  height: auto;
  margin: -26px auto 0;
  padding: 12px;
  max-width: max-content;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(13, 13, 43, 0.14);
}
.tplg-chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.tplg-chip:hover { background: var(--gray-light); color: var(--accent); }
.tplg-chip.is-active { background: var(--accent); color: var(--white); }
.tplg-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Plan groups ── */
.tplg-group {
  padding-top: 64px;
  scroll-margin-top: 72px;
}
.tplg-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.tplg-group-intro { max-width: 640px; }
.tplg-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
.tplg-group--pro .tplg-kicker { color: var(--pink); }
.tplg-group-head h2 {
  margin: 6px 0 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
}
.tplg-group-head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-mid);
}
.tplg-price {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--gray-light);
  text-align: right;
}
.tplg-group--pro .tplg-price {
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
  color: var(--white);
}
.tplg-price-from,
.tplg-price-per {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-mid);
}
.tplg-group--pro .tplg-price-from,
.tplg-group--pro .tplg-price-per { color: rgba(255, 255, 255, 0.7); }
.tplg-price strong {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.tplg-empty {
  margin: 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--gray-mid);
}
.tplg-empty a { color: var(--accent); font-weight: 600; }

/* ── Cards ── */
.tplg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.tplg-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(13, 13, 43, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tplg-card:hover,
.tplg-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(13, 13, 43, 0.14);
}
.tplg-card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-light);
}
@supports not (aspect-ratio: 1) {
  .tplg-card-media { min-height: 320px; }
}
.tplg-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tplg-card:hover .tplg-card-media img { transform: scale(1.04); }
.tplg-card-media:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.tplg-card-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--tplg-bg, #fafafa) 0%, var(--tplg-bg, #fafafa) 45%, var(--tplg-accent, #e00e4f) 140%);
}
.tplg-card-placeholder::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border: 1px solid var(--tplg-primary, #1e47bb);
  border-radius: 8px;
  opacity: 0.35;
}
.tplg-card-placeholder-name {
  position: relative;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--tplg-primary, #1e47bb);
}

.tplg-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(13, 13, 43, 0.72);
  backdrop-filter: blur(4px);
}
.tplg-badge--pro { background: var(--accent); }
.tplg-badge--pro-plus { background: var(--pink); }
.tplg-badge--enterprise { background: var(--navy); }

.tplg-card-peek {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(13, 13, 43, 0.2);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.tplg-card-media:hover .tplg-card-peek,
.tplg-card-media:focus-visible .tplg-card-peek {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tplg-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 16px 18px;
}
.tplg-card-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}
.tplg-card-cats {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--gray-mid);
}
.tplg-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.tplg-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tplg-btn--ghost {
  border: 1px solid var(--line);
  color: var(--text-dark);
}
.tplg-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.tplg-btn--solid {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
}
.tplg-btn--solid:hover { background: var(--navy); border-color: var(--navy); }
.tplg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Closing band ── */
.tplg-band {
  margin-top: 72px;
  padding: 0 40px 80px;
}
.tplg-band-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 48px;
  border-radius: 20px;
  background: var(--hero-gradient);
  color: var(--white);
}
.tplg-band h2 {
  margin: 0 0 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
}
.tplg-band p {
  margin: 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}
.tplg-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}
.tplg-band-actions a { text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .tplg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .tplg-hero { padding: 56px 20px 68px; }
  .tplg-hero h1 { font-size: 36px; }
  .tplg-hero p { font-size: 16px; }
  .tplg-wrap { padding: 0 20px 16px; }
  nav.tplg-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    scrollbar-width: none;
  }
  nav.tplg-chips::-webkit-scrollbar { display: none; }
  .tplg-chip { flex-shrink: 0; }
  .tplg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .tplg-group { padding-top: 48px; }
  .tplg-group-head { flex-direction: column; align-items: flex-start; }
  .tplg-group-head h2 { font-size: 26px; }
  .tplg-price {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 10px 16px;
  }
  .tplg-price strong { font-size: 22px; }
  .tplg-band { padding: 0 20px 56px; margin-top: 56px; }
  .tplg-band-inner { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
}
@media (max-width: 520px) {
  .tplg-hero h1 { font-size: 30px; }
  .tplg-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none) {
  .tplg-card-peek { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tplg-card,
  .tplg-card-media img,
  .tplg-card-peek { transition: none; }
  .tplg-card:hover,
  .tplg-card:focus-within { transform: none; }
  .tplg-card:hover .tplg-card-media img { transform: none; }
}
