/* stylelint-disable no-descending-specificity, selector-id-pattern, declaration-block-single-line-max-declarations, no-duplicate-selectors, at-rule-empty-line-before */

body {
  margin: 0;
  font-family: Poppins, sans-serif; /* lub inna domyślna czcionka */
  background: #fafafa;
  padding-top: 150px; /* adjust this value based on the header height */
}

@media (width <= 700px) {
  body {
    padding-top: 110px;
  }

  .warcabnica-hero {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }

  .warcabnica-hero .warcabnica-hero-left {
    order: 1;
    margin: 0 auto;
    text-align: center;
    transform: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1rem;
  }

  .warcabnica-hero .warcabnica-hero-right {
    order: 2;
    margin: 0 auto;
  }
}

/* Tighten top padding for very small screens */
@media (width <= 480px) {
  body {
    padding-top: 72px;
  }
}
  
  
  
  .warcabnica-fix {
    max-width: 100vw !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .warcabnica-fix .warcabnica-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
      .warcabnica-hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 2rem 1.5rem;
        padding: 0;
        margin: 0;
        min-height: 1rem;
      }
  
      .warcabnica-hero-left {
        flex: 1 1 400px;
        max-width: 600px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        margin-bottom: 32px;
        margin-left: -5%;
        transform: translateX(-15%);
      }
  
      .warcabnica-hero-left h2 {
        font-size: 36px;
        font-weight: 800;
        margin-bottom: 16px;
        animation: slide-up-fade 1.2s ease-out both;
      }
  
      .warcabnica-hero-left p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
      }
  
      .hero-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
      }
  
      .btn-yellow {
        background: rgb(23 123 254);
        padding: 12px 24px;
        border-radius: 8px;
        font-weight: 700;
        text-decoration: none;
        color: white;
        transition: all 0.3s ease;
        transform: translateY(0);
        font-size: 24px;
      }
  
      .btn-yellow:hover {
        background: rgb(51 166 255);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgb(0 0 0 / 15%);
      }

      .btn-yellow:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
      }
  
      .btn-link {
        font-weight: 400;
        text-decoration: underline;
        color: #070064;
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
  
      .warcabnica-hero-right {
        flex: 1 1 300px;
        max-width: 400px;
        position: relative;
        margin-left: 32px;
        overflow: visible;
      }
  
      .warcabnica-animated-bg {
        position: absolute;
        inset: -27px -60px -40px calc(-40px + 10%);
        background: url('/wp-content/themes/warcabytv-szkola/assets/images/demo_class.webp') center center / 125% auto no-repeat;
        border-radius: 24px;
        z-index: -1;
        pointer-events: none;
        animation: bg-pulse 6s ease-in-out infinite alternate;
        overflow: hidden;
        box-shadow: 0 10px 40px 0 rgb(140 150 155 / 15%);
        opacity: 0.5 !important;
      }
  
      @keyframes bg-pulse {
        0% {
          transform: scale(1);
          opacity: 0.92;
        }

        100% {
          transform: scale(1.02);
          opacity: 1;
        }
      }
  
      .warcabnica-wrapper {
        position: relative;
        background: rgb(197 207 214);
        border-radius: 0.875rem;
        padding: 2.2vw 5vw;
        box-shadow:
          inset 0 0 1.25rem rgb(0 0 0 / 8%),
          0 0.75rem 1.5rem rgb(0 0 0 / 10%);
        overflow: visible;
        width: 95% !important;
        max-width: 34.9rem;
        margin-left: 0 !important;
        padding-left: 0;
        padding-right: 5%;
        margin-right: 0 !important;
        z-index: 1;
      }
  
      .warcabnica-board {
        background-image: url('/wp-content/themes/warcabytv-szkola/assets/images/demo_class.webp');
        background-size: 190% auto;
        background-position: calc(50% - 1%) calc(50% - 4%);
        background-repeat: no-repeat;
        background-color: transparent !important;
        border-radius: 12px;
        border: none !important;
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        aspect-ratio: 1 / 1;
        overflow: hidden;
        position: relative !important;
        z-index: 106 !important;
        box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 10%), 0 0.25rem 0.625rem rgb(0 0 0 / 6%);
        margin: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        transform: scale(1);
      }

      .warcabnica-board .square {
        width: 100%;
        height: 100%;
        box-sizing: border-box;
      }
  
      .warcabnica-board .square::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        pointer-events: none;
      }
  
      /* Center dot for pointer positioning */
      .center-dot {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0;
        height: 0;
        pointer-events: none;
      }
  
      .warcabnica-board .dark  { background: rgb(0 0 0 / 0%); }
      .warcabnica-board .light { background: rgb(0 0 0 / 0%); }
  
      .warcabnica-board .piece {
        width: 72%;
        height: 72%;
        border-radius: 50%;
        position: absolute;
        top: 14%;
        left: 14%;
        z-index: 100 !important;
        transition: all 0.4s ease;
        pointer-events: none;
        transform: scale(0.9);
      }
  
      .warcabnica-board .piece.white {
    background: url("/wp-content/themes/warcabytv-szkola/assets/images/pion_demo_bwebp.webp") no-repeat center center / contain !important;
    box-shadow: none !important;
    position: absolute;
  }
  
     
  
  
      .warcabnica-board .piece.white::before {
        top: 20%;
        left: 20%;
        width: 60%;
        height: 60%;
      }
  
      .warcabnica-board .piece.white::after {
        top: 35%;
        left: 35%;
        width: 30%;
        height: 30%;
      }
  
      .warcabnica-board .piece.black {
    background: url('/wp-content/themes/warcabytv-szkola/assets/images/pion_demo_cwebp.webp') no-repeat center center / contain !important;
    box-shadow: none !important;
    position: absolute;
  }
      
  
  
  
      .warcabnica-board .piece.black::before {
        top: 20%;
        left: 20%;
        width: 60%;
        height: 60%;
      }
  
      .warcabnica-board .piece.black::after {
        top: 35%;
        left: 35%;
        width: 30%;
        height: 30%;
      }
  
      .circle-deco {
        position: absolute;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgb(21 146 255);
        top: 0;
        right: 0;
        z-index: 0;
        pointer-events: none;
        animation: expand-circle 1.2s ease-out forwards;
        opacity: 0.4;
      }
  
      @keyframes expand-circle {
        to {
          width: 437px;
          height: 437px;
          top: -146px;
          right: -146px;
        }
      }
  
      @keyframes fly-out {
        to {
          transform: translate(200%, -200%) rotate(720deg);
          opacity: 0;
        }
      }
  
      .captured {
        animation: fly-out 0.6s ease-out forwards;
        z-index: 5;
      }
  
      @keyframes crown-pop {
        0% {
          transform: scale(0.1) translate(-50%, -50%);
          opacity: 0;
        }

        60% {
          transform: scale(1.2) translate(-50%, -50%);
          opacity: 1;
        }

        100% {
          transform: scale(1) translate(-50%, -50%);
        }
      }
  
      /* Nowa animacja wyskoku damki */
      @keyframes crown-rise {
        0% {
          transform: scale(0) translate(-50%, -50%);
          opacity: 0;
        }

        60% {
          transform: scale(1.3) translate(-50%, -50%);
          opacity: 1;
        }

        100% {
          transform: scale(1) translate(-50%, -50%);
        }
      }
  
      .warcabnica-board .piece.white.king div {
        animation: crown-rise 1.8s ease-out;
        font-size: 38.4px;
      }
  
      .warcabnica-hand {
        position: absolute;
        font-size: 2.25rem;
        color: #F3CF31;

        /* Responsive pointer position: center of C3 (row 5.5, col 2.5) */

        /* top: calc((100% / 8) * 5.5); */

        /* left: calc((100% / 8) * 2.5); */

        /* transform: translate(-50%, -50%); */
        transform: translate(-50%, -55%) scale(0.75);
        z-index: 108;
        pointer-events: none;
        opacity: 0.95;
        animation: handPulse 2s infinite;
        text-shadow: 0.0625rem 0.0625rem 0.125rem rgb(0 0 0 / 30%);
        transform-origin: center;
      }
  
      .warcabnica-bubble {
        position: absolute;

        /* Chmurka bliżej pola B1, wyraźnie widoczna w dolnej części planszy */
        top: calc((100% / 8) * 7.0) !important;
        left: calc((100% / 8) * 0.7) !important;
        background: white;
        color: #333;
        padding: 0.5em 0.85em;
        border-radius: 1em;
        box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 15%);
        font-size: 0.85rem;
        z-index: 108;
        pointer-events: none;
        animation: bubble-fade 1.5s ease-in-out infinite alternate;
        max-width: 90%;
        white-space: nowrap;
        transform-origin: center;
      }

      .pointer-piece {
        z-index: 9999 !important;
      }

  #victoryVideoWrapper {
    z-index: 102 !important;
  }
  
  #victoryPlayIcon {
    display: none !important;
    z-index: 103 !important;
  }
  
  @keyframes bubble-fade {
    0% {
      opacity: 0.8;
      transform: translateY(0);
    }

    100% {
      opacity: 1;
      transform: translateY(-3px);
    }
  }
  
  @keyframes slide-up-fade {
    0% {
      opacity: 0;
      transform: translateY(40px);
    }

    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

      /* Zwycięstwo ekran - styl -- usunięty, bo victoryScreen już nieużywany */
  
      /* Responsive styles for .warcabnica-hero and .icon-box */
      @media (width <= 700px) {
        .warcabnica-hero {
          flex-direction: column !important;
        }

        .warcabnica-hero-left {
          max-width: 100%;
          padding: 1.25rem;
          text-align: center;
        }

        .warcabnica-hero-right {
          max-width: 100%;
        }

        .warcabnica-hero-left h2 {
          margin-top: 1.5rem;
        }

        .warcabnica-board {
          width: 90vw;
          max-width: 90vw;
          height: auto;
          padding-right: 2vw;
        }

        .warcabnica-wrapper {
          overflow-x: auto;
        }
      }

      @media (width <= 600px) {
        .icon-box {
          width: 100% !important;
        }
      }

    /* --- Responsive additions --- */
    @media (width <= 1024px) {
      .warcabnica-hero {
        flex-direction: column;
        padding: 2rem 1.25rem;
      }

      .warcabnica-hero-left, .warcabnica-hero-right {
        max-width: 100%;
        flex: 1 1 100%;
      }

      .warcabnica-board {
        max-width: 90vw;
      }
    }
  
    @media (width <= 768px) {
      .icon-box {
        width: calc(50% - 12px) !important;
      }

      .damian-section-flex {
        display: block !important;
        text-align: center !important;
      }

      .damian-section-left, .damian-section-right {
        display: block !important;
        width: 100% !important;
        padding: 20px !important;
      }

      .damian-bg-container {
        margin: 0 auto;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
      }
    }
  
    @media (width <= 480px) {
      .icon-box {
        width: 100% !important;
      }

      .warcabnica-hero-left h2 {
        font-size: 1.75rem;
      }

      .warcabnica-hero-left p {
        font-size: 0.95rem;
      }

      .btn-yellow, .btn-link {
        width: 100%;
        text-align: center;
        justify-content: center;
      }

      .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
      }

      .warcabnica-board {
        width: 90vw;
        max-width: 90vw;
        height: auto;
      }

      video, .warcabnica-board {
        width: 100% !important;
        max-width: 100% !important;
      }
    }
    
  
  
    @media (width <= 700px) {
      body {
        text-align: center;
      }

      .warcabnica-fix,
      .warcabnica-hero,
      .warcabnica-hero-left,
      .warcabnica-hero-right,
      .warcabnica-wrapper,
      .warcabnica-board {
        margin-left: auto !important;
        margin-right: auto !important;
      }
    }
    
  
  
    /* Ukryj tło i ozdoby warcabnicy na urządzeniach mobilnych */
    @media (width <= 700px) {
      .warcabnica-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100vw !important;
        overflow-x: auto;
      }

      .warcabnica-board {
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        padding-right: 2vw;
      }

      .circle-deco {
        display: none !important;
      }
    }
    
  
  
  .warcabnica-flexbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  
  
  @media (width <= 700px) {
    .warcabnica-wrapper {
      padding: 5vw;
      max-width: 95vw;
      overflow-x: auto;
    }

    .warcabnica-board {
      padding-right: 2vw;
    }
  }
  
  
  
      .damian-bg-container {
        position: absolute;
        top: 0;
        right: 0;
        left: auto;
        transform: none;
        width: 420px;
        height: 420px;
        border-radius: 10px;
        overflow: hidden;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
      }

      .damian-bg-pattern {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background-image: url('/wp-content/themes/warcabytv-szkola/assets/images/background.svg');
        background-size: 300% auto;
        background-repeat: repeat;
        background-position: 0 0;
        opacity: 0.10;
        border-radius: 18px;
        z-index: 1;
        animation: damian-bg-move 3s linear forwards;
        transition: background-position 0.3s;
      }

      @keyframes damian-bg-move {
        0% { background-position: 0 0; }
        100% { background-position: 60px 40px; }
      }

      .damian-bg-circle {
        position: absolute;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgb(219 219 219); /* styl jak tło warcabnicy */
        top: -100px;
        left: -100px;
        z-index: 2;
        pointer-events: none;
        box-shadow: 0 10px 40px 0 rgb(140 150 155 / 15%);
        animation: damian-circle-expand 3s ease-out forwards;
      }
  
      .scroll-float {
        transition: transform 0.3s ease;
      }

      .scroll-float-active {
        transform: translateY(-3px);
      }
  
      @keyframes damian-circle-expand {
        to {
          width: 468px;
          height: 468px;
        }
      }

      /* Responsive for background container */
      @media (width <= 700px) {
        .damian-bg-container {
          width: 238px;
          height: 238px;
          border-radius: 20px;
        }
        .damian-bg-pattern { border-radius: 20px; }

        .damian-bg-circle {
          width: 280px;
          height: 280px;
          top: 0;
          right: 0;
          border-radius: 50%;
          box-shadow: 0 10px 40px 0 rgb(140 150 155 / 25%);
        }
      }

      @media (width <= 900px) {
        .damian-section-flex {
          flex-direction: column !important;
          align-items: stretch !important;
          text-align: center !important;
        }

        .damian-section-flex > .damian-section-left,
        .damian-section-flex > .damian-section-right {
          padding-right: 0 !important;
          margin-bottom: 32px !important;
        }

        .damian-section-img-col {
          justify-content: center !important;
          align-items: center !important;
          display: flex !important;
        }

        .damian-bg-circle {
          width: 280px;
          height: 280px;
          top: -60px;
          right: -60px;
        }
      }

      @media (width <= 600px) {
        .damian-section-img-col img {
          max-width: 220px !important;
          width: 100% !important;
        }

        .damian-section-img-col {
          min-width: 0 !important;
        }
      }
    
  
  
  /* Warunkowy styl: ukryj tło, cienie i dekoracje warcabnicy oraz border planszy tylko na mobile */
  @media (width <= 700px) {
    .warcabnica-board {
      width: 100vw !important;
      max-width: 100vw !important;
      height: auto !important;
      overflow-x: auto !important;
      box-sizing: border-box;
      border: none !important;
      box-shadow: none !important;
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      padding: 0 !important;
    }

    .warcabnica-wrapper {
      padding: 0 !important;
      margin-left: 5% !important;
      margin-right: 0 !important;
      max-width: 100vw !important;
      overflow-x: auto !important;
      box-shadow: none !important;
      background: transparent !important;
      padding-left: 5%;
    }

    .circle-deco {
      display: none !important;
    }
  }

    /* ===== Interaktywna mapa PL ===== */
  .poland-map{
    width:100%;
    max-width:520px;
    height:auto;
    display:block;
    margin:0 auto 24px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    z-index: 200;
    overflow: visible !important;
  }
  
  /* ===== Zapewnienie widoczności mapy kontaktowej ===== */
  .contact-map-wrapper {
    position: relative;
    z-index: 200;
    overflow: visible !important;
  }
  
  /* === mapa + lista === */
.poland-map-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 18px;
}
  
  .voivodeship-list{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    justify-items: start;
    max-width: 600px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    margin-top: 20px;
    transform: translateX(-10%);
  }

  @media (width <= 768px) {
    .voivodeship-list {
      transform: none;
    }
  }

  .voivodeship-list li {
    background: #fff;
    border: 1px solid #177BFE;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    width: 100%;
  }

  .voivodeship-list li:hover {
    background: #f0f8ff;
  }
  
  /* podświetlenie */
  .voivodeship-list li.active,
  #polandMap path.active{
    background:#177BFE;
    font-weight:600;
    fill: #177BFE !important;
    list-style-type:none;
  
  }

  .topic-grid{
    display:flex;
    flex-wrap:wrap;
    gap:24px;
    justify-content:center;
    margin:6px 0 24px;
  }

  /* === Contact section full-width, right-aligned form === */
    .contact-container{
      width:100%;
      padding:20px;
      display:flex;
      flex-direction:column;   /* form under title */
      align-items:center;      /* center‑align children */
    }

@media (width >= 1024px) {
  .contact-desktop-padding {
    padding-left: 10%;
    padding-right: 10%;
  }
}
  
    .contact-container h2,
    .contact-container p{
      text-align:center;   /* center title/description */
      margin:0 0 24px;     /* remove right margin */
      width:100%;
    }
  
    .contact-form{
      width:100%;
      max-width:1200px;
      margin:0 auto;       /* centered form */
    }
  
    /* right‑aligned labels */
    .contact-form label{
      display:block;
      text-align:right;
      font-weight:600;
      margin-bottom:4px;
    }
  
  /* --- Submit button: full‑width & centered --- */
  #contactForm button[type="submit"] {
    display: block;
    margin: 2em auto 0;
    width: 100%;
    max-width: 100%;
    padding: 1em 2em;
    background-color: #177BFE;
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
  }

  #contactForm button[type="submit"]:hover {
    background-color: #0f6adc;
  }
  
  /* Fix privacy checkbox alignment and style */
  .contact-form .privacy {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-size: 1.2rem; /* 20% larger */
  }

  .contact-form .privacy input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    appearance: none;
    background-color: #fff;
    position: relative;
    cursor: pointer;
  }

  .contact-form .privacy input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid rgb(23 123 254);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  /* =============================
     Custom radio button styles
     ============================= */
  input[type="radio"] {
    appearance: none;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    position: relative;
    cursor: pointer;
    outline: none;
    vertical-align: middle;
  }

  input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgb(23 123 254); /* Blue dot */
    border-radius: 50%;
    top: 4px;
    left: 4px;
  }
  
  @media (width <=400px){
    .contact-container{
      flex-direction:column;
    }

    .contact-form{
      margin: 0 auto;
    }
  }
  
  /* Tooltips dla sekcji 2 (topic-option) i sekcji 4 (role-btn) */
  .role-btn {
    position: relative;
  }

  .role-btn .tooltip {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(255 255 255 / 95%);
    border: 1px solid #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    pointer-events: auto;
    z-index: 1000;
  }

  .role-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
  }

  @media (width <= 700px) {
    .role-btn .tooltip {
      position: static;
      transform: none;
      opacity: 1;
      visibility: visible;
      margin-top: 8px;
    }
  }
  

/* =============================
   SZKOŁY HERO (nowa wersja)
   ============================= */
.szkoly-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1rem;
  margin: 0 auto;
  max-width: 1300px;
}

/* Przesunięcie logo w lewo o 2rem */
.szkoly-logo-wrapper {
  display: flex;
  justify-content: flex-start;
  padding-left: 2rem;
}

@media (width <= 768px) {
  .szkoly-hero {
    flex-direction: column;
    align-items: center;
  }
}

.szkoly-hero-left,
.szkoly-hero-right {
  flex: 1 1 50%;
}

@media (width <= 768px) {
  .szkoly-hero-left,
  .szkoly-hero-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
}



/* Szkoły footer styles */
.footer-szkoly {
  width: 100%;
  background-color: #f2f2f2;
  color: #1a237e;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-top: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-szkoly a {
  color: rgb(23 123 254);
  text-decoration: underline;
  font-weight: 600;
}

.footer-szkoly a:hover {
  color: #177bfe;
  text-decoration: none;
}

  .szkoly-footer-social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 10px;
    font-size: 1.5rem;
    color: rgb(23 123 254);
  }

  .szkoly-footer-copyright {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
  }



/* =============================
   Niestandardowe przyciski radio dla .role-btn
   ============================= */
.role-btn input[type="radio"] {
  appearance: none;
  background-color: #fff;
  border: 2px solid #999;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin-bottom: 12px;
  position: relative;
}

.role-btn input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  background-color: rgb(23 123 254);
  border-radius: 50%;
}

.role-selection {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  background-color: #f9f9f9;
}

.role-selection.hidden {
  display: none !important;
}

.role-selection.visible {
  display: flex;
}

/* Ensure #roleChoice is flex for role-btns */
#roleChoice {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.szkolna-strona {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-top: 100px; /* dostosuj do wysokości nagłówka jeśli jest fixed */
}

.szkolna-tresc {
  flex: 1;
  padding: 3% 5%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.form-section {
  margin-top: 40px;
}

.form-section .form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 16px; /* Prevent iOS zoom */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-color: #177BFE;
}

.form-group textarea {
  min-height: 200px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

/* Forms: make textarea responsive (override any fixed min-widths) */
.form-group textarea {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.form-submit {
  text-align: center;
  margin-top: 30px;
}

.form-submit button {
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background-color: #3f59be;
  color: #fff;
  cursor: pointer;
}

.form-submit button:hover {
  background-color: #2e459b;
}

/* =============================
   Style formularza: role, tematy, województwa
   ============================= */
.role-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.teacher-subrole {
  font-size: 14px;
  margin-top: 8px;
}

/* Nowy przycisk tematu - analogiczny do .role-btn */

/* Nowy przycisk tematu - analogiczny do .role-btn */
.topic-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 150px;
  height: 160px;
  padding: 16px;
  margin: 10px;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fff;
}


/* Styl ikon i etykiet w przyciskach tematu */
.topic-btn img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
}

.topic-btn span {
  text-align: center;
  font-size: 14px;
  display: block;
}

.topic-btn.active {
  border-color: #177BFE;
  background-color: #f0f4ff;
}

.topic-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 12%);
}

/* =============================
   Stylowanie checkboxa RODO
   ============================= */

/* Removed duplicate earlier .privacy label block to satisfy no-duplicate-selectors */

input[name="rodo"] {
  transform: scale(1.4);
  accent-color: rgb(23 123 254); /* niebieski ptaszek */
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

/* =============================
   Stylowanie .region-item z aktywnym stanem i hover
   ============================= */
.region-item.active {
  background-color: rgb(23 123 254);
  color: #fff;
  border: 1px solid rgb(23 123 254);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 10%);
  transform: translateY(1px);
}

/* ====== Custom map container for szkoły ====== */
.mapa-kontener {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.mapa-svg {
  flex: 1 1 60%;
}

.lista-wojewodztw {
  flex: 1 1 35%;
}

.form-map-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.formularz-kontaktowy {
  flex: 1 1 50%;
}

.mapa-regionow-container {
  flex: 1 1 40%;
}

.role-selection-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

@media (width <= 768px) {
  .role-selection-container {
    flex-direction: column;
    align-items: center;
  }
}

/* =============================
   Accordion styles (new)
   ============================= */
.accordion .accordion-item {
  border-bottom: 1px solid #ddd;
}

  .accordion .accordion-btn {
    width: 100%;
    background: #f1f1f1;
    color: #333;
    cursor: pointer;
    padding: 14px 18px;
    text-align: left;
    outline: none;
    font-size: 18px;
    border: none;
    transition: all 0.3s ease;
  }

  .accordion .accordion-btn.active,
  .accordion .accordion-btn:hover {
    background-color: rgb(23 123 254 / 10%);
    border-left: 4px solid rgb(23 123 254);
    color: rgb(23 123 254);
  }

.accordion .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: #fff;
  padding: 0 18px;
}

.accordion .accordion-item.active .accordion-content {
  max-height: 1000px;
  padding: 12px 18px;
}

.accordion .accordion-item.active .accordion-btn {
  font-weight: 600;
}

.suggestions-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.suggestions-list li {
  list-style: none;
}

/* Pozycjonowanie przycisku zamykania okna logowania */
#loginModal .bg-white {
  position: relative;
}

#closeModal {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  z-index: 10;
}

#closeModal:hover {
  color: black;
}

.hidden {
  display: none !important;
}

.modal.flex {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* =============================
   Przyciski .btn-primary i .btn-secondary
   ============================= */
.btn-primary,
.btn-secondary {
  background-color: rgb(23 123 254);
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  width: 100%;
}

.btn-primary {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  filter: none;
  background-color: #1266d1; /* slightly darker */
  border-color: #115ec0;
  box-shadow: 0 0 0 0.2rem rgb(23 123 254 / 25%);
}

.btn-primary:active {
  background-color: #0f57ad;
  border-color: #0e519f;
}

.btn-primary:hover,
.btn-secondary:hover {
  background-color: rgb(18 103 213);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
}

.btn-primary:disabled,
.btn-secondary:disabled,
button[disabled],
input[type="submit"][disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Active states for buttons for better feedback */
.btn-primary:active,
.btn-secondary:active,
.btn-yellow:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
}

/* Visible focus outlines for accessibility */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-yellow:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(147 197 253 / 50%);
}

.btn-link:focus-visible,
.role-btn:focus-visible,
.topic-btn:focus-visible,
.accordion .accordion-btn:focus-visible,
.voivodeship-list li:focus-visible,
.icon-box:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(147 197 253 / 50%);
}

.registration-checkbox strong {
  font-weight: 700 !important;
}

@media (width <= 768px) {
  .topic-grid {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .topic-btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (width <= 768px) {
  #mapa {
    display: flex;
    flex-direction: column;

  }

  .poland-map-container {
    order: 1;
  }

  .voivodeship-list {
    order: 2;
  }
}

@media (width <= 768px) {
  #mapa {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .poland-map-container {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .poland-map-container svg {
    width: 100%;
    height: auto;
  }

  .voivodeship-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
    margin: 0 auto;
    max-width: 90%;
  }

  .voivodeship-list button {
    width: 90%;
    max-width: 320px;
  }

  .btn-yellow {
    width: 90%;
    max-width: 320px;
    font-size: 1.05rem;
    margin: 0 auto;
    display: block;
  }
}

@media (width <= 768px) {
  .contact-form-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (width <= 768px) {
  .mapa-wojewodztwa-wrapper {
    flex-direction: column !important;
    align-items: center;
  }

  .poland-map-container {
    margin-right: 0 !important;
    margin-bottom: 20px;
  }

  ul.voivodeship-list {
    margin: 0 auto !important;
    padding: 0 10px;
  }
}

@media (width <= 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  select.styled-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 8px;
  }
}

@media (width >= 769px) {
  .mobile-only {
    display: none;
  }
}

@media (width <= 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (width <= 768px) {
  .map-label {
    font-size: 10px;
    fill: white;
    text-anchor: middle;
    pointer-events: none;
    display: block;
  }
}

@media (width >= 769px) {
  .map-label {
    display: none;
  }
}

@media (width >= 1024px) {
  #contactForm.form-padded-desktop {
    padding-left: 40px;
    padding-right: 40px;
  }

  #form_contact .contact-form-container {
    max-width: 960px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (width >= 1024px) {
  /* stylelint-disable-next-line selector-class-pattern */
  #form_contact form.contactForm {
    max-width: 960px !important;
  }
}

/* =============================
   Reset Password Styles
   ============================= */
.reset-title {
  display: block;
  width: 100%;
  text-align: center !important;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.reset-message {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.reset-message.reset-error {
  color: #d32f2f;
}

.reset-message.reset-success {
  color: #388e3c;
}

/* Ukryj animowane tło na urządzeniach mobilnych */
@media (width <= 700px) {
.warcabnica-animated-bg {
  display: none !important;
}
}

/* Zapewnij automatyczne skalowanie warcabnicy, zachowując proporcje kwadratu na mobile */
@media (width <= 700px) {
.warcabnica-board {
  width: 90vw !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  max-width: 90vw !important;
}

.warcabnica-wrapper {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
}

@media (width <= 700px) {
.mobile-spacer {
  height: 40vh;
  width: 100%;
  display: block;
}
}





@media (width <= 600px) {
.scroll-float {
  width: 24vw !important;
}
}



@media (width >= 701px) {
.warcabnica-hero {
  flex-direction: row !important;
}

.warcabnica-hero-left {
  margin-right: 40px;
}

.warcabnica-hero-right {
  margin-left: 0;
}
}


/* =============================
 Sekcja #zyski — własne punktory
 ============================= */
#zyski ul{
list-style:none;
margin:0;
padding-left:0.8em;
}

#zyski ul li{
position:relative;
margin-bottom:0.4em;
padding-left:1.1em;
font-size:1.1em;
color:#444;
list-style-type:none;
}

#zyski ul li::before{
content:"●";
position:absolute;
left:0;
top:0.08em;
font-size:1em;
line-height:1;
color:rgb(23 123 254); /* niebieski akcent */
}

/* ===== Accordion global ===== */
.accordion-content{
max-height:0;
overflow:hidden;
transition:max-height .4s ease;

}

.accordion-content.open{
max-height:1200px;          /* fallback, JS i tak ustawia dokładną wysokość */
}

.accordion-btn.active{
color:rgb(23 123 254);      /* podkreślenie aktywnego pytania */
}

/* Większa czcionka pytań w akordeonie (2×) */
.accordion-btn,
.accordion-toggle {
font-size: 1.1rem;
line-height: 1.3;
font-weight: 600;
color: #000;
}

.icon-box.interactive{
transition:transform .3s ease, box-shadow .3s ease;
}

.icon-box.interactive.active{
transform:translateY(-6px);
box-shadow:0 8px 24px rgb(23 123 254 / 25%);
}

/* Strzałka łącząca kafelki (tworzona przez JS) */
.link-arrow{
position:absolute;
height:3px;
top:50%;
transform-origin:left center;
pointer-events:none;
animation:flow 1.8s linear infinite;
}

@keyframes flow{
0%{transform:scaleX(0);}
40%{transform:scaleX(1);}
60%{transform:scaleX(1);}
100%{transform:scaleX(0);}
}

/* Na urządzeniach mobilnych ukrywamy strzałki */
@media (width <=700px){
.link-arrow{display:none;}
}

/* ==================================================
 Uniwersalny hover dla wszystkich .icon-box kart
 ================================================== */
.icon-box:hover{
transform:translateY(-6px);
box-shadow:0 8px 24px rgb(23 123 254 / 20%);
transition:transform .3s ease, box-shadow .3s ease;
}


/* =================================================
 Kontakt – przyciski wyboru roli
 ================================================= */
.role-btn{
background:#fff;
border:2px solid #e0e0e0;
border-radius:16px;
padding:24px 20px 50px; /* extra bottom padding for sub-options */
text-align:center;
cursor:pointer;
transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
font-family:Poppins,sans-serif;
font-size:16px;
line-height:1.3;
color:#333;

/* Ensure nested elements (like .teacher-subrole-options) are aligned and spaced well */
position: relative;
float: none !important;
width: auto !important;
min-width: 0 !important;
max-width: 100% !important;
box-sizing: border-box;
}

/* Nested subrole radio group for teacher role */
.teacher-subrole-options {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 8px;
margin-top: 12px;
padding-left: 10px;
width: 100%;
box-sizing: border-box;
}

.teacher-subrole-options label {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 500;
color: #222;
margin: 0;
text-align: left;
width: 100%;
cursor: pointer;
}

.teacher-subrole-options input[type="radio"] {
accent-color: rgb(23 123 254);
width: 18px;
height: 18px;
margin: 0;
vertical-align: middle;
}

.role-btn img{
width:80px;
height:80px;
margin-bottom:12px;
}

.role-btn.active {
border-color: rgb(23 123 254);
box-shadow: 0 0 0 3px rgb(23 123 254 / 35%), inset 0 2px 8px rgb(0 0 0 / 10%);
background-color: #e6f2ff;
transform: scale(0.97);
}

/* mobile jedną kolumną */
@media (width <=600px){
#roleChoice{
  flex-direction:column;
  gap:20px;
}

.role-btn{
  width:100%;
}
}

/* Tekst etykiety pod ikoną role-btn */
.role-btn .mobile-label {
display: block;
margin-top: 8px;
color: #000;
font-size: 16px;
line-height: 1.3;
text-align: center;
}

/* Ukrywanie domyślnego tooltip, korzystamy z mobile-label jako etykiety */
.role-btn .tooltip {
position: absolute;
top: -2.5rem;
left: 50%;
transform: translateX(-50%);
background: rgb(255 255 255 / 95%);
border: 1px solid #ccc;
padding: 4px 8px;
border-radius: 4px;
font-size: 14px;
white-space: nowrap;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease-in-out;
pointer-events: auto;
z-index: 1000;
}

.role-btn:hover .tooltip {
opacity: 1;
visibility: visible;
}

@media (width <= 700px) {
.role-btn .tooltip {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  margin-top: 8px;
}
}

.icon-box{
position:relative;            /* baza dla pseudo-elementu */
}

.icon-box::after{
content:"";
position:absolute;
inset:0;
border-radius:16px;
border:3px solid rgb(23 123 254);
opacity:0;
transform:scale(0.9);
transition:opacity .25s ease, transform .25s ease;
pointer-events:none;
}

.icon-box:hover::after,
.icon-box:focus-visible::after{
opacity:1;
transform:scale(1);
}
.region-btn[data-region="mazowieckie"]{background-image:url('../svg/mazowieckie.svg');}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .warcabnica-animated-bg,
  .circle-deco,
  .damian-bg-pattern,
  .damian-bg-circle,
  .warcabnica-hand,
  .warcabnica-bubble,
  .captured,
  .warcabnica-board .piece,
  .link-arrow,
  .icon-box.interactive,
  .accordion .accordion-content {
    animation: none !important;
    transition: none !important;
  }

  /* Avoid hover jump on buttons when motion is reduced */
  .btn-yellow:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .icon-box:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Mobile tweaks: reduce top padding for very small screens */
@media (width <= 576px) {
  body { padding-top: 56px !important; }
}

/* Improve mobile readability of form labels */
@media (width <= 600px) {
  .contact-form label {
    text-align: left;
  }
}

html {
  -webkit-tap-highlight-color: transparent; /* remove iOS tap flash */
  scroll-behavior: smooth;
}

/* Accessible focus/hover for interactive SVG map regions */
#polandMap path {
  transition: fill 0.2s ease, stroke 0.2s ease;
  outline: none;
}

#polandMap path:hover {
  fill: #f0f8ff !important;
  stroke: #177BFE !important;
  stroke-width: 2;
}

#polandMap path:focus-visible {
  fill: #e6f2ff !important;
  stroke: #177BFE !important;
  stroke-width: 3;
}

/* Utility: visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Basic print styles: hide heavy visuals */
@media print {
  body { padding-top: 0; background: #fff; }

  .warcabnica-hero,
  .warcabnica-animated-bg,
  .damian-bg-container,
  .icon-box,
  video,
  .poland-map-container { display: none !important; }
  .szkolna-tresc { padding: 0 !important; max-width: 100% !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 90%; }
}

/* Better focus states for interactive list controls */
.voivodeship-list button:focus-visible,
.voivodeship-list a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(147 197 253 / 50%);
}

/* =============================
   Contact/Registration form – responsive fixes
   ============================= */
#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm input[type="number"],
#contactForm input[type="password"],
#contactForm select,
#contactForm textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

#contactForm textarea { min-width: 0 !important; }

.contact-form-container,
#contactForm {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

@media (width <= 768px) {
  #contactForm { padding-left: 12px; padding-right: 12px; }
}

