/**
 * Sya Custom Design Styles
 */

@layer overrides {
  /* Hero Curved Edge */
  .sya-hero-curved {
    position: relative;
    clip-path: ellipse(120% 100% at 50% 0%);
    z-index: 1;
  }

  /* Patterned Background (Basket Weave) – change the color here: "fill='%23ffffff20'" (hex syntax with alpha value) */
  .sya-pattern-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 73.91 73.91'%3E%3Cpath d='M41.18 30.89v-.04a88 88 0 0 1 0-20.51v-.04a88 88 0 0 0-20.59-2.44c-5.52 0-11.03.53-16.48 1.56-1.37.26-2.75.55-4.11.88v.04a88 88 0 0 1 0 20.51v.04c1.36.33 2.74.61 4.11.88a88 88 0 0 0 16.48 1.56c6.92 0 13.82-.81 20.59-2.44M30.85 36.83a88 88 0 0 1-20.51 0h-.04a88 88 0 0 0-2.44 20.59c0 5.52.53 11.03 1.56 16.48h22.34a88 88 0 0 0 1.56-16.48c0-6.92-.81-13.82-2.44-20.59h-.04ZM57.42 44.69c-6.92 0-13.82.81-20.59 2.44v.04a88 88 0 0 1 0 20.51v.04a88 88 0 0 0 20.59 2.44c5.52 0 11.03-.53 16.48-1.56V46.26a88 88 0 0 0-16.48-1.56ZM47.17 41.18a88 88 0 0 1 20.51 0h.04a88 88 0 0 0 2.44-20.59c0-5.52-.53-11.03-1.56-16.48-.26-1.37-.55-2.75-.88-4.11h-.04a88 88 0 0 1-20.51 0h-.04c-.33 1.36-.61 2.74-.88 4.11a88 88 0 0 0-1.56 16.48c0 6.92.81 13.82 2.44 20.59zM10.33 4.11a88 88 0 0 1 20.51 0h.04c.33-1.36.61-2.74.88-4.11H9.42c.26 1.37.55 2.75.88 4.11h.04ZM0 68.6c1.37-.26 2.75-.55 4.11-.88v-.04a88 88 0 0 1 0-20.51v-.04c-1.36-.33-2.73-.61-4.11-.88v22.34Z' fill='%23ffffff20'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 100px;
    background-blend-mode: soft-light;
  }

  /* Service Cards */
  .sya-service-card figure,
  .sya-service-card img {
    aspect-ratio: 1.2 / 1;
    object-fit: cover;
  }

  .sya-service-card h2,
  .sya-service-card h3 {
    margin-top: var(--wp--preset--spacing--40);
    text-align: center;
    color: var(--wp--preset--color--primary);
  }

  /* Event Calendar Cards */
  .sya-event-card {
    background: #ffffff;
    border-radius: 60px;
    padding: var(--wp--preset--spacing--60);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    height: 100%;
  }

  .sya-event-meta-label {
    font-family: var(--wp--preset--font-family--accent);
    color: var(--wp--preset--color--primary);
    text-transform: uppercase;
    font-weight: 300;
    font-style: italic;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }

  /*
   * Meta row inside a calendar card: label | value in two equal columns,
   * mirroring the hardcoded card's wp:columns layout. The shortcode emits
   * <div class="sya-event-meta-row"><span class="sya-event-meta-label">…</span><span>…</span></div>.
   */
  .sya-event-meta-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: baseline;
    column-gap: var(--wp--preset--spacing--30);
    margin-block: 0.4rem;
  }

  /* The value column (place names get long — "Vesalan leiri- ja
     toimintakeskus, Jyväskylä") hyphenates; the label column doesn't. */
  .sya-event-meta-row > span:not(.sya-event-meta-label) {
    hyphens: auto;
  }

  /* Long Finnish compounds ("Koulutuskalenteri", "yhteisöllisyyden") break
     mid-word in the narrow slides; enable automatic hyphenation. Page lang
     is "fi", so the browser uses Finnish hyphenation patterns. */
  .sya-training-intro h2,
  .sya-event-card h3 {
    hyphens: auto;
  }

  /* Card title — smaller than the default h3 size so cards read calmer, with
     space below the title and an underline only on hover (the always-on link
     underline made the card look busy). */
  .sya-event-card h3 {
    font-size: 1.5rem;
    line-height: 1.15;
    margin-block-end: var(--wp--preset--spacing--40);
  }

  .sya-event-card h3 a {
    text-decoration: none;

    &:hover,
    &:focus-visible {
      text-decoration: underline;
    }
  }

  /* Internal card rhythm. The global `main * { margin-block-start: 0 }` reset
     in style.css strips WP block-gap, so stack card text with bottom-margins
     (margin-block-end is untouched by the reset). */
  .sya-event-card p {
    margin-block-end: var(--wp--preset--spacing--30);
  }

  /* Registration deadline is a footnote, not body copy — was inheriting the
     18px body size. Shrink and drop its trailing margin. */
  .sya-event-deadline {
    font-size: 0.85rem;
    margin-block-end: 0;
  }

  /* PDF / Print button — secondary outline style, visually below the primary CTA */
  .sya-pdf-button {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 100%;
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
    background: transparent;
    color: var(--wp--preset--color--primary);
    border: 1.5px solid var(--wp--preset--color--primary);
    border-radius: 0.25rem;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .sya-pdf-button:hover {
    background: color-mix(in oklch, var(--wp--preset--color--primary) 8%, transparent);
  }

  .sya-pdf-button:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: 3px;
  }

  /* Typography Overrides */
  .font-geom {
    font-family: var(--wp--preset--font-family--heading);
  }
  .font-vend {
    font-family: var(--wp--preset--font-family--body);
  }
  .font-victor {
    font-family: var(--wp--preset--font-family--accent);
    font-weight: 300;
  }
}
