/* Easy Widget Page Builder — Frontend Styles */

:root {
  --ink: #0A0A0B;
  --bone: #FAFAF7;
  --line: #E7E5E0;
  --accent: #2D54F0;
  --accent-soft: #ECF0FF;
  --success: #10B981;
  --radius-lg: 18px;
  --radius: 10px;
  --mute: #6B6B73;
}

/* Base components used by widgets */
:where(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
}


.btn-accent {
  background: var(--accent);
  color: white;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.section {
  padding: 0;
}

/* Width + side padding are set in Page Builder → Responsive (Core\Layout prints the variables). */
.container-x {
  max-width: var(--ewpb-container, 1730px);
  width: 100%;
  margin: auto;
  padding-inline: var(--ewpb-gutter, 1rem);
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  gap: 1rem;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  opacity: 0;
  color: var(--mute);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-a {
  max-height: 500px;
  opacity: 1;
  margin-top: 4px;
  padding-bottom: 22px;
}

/* Tabs */
.tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mute);
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}

.tab.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* Animations */
[data-elanim] {
  opacity: 0;
  transition: opacity var(--elanim-d, .6s) ease var(--elanim-delay, 0s), transform var(--elanim-d, .6s) ease var(--elanim-delay, 0s);
  will-change: opacity, transform
}

[data-elanim="fade"] {
  transform: none
}

[data-elanim="fade-up"] {
  transform: translateY(28px)
}

[data-elanim="fade-down"] {
  transform: translateY(-28px)
}

[data-elanim="fade-left"] {
  transform: translateX(28px)
}

[data-elanim="fade-right"] {
  transform: translateX(-28px)
}

[data-elanim="zoom-in"] {
  transform: scale(.92)
}

[data-elanim="zoom-out"] {
  transform: scale(1.08)
}

[data-elanim].is-inview {
  opacity: 1;
  transform: none
}

/* Shared widget advanced layer — hover effects */
[class*="ewpb-hover-"] {
  transition: transform .28s ease, box-shadow .28s ease
}

.ewpb-hover-lift:hover {
  transform: translateY(-6px)
}

.ewpb-hover-zoom:hover {
  transform: scale(1.03)
}

.ewpb-hover-shadow:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, .14)
}

.ewpb-hover-lift-shadow:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .16)
}

/* Device visibility helpers (.ewpb-hide-d/t/m) are printed inline by Core\Breakpoints::device_css()
   so they follow the breakpoints set in Page Builder → Responsive. */

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
}
/* Section width "Narrow": the same wrapper capped to a comfortable reading width. */
.container-x.container-x--narrow {
  max-width: min(var(--ewpb-narrow, 960px), var(--ewpb-container, 1730px));
}

/* Section column grid. The renderer prints Tailwind-style classes (grid, lg:grid-cols-N,
   lg:col-span-N); define them here, scoped to .pbgrid, so multi-column sections lay out
   on any theme, not only ones that ship Tailwind. Columns stack on tablet and mobile. */
.pbgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.pbgrid.items-start { align-items: start; }
.pbgrid > * { min-width: 0; }
/* The desktop column rules (lg:grid-cols-N / lg:col-span-N) come from Core\Breakpoints::device_css(). */
}

/* Plugin page templates (Page → Template: Page Builder Canvas / Full Width / Boxed). */
.ewpb-page { display: block; width: 100%; }
.ewpb-template--canvas { margin: 0; }
.ewpb-page--boxed { padding-bottom: clamp(32px, 5vw, 72px); }
.ewpb-page__header { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(16px, 3vw, 32px); }
.ewpb-page__title { margin: 0; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.15; }
/* Sections inside the boxed wrapper must not double the container padding. */
.ewpb-page__content .container-x { padding-inline: 0; }
