﻿/* GWM Cards */
.gwm-card {
    background: #fff;
    border: 1px solid var(--gwm-color-border);
    border-radius: var(--gwm-radius-md);
    box-shadow: var(--gwm-shadow-sm);
    padding: 24px;
}

.gwm-card-title {
    margin-top: 0;
}

.gwm-card-meta {
    color: var(--gwm-color-muted);
    font-size: 0.92rem;
}
/* === GWM ANGULAR CARD TILT START ===
   Purpose:
   - Applies premium angular tilt to actual rendered template cards.
   - Targets .gwm-card and .gwm-cpt-card, confirmed from template parts.
   - Mobile resets tilt for cleaner stacked layout.
   ============================================================ */

.gwm-card {
  position: relative;
  transform: rotate(-1deg);
  transform-origin: center;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
  will-change: transform;
}

.gwm-card:nth-child(even) {
  transform: rotate(1deg);
}

.gwm-card:hover,
.gwm-card:focus-within {
  transform: rotate(0deg) translateY(-6px);
  border-color: rgba(200, 162, 74, 0.38);
  box-shadow:
    0 28px 72px rgba(15, 23, 42, 0.14),
    0 10px 24px rgba(200, 162, 74, 0.12);
}

.gwm-cpt-card {
  transform: rotate(-0.75deg);
}

.gwm-cpt-card:nth-child(even) {
  transform: rotate(0.75deg);
}

/* Keep generated page cards covered too, in case Phase content output uses them */
.gwm-generated-content-block .gwm-page-card {
  position: relative;
  transform: rotate(-1deg);
  transform-origin: center;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
  will-change: transform;
}

.gwm-generated-content-block .gwm-page-card:nth-child(even) {
  transform: rotate(1deg);
}

.gwm-generated-content-block .gwm-page-card:hover,
.gwm-generated-content-block .gwm-page-card:focus-within {
  transform: rotate(0deg) translateY(-6px);
  border-color: rgba(200, 162, 74, 0.38);
  box-shadow:
    0 28px 72px rgba(15, 23, 42, 0.14),
    0 10px 24px rgba(200, 162, 74, 0.12);
}

@media (max-width: 767px) {
  .gwm-card,
  .gwm-card:nth-child(even),
  .gwm-cpt-card,
  .gwm-cpt-card:nth-child(even),
  .gwm-generated-content-block .gwm-page-card,
  .gwm-generated-content-block .gwm-page-card:nth-child(even) {
    transform: none;
  }

  .gwm-card:hover,
  .gwm-card:focus-within,
  .gwm-cpt-card:hover,
  .gwm-cpt-card:focus-within,
  .gwm-generated-content-block .gwm-page-card:hover,
  .gwm-generated-content-block .gwm-page-card:focus-within {
    transform: translateY(-3px);
  }
}

/* === GWM ANGULAR CARD TILT END === */

/* GWM PHASE 79B CARD POLISH OVERRIDE START */

:root {
  --gwm-card-polish-radius: 2px;
  --gwm-card-polish-border: rgba(15, 23, 42, 0.09);
  --gwm-card-polish-shadow: 0 16px 38px rgba(15, 23, 42, 0.075);
  --gwm-card-polish-shadow-hover: 0 26px 64px rgba(15, 23, 42, 0.14);
  --gwm-card-polish-green: #0f3d2e;
  --gwm-card-polish-gold: #a97812;
}

.gwm-generated-content-block {
  width: min(100% - 32px, 1180px);
  margin: clamp(34px, 5vw, 76px) auto;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--gwm-card-polish-radius) !important;
  background: radial-gradient(circle at top left, rgba(169, 120, 18, 0.12), transparent 34%), linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  color: #13231d;
}

.gwm-generated-content-block__inner { max-width: 1120px; margin: 0 auto; }
.gwm-generated-content-block__kicker { margin: 0 0 12px; color: var(--gwm-card-polish-gold); font-size: .78rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.gwm-generated-content-block h2 { margin: 0; color: #09271c; font-size: clamp(1.9rem, 3vw, 3.35rem); line-height: 1.06; letter-spacing: -.045em; }
.gwm-generated-content-block__lead { max-width: 760px; margin: 18px 0 0; color: #475569; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.75; }

.gwm-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(28px, 4vw, 44px);
  align-items: stretch;
}

.gwm-page-card,
.gwm-generated-content-block .gwm-page-card,
.gwm-card,
.gwm-cpt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--gwm-card-polish-border) !important;
  border-radius: var(--gwm-card-polish-radius) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,250,240,.94)), radial-gradient(circle at top right, rgba(169,120,18,.13), transparent 36%);
  box-shadow: var(--gwm-card-polish-shadow);
  color: #13231d;
  overflow: hidden;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateY(0);
  transform-origin: center;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
  will-change: transform;
}

.gwm-page-card::before,
.gwm-generated-content-block .gwm-page-card::before,
.gwm-card::before,
.gwm-cpt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(169,120,18,.10), transparent 34%), linear-gradient(315deg, rgba(15,61,46,.055), transparent 36%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.gwm-page-card:hover,
.gwm-page-card:focus-within,
.gwm-generated-content-block .gwm-page-card:hover,
.gwm-generated-content-block .gwm-page-card:focus-within,
.gwm-card:hover,
.gwm-card:focus-within,
.gwm-cpt-card:hover,
.gwm-cpt-card:focus-within {
  border-color: rgba(169, 120, 18, 0.36) !important;
  box-shadow: var(--gwm-card-polish-shadow-hover);
  transform: perspective(900px) rotateX(1.35deg) rotateY(-1.35deg) translateY(-6px);
}

.gwm-page-card:hover::before,
.gwm-page-card:focus-within::before,
.gwm-generated-content-block .gwm-page-card:hover::before,
.gwm-generated-content-block .gwm-page-card:focus-within::before,
.gwm-card:hover::before,
.gwm-card:focus-within::before,
.gwm-cpt-card:hover::before,
.gwm-cpt-card:focus-within::before { opacity: 1; }

.gwm-page-card h3,
.gwm-generated-content-block .gwm-page-card h3,
.gwm-card h3,
.gwm-cpt-card h3 { position: relative; z-index: 1; margin: 0; color: #09271c; font-size: clamp(1.05rem, 1.4vw, 1.28rem); line-height: 1.25; }

.gwm-page-card p,
.gwm-generated-content-block .gwm-page-card p,
.gwm-card p,
.gwm-cpt-card p { position: relative; z-index: 1; margin: 12px 0 0; color: #475569; font-size: .98rem; line-height: 1.72; }

.gwm-page-card a,
.gwm-generated-content-block .gwm-page-card a,
.gwm-card a,
.gwm-cpt-card a { position: relative; z-index: 1; display: inline-flex; align-items: center; width: fit-content; margin-top: auto; padding-top: 18px; color: var(--gwm-card-polish-gold); font-weight: 850; text-decoration: none; }

.gwm-page-card a:hover,
.gwm-page-card a:focus,
.gwm-generated-content-block .gwm-page-card a:hover,
.gwm-generated-content-block .gwm-page-card a:focus,
.gwm-card a:hover,
.gwm-card a:focus,
.gwm-cpt-card a:hover,
.gwm-cpt-card a:focus { color: var(--gwm-card-polish-green); text-decoration: underline; text-underline-offset: 4px; }

.gwm-page-cta,
.gwm-generated-content-block .gwm-page-cta {
  margin-top: clamp(28px, 4vw, 46px);
  padding: clamp(24px, 3.5vw, 42px);
  border-radius: var(--gwm-card-polish-radius) !important;
  background: radial-gradient(circle at top right, rgba(217,164,65,.20), transparent 34%), linear-gradient(135deg, #13231d 0%, #07140f 100%);
  color: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.gwm-page-cta h3,
.gwm-generated-content-block .gwm-page-cta h3 { margin: 0; color: #ffffff; font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.18; }

.gwm-page-cta p,
.gwm-generated-content-block .gwm-page-cta p { max-width: 760px; margin: 12px 0 0; color: rgba(255,255,255,.80); line-height: 1.72; }

.gwm-page-cta a,
.gwm-generated-content-block .gwm-page-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 12px 18px;
  border: 1px solid rgba(251,191,36,.68);
  border-radius: var(--gwm-card-polish-radius) !important;
  background: #fbbf24;
  color: #111827;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(251,191,36,.20);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.gwm-page-cta a:hover,
.gwm-page-cta a:focus,
.gwm-generated-content-block .gwm-page-cta a:hover,
.gwm-generated-content-block .gwm-page-cta a:focus { background: #f59e0b; color: #111827; transform: translateY(-2px); box-shadow: 0 20px 46px rgba(251,191,36,.28); }

@media (prefers-reduced-motion: reduce) {
  .gwm-page-card,
  .gwm-generated-content-block .gwm-page-card,
  .gwm-card,
  .gwm-cpt-card,
  .gwm-page-cta a,
  .gwm-generated-content-block .gwm-page-cta a {
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 980px) {
  .gwm-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gwm-generated-content-block { width: min(100% - 24px, 1180px); }
}

@media (max-width: 640px) {
  .gwm-page-grid { grid-template-columns: 1fr; }
  .gwm-generated-content-block { padding: 24px 18px; }
  .gwm-page-card,
  .gwm-generated-content-block .gwm-page-card,
  .gwm-card,
  .gwm-cpt-card { transform: none; }

  .gwm-page-card:hover,
  .gwm-page-card:focus-within,
  .gwm-generated-content-block .gwm-page-card:hover,
  .gwm-generated-content-block .gwm-page-card:focus-within,
  .gwm-card:hover,
  .gwm-card:focus-within,
  .gwm-cpt-card:hover,
  .gwm-cpt-card:focus-within { transform: translateY(-4px); }
}

/* GWM PHASE 79B CARD POLISH OVERRIDE END */

