/* ==========================================================================
   EASWP Theme — custom.css
   Fallback styles not expressible in theme.json.
   All values use var(--wp--preset--...) or var(--wp--custom--...) tokens.
   ========================================================================== */

/* ---------- Global polish ---------- */

::selection {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--text-on-dark);
}

/* ---------- Section kickers (small uppercase labels above headings) ---------- */

.easwp-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 13px;
  color: var(--wp--preset--color--accent);
  margin-bottom: var(--wp--preset--spacing--sm);
}

.is-style-dark-section .easwp-kicker,
.is-style-navy-gradient .easwp-kicker {
  color: var(--wp--preset--color--accent);
}

/* ---------- Buttons — modern depth ---------- */

.wp-element-button,
.wp-block-button__link {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.wp-element-button:active,
.wp-block-button__link:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Ghost button on dark */
.is-style-ghost .wp-block-button__link {
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.is-style-ghost .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Outline button */
.is-style-outline .wp-block-button__link {
  box-shadow: none;
}

.is-style-outline .wp-block-button__link:hover {
  box-shadow: 0 4px 16px rgba(33, 56, 98, 0.2);
}

/* ---------- Cards — hover elevation & modern feel ---------- */

.is-style-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.is-style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 44, 78, 0.16);
}

/* Card top accent bar */
.easwp-card-accent {
  position: relative;
}

.easwp-card-accent::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
  border-radius: var(--wp--custom--easwp-radius-lg) var(--wp--custom--easwp-radius-lg) 0 0;
}

/* ---------- Trust strip — badge pills ---------- */

.easwp-trust-strip .wp-block-columns {
  gap: var(--wp--preset--spacing--md);
  justify-content: center;
}

.easwp-trust-strip .wp-block-column {
  flex-grow: 0 !important;
  flex-basis: auto !important;
}

.easwp-trust-strip .wp-block-column p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid var(--wp--preset--color--primary-200);
  border-radius: 100px;
  background: var(--wp--preset--color--bg-card);
  font-weight: 600;
  color: var(--wp--preset--color--text-heading);
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.easwp-trust-strip .wp-block-column p:hover {
  border-color: var(--wp--preset--color--primary);
  box-shadow: 0 2px 12px rgba(33, 56, 98, 0.1);
}

/* ---------- Feature grid — icon area + card accents ---------- */

.is-style-feature-grid .is-style-card {
  text-align: center;
  padding: var(--wp--preset--spacing--xl);
  position: relative;
  overflow: hidden;
}

.is-style-feature-grid .is-style-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
}

.is-style-feature-grid .is-style-card h3 {
  margin-top: var(--wp--preset--spacing--md);
}

/* Feature icon circles */
.easwp-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--wp--custom--easwp-radius-xl);
  background: linear-gradient(135deg, var(--wp--preset--color--primary-50), var(--wp--preset--color--primary-100));
  color: var(--wp--preset--color--primary);
  font-size: 24px;
  margin: 0 auto var(--wp--preset--spacing--sm);
}

/* ---------- How it works — step numbers ---------- */

.easwp-steps .wp-block-column {
  text-align: center;
  position: relative;
}

.easwp-steps .wp-block-column h3 {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--sm);
}

.easwp-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--text-on-dark);
  font-weight: 700;
  font-size: 20px;
  margin: 0 auto var(--wp--preset--spacing--md);
  box-shadow: 0 4px 16px rgba(33, 56, 98, 0.2);
}

/* Connector line between steps */
.easwp-steps .wp-block-column:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -16px;
  width: 32px;
  height: 2px;
  background: var(--wp--preset--color--primary-200);
}

@media (max-width: 781px) {
  .easwp-steps .wp-block-column:not(:last-child)::after {
    display: none;
  }
}

/* ---------- Pricing cards — modern treatment ---------- */

.easwp-pricing-grid {
  align-items: stretch;
}

.easwp-pricing-grid > .wp-block-column {
  display: flex;
}

.easwp-pricing-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--md);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.easwp-pricing-card:hover {
  transform: translateY(-4px);
}

.easwp-pricing-card .wp-block-buttons {
  margin-top: auto;
}

/* Featured pricing card (Pro) — elevated & highlighted */
.easwp-pricing-featured {
  position: relative;
  z-index: 1;
  transform: scale(1.04);
  box-shadow: 0 16px 48px rgba(33, 56, 98, 0.2);
}

.easwp-pricing-featured:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 20px 60px rgba(33, 56, 98, 0.25);
}

/* Price amount styling */
.easwp-price {
  font-weight: 800;
  color: var(--wp--preset--color--primary);
  line-height: 1.1;
}

.easwp-pricing-featured .easwp-price {
  color: var(--wp--preset--color--text-on-dark);
}

.easwp-price-period {
  font-size: 14px;
  font-weight: 400;
  color: var(--wp--preset--color--text-muted);
}

.easwp-pricing-featured .easwp-price-period {
  color: rgba(255, 255, 255, 0.7);
}

/* Pricing feature list */
.easwp-pricing-card .wp-block-list {
  list-style: none;
  padding-left: 0;
}

.easwp-pricing-card .wp-block-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 14px;
}

.easwp-pricing-card .wp-block-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--wp--preset--color--success);
  font-weight: 700;
}

.easwp-pricing-featured .wp-block-list li::before {
  color: var(--wp--preset--color--accent);
}

/* "Most Popular" badge */
.easwp-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--text-on-dark);
  margin-bottom: var(--wp--preset--spacing--sm);
}

/* ---------- Comparison table — modern styling ---------- */

.wp-block-table {
  border-radius: var(--wp--custom--easwp-radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(26, 44, 78, 0.08);
}

.wp-block-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.wp-block-table thead th {
  text-align: center;
  padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
}

.wp-block-table thead th:first-child {
  text-align: left;
}

.wp-block-table tbody td {
  padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
  text-align: center;
  border-bottom: 1px solid var(--wp--preset--color--primary-100);
}

.wp-block-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

.wp-block-table tbody tr:last-child td {
  border-bottom: none;
}

.wp-block-table tbody tr {
  transition: background-color 0.15s ease;
}

.wp-block-table tbody tr:hover {
  background: var(--wp--preset--color--primary-50);
}

/* Checkmarks and dashes in table */
.easwp-check {
  color: var(--wp--preset--color--success);
  font-weight: 700;
  font-size: 18px;
}

.easwp-dash {
  color: var(--wp--preset--color--text-muted);
}

/* ---------- FAQ accordion — enhanced ---------- */

.wp-block-details {
  border: 1px solid var(--wp--preset--color--primary-200);
  border-radius: var(--wp--custom--easwp-radius-lg);
  padding: 0;
  background: var(--wp--preset--color--bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-details:hover {
  border-color: var(--wp--preset--color--primary);
  box-shadow: 0 2px 12px rgba(33, 56, 98, 0.08);
}

.wp-block-details + .wp-block-details {
  margin-top: var(--wp--preset--spacing--sm);
}

.wp-block-details summary {
  cursor: pointer;
  color: var(--wp--preset--color--text-heading);
  font-weight: 600;
  padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
  transition: background-color 0.15s ease;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-block-details summary::-webkit-details-marker {
  display: none;
}

.wp-block-details summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--wp--preset--color--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: var(--wp--preset--spacing--md);
}

.wp-block-details[open] summary::after {
  content: "−";
}

.wp-block-details summary:hover {
  background: var(--wp--preset--color--primary-50);
}

.wp-block-details > :not(summary) {
  padding: 0 var(--wp--preset--spacing--lg) var(--wp--preset--spacing--md);
}

/* ---------- Hero depth ---------- */

.easwp-hero {
  position: relative;
  overflow: hidden;
}

.easwp-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 145, 58, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.easwp-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 75, 113, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Section backgrounds — subtle depth ---------- */

.is-style-light-section {
  position: relative;
}

.is-style-dark-section {
  position: relative;
}

.is-style-navy-gradient {
  position: relative;
  overflow: hidden;
}

.is-style-navy-gradient::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 145, 58, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Footer — modern columns ---------- */

.wp-block-group[class*="is-style-dark-section"] footer,
footer.is-style-dark-section {
  position: relative;
}

footer .wp-block-separator {
  opacity: 0.2;
  margin: var(--wp--preset--spacing--xl) 0;
}

footer .wp-block-navigation a {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

footer .wp-block-navigation a:hover {
  opacity: 1;
}

/* ---------- Responsive grid collapse ---------- */

.wp-block-columns.is-style-feature-grid > .wp-block-column,
.wp-block-columns.is-style-pricing-grid > .wp-block-column {
  min-width: 0;
}

@media (max-width: 1024px) {
  .wp-block-columns.is-style-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--lg);
  }
}

@media (max-width: 781px) {
  .wp-block-columns.is-style-feature-grid,
  .wp-block-columns.is-style-pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--md);
  }

  .easwp-pricing-featured {
    transform: none;
    box-shadow: 0 12px 40px rgba(33, 56, 98, 0.2);
  }

  .easwp-pricing-featured:hover {
    transform: translateY(-4px);
  }
}

/* ---------- Scroll reveal ---------- */

.easwp-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.easwp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.easwp-reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.easwp-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.easwp-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.easwp-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.easwp-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }

.easwp-reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .easwp-reveal,
  .easwp-reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .is-style-card,
  .easwp-pricing-card,
  .wp-element-button,
  .wp-block-button__link,
  .wp-block-details {
    transition: none;
  }
}
