.button-red {
  background-color: #f83b4c; /* żywy czerwony kolor */
  color: #fff; /* biały tekst */
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: inline-block;
}

.button-red:hover {
  background-color: #d93040; /* ciemniejszy czerwony po najechaniu */
  transform: translateY(-2px);
}

.button-red:active {
  background-color: #c12a37; /* jeszcze ciemniejszy przy kliknięciu */
  transform: translateY(0);
}

/* Niebieski przycisk (stabilny, bez artefaktów) */
.button-blue {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: #0b1840;          /* granat */
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1;               /* zapobiega „wyciekaniu” tła */
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;             /* utnie ewentualny pseudo-element wychodzący poza guzik */
  transition: filter .2s ease, transform .15s ease;
}

/* Jeśli framework dodaje pseudo-elementy – wyłącz */
.button-blue::before,
.button-blue::after {
  content: none !important;
  display: none !important;
}

.button-blue:hover { filter: brightness(1.08); }
.button-blue:active { transform: translateY(1px); }

/* Czytelny focus bez obrysu, który potrafi „prostokątować” przy border-radius */
.button-blue:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 24, 64, .28);
}

/* === CONTACT FORM (scoped) === */
.contact-form {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  color: #e5e7eb;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

/* Header (use inside your HTML as <h2> and <p> before the form rows) */
.contact-form h2 {
  font-size: 1.6rem;
  margin: 0 0 .35rem 0;
  color: #fff;
}
.contact-form p {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin: 0 0 1.5rem 0;
}

/* Top row: two columns */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 260px;
}

/* Labels + controls */
.form-group label {
  font-size: .85rem;
  margin: 0 0 .4rem 0;
  color: rgba(255,255,255,.8);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: 1rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #94a3b8; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #3b82f6;
  background: rgba(255,255,255,.12);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

/* Consent (checkbox + text in one line, centered under fields) */
.form-group.consent{
  display: flex;
  flex-direction: row;    /* forces single row */
  align-items: baseline;  /* aligns checkbox with text baseline */
  justify-content: center;
  gap: .6rem;
  margin-top: .8rem;
  line-height: 1.5;
  width: 100%;
}
.form-group.consent input[type="checkbox"]{
  accent-color: #3b82f6;
  transform: scale(1.15);
  margin: 0;
  flex-shrink: 0;
  /* fine vertical alignment across browsers */
  margin-top: .15em;
  cursor: pointer;
}
.form-group.consent label{
  margin: 0;
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  white-space: normal;
  cursor: pointer;
  user-select: none;
}

/* Footer with note + buttons */
.form-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.form-footer small{
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}
.buttons{ display:flex; gap:.8rem; }
button{
  cursor: pointer;
  font-size: .95rem;
  border: none;
  border-radius: 9999px;
  padding: .6rem 1.4rem;
  transition: transform .15s, background .2s, box-shadow .2s, opacity .2s;
}
.reset-btn{
  background: transparent;
  color: rgba(255,255,255,.85);
}
.reset-btn:hover{ color: #fff; }
.submit-btn{
  background: #3b82f6;
  color:#fff;
  box-shadow: 0 2px 10px rgba(59,130,246,.4);
}
.submit-btn:hover{ background:#2563eb; transform: translateY(-2px); }
.submit-btn[disabled]{ opacity:.6; cursor:not-allowed; transform:none; }

/* Inline errors + form banner */
.is-invalid{
  border-color:#ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important;
}
.cf-error{
  margin-top:.35rem;
  font-size:.85rem;
  color:#f87171;
}
.cf-banner{
  margin-top:1rem;
  padding:.75rem 1rem;
  border-radius:10px;
  text-align:center;
  font-size:.95rem;
}
.cf-ok{
  background:rgba(59,130,246,.15);
  color:#93c5fd;
  border:1px solid rgba(59,130,246,.25);
}
.cf-err{
  background:rgba(239,68,68,.15);
  color:#fca5a5;
  border:1px solid rgba(239,68,68,.25);
}

/* Responsive */
@media (max-width: 640px){
  .contact-form{ padding:1.5rem; }
  .form-row{ flex-direction: column; }
  .form-footer{ flex-direction: column; align-items: flex-start; }
}

/* --- Back to Top Button --- */

#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  background-color: #0a1b42; /* głęboki granatowy */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- Back to Top Button --- */

#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  background-color: #13336b; /* jaśniejszy niebieski */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- Ikona strzałki --- */
#backToTop svg {
  width: 36px;
  height: 36px;
  stroke: #ffffff;
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
  transition: transform 0.3s ease, filter 0.3s ease;
}

#backToTop:hover {
  transform: scale(1.1);
  background-color: #1d4fa5; /* jaśniejszy po hover */
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

#backToTop:hover svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1));
}

/* --- Animacja pojawiania się przycisku --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#backToTop.show {
  animation: fadeInUp 0.4s ease forwards;
}

/* Overlay behind the popup */
.promo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none; /* shown via JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* Popup container */
.promo-popup {
    width: min(25vw, 420px); /* max ~25% width */
    max-width: 90vw;         /* safety on very small screens */
    background: radial-gradient(circle at top left, #1d4ed8, #020617 55%);
    border-radius: 1.5rem;
    padding: 2.5rem 1.75rem 1.5rem;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.7),
        0 0 0 1px rgba(148, 163, 184, 0.2);
    color: #f9fafb;
    position: relative;
    overflow: hidden;
}

/* Small glowing accent circle */
.promo-popup::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.9), transparent 70%);
    top: -60px;
    right: -40px;
    opacity: 0.3;
    pointer-events: none;
}

.promo-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.promo-badge {
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.6);
}

.promo-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.promo-body {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e7eb;
    margin-bottom: 1rem;
}

.promo-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px dashed rgba(148, 163, 184, 0.7);
    margin-bottom: 0.75rem;
}

.promo-code-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.promo-code {
    font-family: "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.promo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.promo-btn-primary,
.promo-btn-secondary {
    border-radius: 999px;
    border: none;
    font-size: 0.8rem;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.promo-btn-primary {
    background: linear-gradient(135deg, #fa0000, #a80f0f);
    color: #470b02;
    font-weight: 600;
}

.promo-btn-primary:hover {
    filter: brightness(1.05);
}

.promo-btn-secondary {
    background: transparent;
    color: #9ca3af;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.promo-btn-secondary:hover {
    background: rgba(15, 23, 42, 0.6);
}

.promo-small {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* Close X icon */
.promo-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    font-size: 1rem;
    cursor: pointer;
    color: #9ca3af;
}

.promo-close:hover {
    color: #e5e7eb;
}

/* Responsive fix */
@media (max-width: 640px) {
    .promo-popup {
        width: 90vw;
        padding: 1.5rem 1.25rem 1.25rem;
    }
}
