/**
 * Theme Name: ATR Starter FSE
 * Theme URI: https://atarimtr.co.il/atr-starter-fse/
 * Description: Custom standalone FSE block theme for event-blink.com mini sites.
 * Author: Yehuda Tiram
 * Author URI: https://atarimtr.com/
 * Version: 1.0.20
 * Text Domain: atr-starter-fse
 * Requires at least: 6.4
 * Tested up to: 6.7
 * Requires PHP: 7.4
 *
 * @format
 */

/* ==========================================================================
   Header S4
   ========================================================================== */

.atr-fse-header-s4 {
  margin: 0;
  padding: 0;
}

.atr-fse-header-s4__topbar {
  margin: 0;
  padding: 8px 24px;
}

.atr-fse-header-s4__navbar {
  margin: 0;
  padding: 16px 24px;
}

/* Navigation links — hover indication */
.wp-block-navigation .wp-block-navigation-item {
  transition: color 0.2s ease;
}

.wp-block-navigation
  .wp-block-navigation-item:hover
  > .wp-block-navigation-item__content,
.wp-block-navigation
  .wp-block-navigation-item:focus-within
  > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--ti-accent) !important;
}

/* Navigation links — current page indication */
.wp-block-navigation
  .wp-block-navigation-item.current-menu-item
  > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--ti-accent) !important;
  border-bottom: 2px solid var(--wp--preset--color--ti-accent);
  padding-bottom: 4px;
}

/* Fix WP core submenu alignment (core RTL stylesheet doesn't flip these) */
.wp-block-navigation .has-child .wp-block-navigation__submenu-container {
  right: 0 !important;
  left: auto !important;
}
.wp-block-navigation .wp-block-navigation-item:hover {
  color: var(--wp--preset--color--ti-accent) !important;
  background-color: rgb(70 184 235 / 24%);
}

/* ==========================================================================
   Footer S4
   ========================================================================== */

.atr-fse-footer-s4 {
  margin: 0;
  padding: 0;
}

.atr-fse-footer-s4 a.custom-logo-link {
  background: #f0f8ff;
}

.atr-fse-footer-s4__main {
  margin: 0;
  padding: 64px 24px;
}

.atr-fse-footer-s4__columns {
  gap: 40px;
}

.atr-fse-footer-s4__col-logo {
  flex-basis: 22%;
}

.atr-fse-footer-s4__col-services,
.atr-fse-footer-s4__col-company,
.atr-fse-footer-s4__col-legals,
.atr-fse-footer-s4__col-form {
  padding-top: 8px;
}

.atr-fse-footer-s4__col-services {
  flex-basis: 20%;
}

.atr-fse-footer-s4__col-company {
  flex-basis: 18%;
}

.atr-fse-footer-s4__col-legals {
  flex-basis: 15%;
}

.atr-fse-footer-s4__col-form {
  flex-basis: 25%;
}

.atr-fse-footer-s4__contact {
  margin-top: 24px;
}

.atr-fse-footer-s4__contact > .wp-block-group {
  gap: 12px;
}

.atr-fse-footer-s4__icon {
  flex-shrink: 0;
  color: var(--wp--preset--color--ti-fg-alt);
}

.atr-fse-footer-s4 .wp-block-navigation a:where(:not(.wp-element-button)) {
  padding-top: 2px;
  padding-left: 0;
  padding-bottom: 2px;
  padding-right: 0;
  text-decoration: none;
}

.atr-fse-footer-s4__heading {
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.atr-fse-footer-s4__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atr-fse-footer-s4__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.atr-fse-footer-s4__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.atr-fse-footer-s4__submit {
  margin-top: 0;
}

.atr-fse-footer-s4__submit-btn .wp-block-button__link {
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.atr-fse-footer-s4__bottom {
  margin: 0;
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.atr-fse-footer-s4__bottom-address {
  margin-top: 4px;
}

/* Floating action buttons */
.atr-fse-footer-s4__fab-whatsapp {
  position: fixed;
  bottom: 96px;
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: var(--wp--preset--color--ti-fg-alt);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.atr-fse-footer-s4__fab-whatsapp:hover {
  transform: scale(1.1);
  color: var(--wp--preset--color--ti-fg-alt);
}

.atr-fse-footer-s4__fab-email {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wp--preset--color--ti-accent-secondary);
  color: var(--wp--preset--color--ti-fg-alt);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.atr-fse-footer-s4__fab-email:hover {
  transform: scale(1.1);
  color: var(--wp--preset--color--ti-fg-alt);
}

.atr-fse-footer-s4__fab-top {
  position: fixed;
  bottom: 32px;
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--wp--preset--color--ti-bg-inv);
  color: var(--wp--preset--color--ti-fg-alt);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.atr-fse-footer-s4__fab-top:hover {
  transform: translateY(-2px);
  color: var(--wp--preset--color--ti-fg-alt);
}

/* Post excerpt — "read more" link alignment */
.wp-block-post-excerpt__more-text {
  text-align: left;
}

/* ==========================================================================
   News & Blog Section (Splide carousel)
   ========================================================================== */

/* Card */
.atr-fse-news-section__card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(
    --wp--preset--shadow--sm,
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.08)
  );
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
  background: var(--wp--preset--color--ti-bg);
}

.atr-fse-news-section__card:hover {
  box-shadow: var(
    --wp--preset--shadow--md,
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06)
  );
  transform: translateY(-2px);
}

.atr-fse-news-section__img .wp-block-post-featured-image {
  margin: 0;
  line-height: 0;
}

.atr-fse-news-section__img .wp-block-post-featured-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.atr-fse-news-section__meta {
  border-top: 1px solid var(--wp--preset--color--ti-bg-alt);
  padding-top: 8px;
  margin-top: 4px;
  color: #888;
}

/* Carousel layout — push track inward so arrows sit outside the slides */
.atr-fse-news-carousel {
  position: relative;
  padding-bottom: 48px; /* room for pagination dots */
}

.atr-fse-news-carousel .splide__track {
  margin: 0 52px; /* shrink the track; arrows live in the gap */
}

/* Carousel arrows — pinned to the outer edges of the root */
.atr-fse-news-carousel .splide__arrow {
  background: var(--wp--preset--color--ti-accent);
  opacity: 1;
  width: 36px;
  height: 36px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.atr-fse-news-carousel .splide__arrow--prev {
  right: 0;
  left: auto;
}

.atr-fse-news-carousel .splide__arrow--next {
  left: 0;
  right: auto;
}

.atr-fse-news-carousel .splide__arrow svg {
  fill: var(--wp--preset--color--ti-fg-alt);
  width: 16px;
  height: 16px;
}

.atr-fse-news-carousel .splide__arrow:hover {
  background: var(--wp--preset--color--ti-bg-inv);
}

/* Carousel pagination dots */
.atr-fse-news-carousel .splide__pagination {
  bottom: 0;
}

.atr-fse-news-carousel .splide__pagination__page {
  background: var(--wp--preset--color--ti-bg-alt);
  opacity: 1;
}

.atr-fse-news-carousel .splide__pagination__page.is-active {
  background: var(--wp--preset--color--ti-accent);
  transform: scale(1.2);
}

/* On narrow screens reduce the arrow gap */
@media (max-width: 600px) {
  .atr-fse-news-carousel .splide__track {
    margin: 0 40px;
  }
}

/* ==========================================================================
   Page Tagline (Block Bindings: core/post-meta → "page_tagline")
   ========================================================================== */

.atr-fse-page-tagline {
  color: var(--wp--preset--color--ti-fg);
  opacity: 0.7;
  line-height: 1.4;
}

.atr-fse-page-tagline:empty {
  display: none;
}

/* ==========================================================================
   Ask for a Demo — Modal Pattern
   ========================================================================== */

/* Scroll lock while modal is open */
body.atr-fse-scroll-lock {
  overflow: hidden;
}

/* Trigger button */
.atr-fse-demo-modal__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: var(--wp--preset--color--ti-btn-bg);
  color: var(--wp--preset--color--ti-btn-fg);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.atr-fse-demo-modal__trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.atr-fse-demo-modal__trigger svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Dialog */
.atr-fse-demo-modal__dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 520px;
  width: 90vw;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  background: var(--wp--preset--color--ti-bg);
}

.atr-fse-demo-modal__dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* Dialog header */
.atr-fse-demo-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--wp--preset--color--ti-bg-alt);
}

.atr-fse-demo-modal__header h3 {
  margin: 0;
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 600;
  color: var(--wp--preset--color--ti-fg);
}

/* Close button */
.atr-fse-demo-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--wp--preset--color--ti-fg);
  opacity: 0.6;
  padding: 4px 8px;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.atr-fse-demo-modal__close:hover {
  opacity: 1;
}

/* Dialog body */
.atr-fse-demo-modal__body {
  padding: 24px;
}

/* Responsive — full width on mobile */
@media (max-width: 600px) {
  .atr-fse-demo-modal__dialog {
    width: calc(100vw - 32px);
    max-width: none;
  }
}

/* ==========================================================================
   Hero Full Viewport with Trust Badges
   ========================================================================== */

.atr-fse-hero-fullvh__content {
  text-align: center;
  animation: atr-fse-fadeup 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

@keyframes atr-fse-fadeup {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.atr-fse-hero-fullvh__eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wp--preset--color--ti-accent-secondary);
  border: 1px solid rgba(91, 197, 242, 0.45);
  border-radius: 2px;
  padding: 6px 18px;
  margin-bottom: 20px;
}

.atr-fse-hero-fullvh__accent {
  color: var(--wp--preset--color--ti-accent-secondary);
}

.atr-fse-hero-fullvh__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  animation: atr-fse-fadeup 1s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

.atr-fse-hero-fullvh__trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.atr-fse-hero-fullvh__trust-item svg {
  stroke: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.atr-fse-hero-fullvh__trust-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .atr-fse-hero-fullvh__trust {
    flex-direction: column;
    gap: 16px;
  }
  .atr-fse-hero-fullvh__trust-divider {
    display: none;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.atr-fse-skip-link {
  position: absolute;
  top: -100%;
  right: 50%;
  transform: translateX(50%);
  z-index: 999;
  padding: 8px 24px;
  background: var(--wp--preset--color--ti-accent);
  color: var(--wp--preset--color--ti-fg-alt);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.atr-fse-skip-link:focus {
  top: 0;
  outline: 2px solid var(--wp--preset--color--ti-accent);
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--wp--preset--color--ti-accent);
  outline-offset: 2px;
}

#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

/* ==========================================================================
   Header Core Search Block Button Fix
   ========================================================================== */
.atr-fse-header-s4 button.wp-block-search__button.has-icon.wp-element-button {
  padding: 0;
}

/* ==========================================================================
   Accessibility Toolbar (Pojo A11y)
   ========================================================================== */
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}
#pojo-a11y-toolbar.pojo-a11y-toolbar-left .pojo-a11y-toolbar-toggle {
  width: 37px;
}
#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle svg {
  width: 20px;
}

.atr-fse-hero-s4 .atr-fse-demo-modal {
  display: flex;
  justify-content: center;
}

.always-white,
a.always-white:visited,
a.always-white:active,
a.always-white:focus {
  color: #fff !important;
}
.atr-fse-footer-s4__main a,
.atr-fse-footer-s4__main a:visited,
.atr-fse-footer-s4__main a:active,
.atr-fse-footer-s4__main a:focus {
  color: #fff !important;
}
.atr-fse-footer-s4__main a:hover,
.atr-fse-footer-s4__main .wp-block-navigation .wp-block-navigation-item:hover {
  color: #fff !important;
  text-decoration: underline;
}

/**
* Contact Form 7 Inline Row Layout (for use in footer form)
*/
form.wpcf7-form p {
  margin: 0;
}
.cf7-inline-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cf7-inline-row-footer .form-row {
  display: flex;
  gap: 15px;
}
.cf7-inline-row-footer .form-row .form-col {
  width: 50%;
  display: flex !important;
  flex-direction: row;
}
.cf7-inline-row-footer.cf7-inline-row
  input:not([type="submit"]):not([type="checkbox"]),
.cf7-inline-row textarea {
  padding: 1px 5px;
}
.cf7-inline-row .wpcf7-form-control-wrap {
  flex: 1 1 calc(50% - 5px);
  min-width: 140px;
}
.cf7-inline-row input:not([type="submit"]):not([type="checkbox"]),
.cf7-inline-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fafafa;
  color: #3a3a3a;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}
.cf7-inline-row input:not([type="submit"]):not([type="checkbox"]):focus,
.cf7-inline-row textarea:focus {
  outline: none;
  border-color: #1e73be;
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
  background: #fff;
}
.cf7-inline-row textarea {
  min-height: 80px;
  resize: vertical;
}
.cf7-inline-row input[type="submit"] {
  width: 100%;
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(-135deg, #1e73be 0%, #1a5fa0 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  letter-spacing: 0.03em;
}
.cf7-inline-row input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 115, 190, 0.3);
}
.cf7-inline-row .wpcf7-not-valid {
  border-color: #e74c3c !important;
}
.cf7-inline-row .wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 0.72rem;
  margin-top: 3px;
}
.cf7-inline-row .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.cf7-inline-row .wpcf7-acceptance input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #1e73be;
}
@media (max-width: 480px) {
  .cf7-inline-row .wpcf7-form-control-wrap {
    flex: 1 1 100%;
  }
}
.cf7-inline-row .wpcf7-acceptance label,
.cf7-inline-row .wpcf7-acceptance label a {
  font-size: 0.78rem;
}
.atr-fse-footer-s4__main .cf7-inline-row .wpcf7-acceptance label,
.atr-fse-footer-s4__main .cf7-inline-row .wpcf7-acceptance label a {
  color: #fff;
  line-height: 12px;
}

/* In the modal */
.atr-fse-demo-modal__body .cf7-inline-row .wpcf7-acceptance label,
.atr-fse-demo-modal__body .cf7-inline-row .wpcf7-acceptance label a {
  color: #000000;
}
