/* Zusa Blocks — frontend + editor stili.
 * Visās CSS klases atbilst esošajam kadence-child theme izskatam.
 * Inline styles, kas bija wp:html blokos, pārcelti šeit (centralizēti).
 */

/* ================================================================
   zusa/eyebrow
   ================================================================ */
.zusa-eyebrow {
    /* CSS klases nemainās — vizuālais izskats no kadence-child theme */
}

/* ================================================================
   zusa/cta-banner — top variants (PROD-identical)
   ================================================================ */
.zusa-top-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f4f1fb;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 28px 0 4px;
}
.zusa-top-cta > div:first-child {
    flex: 1 1 280px;
}
.zusa-top-cta strong {
    display: block;
    font-size: 18px;
    color: #2b2b2b;
    margin-bottom: 4px;
}
.zusa-top-cta span {
    color: #555;
}
.zusa-top-cta__btn {
    flex: 0 0 auto;
    background: #725ca7;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.zusa-top-cta__btn:hover {
    background: #5d4a8c !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(74, 58, 122, .5);
}

/* ================================================================
   zusa/cta-banner — home variants (lielāks, centrēts)
   ================================================================ */
/* !important nepieciešams, lai overrid'o WP `is-layout-constrained > :where(...)` rule.
 * PROD lieto inline style (specificity 1,0,0,0); mēs lietojam !important classē (cleaner). */
.zusa-home-cta {
    max-width: 840px !important;
    margin: 0 auto !important;
    text-align: center;
    background: #f5f2fb;
    border: 1px solid #ece6f7;
    border-radius: 18px;
    padding: clamp(32px, 5vw, 52px) clamp(22px, 4vw, 48px);
}
.zusa-home-cta strong {
    display: block;
    font-size: clamp(22px, 3vw, 30px);
    color: #1b1b1b;
    margin-bottom: 10px;
    line-height: 1.2;
    font-family: var(--zusa-font-heading, inherit);
}
.zusa-home-cta p,
.zusa-home-cta__desc {
    display: block;
    color: #555;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 22px;
}
.zusa-home-cta__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.zusa-home-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #725ca7;
    color: #fff;
    padding: 13px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.zusa-home-cta__btn--secondary {
    background: #fff;
    color: #725ca7;
    border: 1px solid #d8cdf0;
}
.zusa-home-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(74, 58, 122, 0.5);
}
/* Top CTA secondary button (for consistency) */
.zusa-top-cta__btn--secondary {
    background: #fff;
    color: #725ca7;
    border: 1px solid #d8cdf0;
    margin-left: 8px;
}

/* ================================================================
   zusa/video-grid — stili pārmantōoti no kadence-child theme/style.css
   (.zusa-video, .zusa-video-row, .zusa-video__play, .zusa-video__cap)
   ================================================================ */
.zusa-video-band h3 {
    margin-bottom: 6px;
}

/* ================================================================
   zusa/avatar — iniciaļu aplis (Inline styles pārcelti)
   ================================================================ */
.zusa-avatar-initials {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #725ca7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    flex: 0 0 100px;
}

/* ================================================================
   zusa/card-more — "Apskatīt vairāk →" links
   ================================================================ */
.zusa-card-more {
    /* CSS klases nemainās — stili no kadence-child theme */
}

/* ================================================================
   zusa/social-button — Facebook utt.
   Inline styles pārcelti.
   ================================================================ */
.zusa-social-button-wrap {
    margin-top: 12px;
}
.zusa-social-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--zusa-primary, #725ca7);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
}
.zusa-social-button:hover {
    background: #5d4a8c;
    transform: translateY(-1px);
}
.zusa-social-button svg {
    width: 20px;
    height: 20px;
}

/* Editor-only */
.editor-styles-wrapper .zusa-eyebrow:empty::before {
    content: attr(data-empty-placeholder);
    opacity: 0.5;
    font-style: italic;
}

/* ================================================================
   zusa/hero-slider — Sākums lapas auto-play slider
   ================================================================ */
.hero-slider-wrapper {
  position: relative;
  width: calc(100vw - var(--zusa-sidebar-width));
  height: 88vh;
  max-height: 820px;
  margin-left: calc(-50vw + 50% + calc(var(--zusa-sidebar-width) / 2));
  margin-right: calc(-50vw + 50%);
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}
.hero-slide-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 800px; padding: 0 40px;
}
.hero-subtitle {
  color: #fff !important; font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero-title {
  color: #fff !important; font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.15;
  margin-bottom: 1.25rem; text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-description {
  color: #fff !important; font-size: 1.125rem; line-height: 1.7;
  margin-bottom: 2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.hero-btn {
  display: inline-block; padding: 16px 40px;
  background: #725ca7 !important; color: #fff !important;
  text-decoration: none; font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  transition: all 0.3s ease; border: none; border-radius: 6px;
}
.hero-btn:hover { background: #5e4990 !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(114,92,167,0.4); }
/* Slide controls (PROD-identical) — "01" "02" ar progress bar + pause/play */
.slide-controls {
  position: absolute; top: 40px; right: 40px; z-index: 99999;
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.65), 0 0 3px rgba(0,0,0,0.5);
}
.slide-controls button {
  background: transparent; border: none;
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem; font-weight: 400; letter-spacing: 0.15em;
  cursor: pointer; padding: 10px 12px;
  transition: color 0.3s ease;
}
.slide-controls button:hover,
.slide-controls button[aria-current="true"] { color: #fff; }
.slide-controls button:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px;
}
.slide-controls .slide-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 8px 6px;
}
.slide-num { font-size: 0.82rem; letter-spacing: 0.12em; line-height: 1; }
.slide-bar {
  display: block; width: 40px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.35); overflow: hidden;
}
.slide-bar i {
  display: block; height: 100%; width: 0;
  background: #fff; border-radius: 3px;
}
.slide-btn[aria-current="true"] .slide-bar i {
  animation: zusaSlideFill 8s linear forwards;
}
.hero-slider-wrapper.is-paused .slide-btn[aria-current="true"] .slide-bar i {
  animation-play-state: paused;
}
@keyframes zusaSlideFill { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .slide-btn[aria-current="true"] .slide-bar i { animation: none; width: 100%; }
}

/* Pause/Play poga */
.slide-pause {
  font-size: 0 !important; letter-spacing: 0 !important;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
  margin-left: 4px; border-radius: 50%;
}
.slide-pause .pause-icon,
.slide-pause .play-icon { display: block; width: 10px; height: 10px; }
.slide-pause .pause-icon {
  border-left: 2px solid rgba(255,255,255,0.8);
  border-right: 2px solid rgba(255,255,255,0.8);
  width: 8px; height: 10px;
}
.slide-pause .play-icon {
  width: 0; height: 0;
  border-left: 8px solid rgba(255,255,255,0.8);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}
.hero-slider-wrapper:hover .slide-pause,
.slide-pause:focus-visible { opacity: 1; }
.slide-pause:hover { background: rgba(255,255,255,0.15); }

@media (max-width: 1024px) {
  .hero-slider-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: 0;
  }
  .slide-controls { top: 20px; right: 20px; }
  .hero-slide-content { padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-btn { transition: none; }
  .slide-controls button { transition: none; }
}
