:root {
  --bg: #FFE3C1;     /* jasny żółty */
  --accent: #FFBBE7; /* jasny różowy */
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.65);
}

/* Czcionka Holla */
@font-face {
  font-family: 'Holla';
  src: url('fonts/HollaScript.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* { box-sizing: border-box }
html, body {
  height: 100%;
  margin: 0;
  /*overflow: hidden;  brak scrolla */
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background-color: var(--accent);
}

/* --- Sidebar --- */
.container {
  display: flex;
  height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 390px;
  height: 100vh;
  padding: 32px 20px;
  background-color: var(--accent);
  /*background-image: linear-gradient(to bottom, var(--accent), 70%,rgb(255, 255,255));*/
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.logo{
  max-width: 200px;
  border-radius: 50%;
  display: block;
  margin-bottom: 12px;
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  width: 100%;
}
.nav li { margin-bottom: 8px }
.nav a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  transition: all 180ms ease;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--bg);
  color: var(--text);
}

/* --- Main --- */
.main {  
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 390px;       
  padding: 0;
  background-color: var(--accent);
  /*background-image: linear-gradient(to bottom, var(--accent), 70%,rgb(255, 255,255));*/
  height: 100vh;
}

/* --- Uniwersalny box (index/about/faq/contact) --- */
.hero,
.card {
  flex: 1;
  width: 96%;              /* pasek po prawej */
  height: 96vh;            /* pełne okno z marginesami */
  margin: 2% 2% 2% 0;      /* góra, prawa, dół – 2%, lewa 0 */
  
  /*border: 4px solid #FF92ED;*/
  border: 4px solid var(--bg);
  border-radius: 12px;
  padding: 40px 32px;
  background-color: var(--bg);
  /*background-image: linear-gradient(to bottom, var(--bg), 70%,rgb(255, 255,255));*/
  /*background-image: linear-gradient(to bottom right, var(--bg), rgb(243, 203, 101));*/
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.kontakt {
  width: 200px;              /* mały rozmiar — możesz dopasować np. 100–150px */
  position: absolute;        /* pozwala umieścić obraz względem sekcji */
  bottom: 40px;              /* odsunięcie od dolnej krawędzi sekcji */
  right: 30%;               /* lub left: 20px; jeśli chcesz po lewej */
  opacity: 0.9;              /* lekka przezroczystość, wygląda subtelniej */
  z-index: 10;               /* aby nie zasłaniał go inny element */
  transform: translateX(-50%);
  transition: all 0.4s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  cursor: pointer;
}
.kontakt:hover{
  transform: translateX(-50%) scale(1.05);  /* tylko powiększenie, bez przesuwania */
  opacity: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}
.nas{
  color: #000;
  font-size: larger;
  padding: 0 20px;
  width: 100%;
  max-width: 900px;
  text-align: justify;
  text-indent: 2em;
  margin: 1em auto; /* center block */
}

/* Nagłówki */
h1 {
  font-size: 32px;
  margin-bottom: 20px;
}
h2 {
  font-size: 24px;
  margin: 16px 0 8px 0;
  color: var(--text);
}

/* Features grid (index) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  text-align: left;
}
.feature h2 {
  margin-bottom: 8px;
  font-size: 20px;
  color: var(--text);
  text-align: center;
}
.feature p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.features-grid .feature:nth-last-child(2),
.features-grid .feature:last-child {
  text-align: center;
}
@media (min-width: 801px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .features-grid .feature:nth-last-child(2),
  .features-grid .feature:last-child {
    grid-column: span 1;
    justify-self: center;
    max-width: 300px;
  }
}
.feature .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  color: var(--accent);
  transition: transform 0.2s ease, color 0.2s ease;
}
.feature .icon svg {
  width: 48px;
  height: 48px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature:hover .icon {
  color: var(--text);
  transform: scale(1.15);
}

/* FAQ */
.faq-list {
  padding-left: 0;
  list-style: none;
  width: 100%;
  text-align: left;
}
.faq-list li {
  margin-bottom: 16px;
}
.faq-list .question {
  font-size: 18px;
  font-weight: 600;
}
.faq-list .answer {
  margin: 4px 0 0 0;
  color: var(--text);
  padding-left: 10px;
}
.min { color: #000; }

/* Formularz kontaktowy */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 90%;
  max-width: 900px;
  margin: 20px auto;
  flex-grow: 1;
  text-align: left;
}
.contact-form label {
  font-weight: bold;
  margin-top: 10px;
  font-size: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  font-size: 18px;
  margin-top: 5px;
}
.contact-form textarea {
  min-height: 250px;
  resize: none;       
}
.contact-details {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}
.contact-details a {
  color: var(--text);
  text-decoration: none;
}
.contact-details a:hover {
  text-decoration: underline;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
  margin-top: 15px;
}
.btn:hover { background: #ff7bd1; }
.btn:active { transform: translateY(1px) }

/* Button spinner and loading state */
.btn { position: relative; overflow: hidden }
.btn .btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  transform: translateY(1px);
  opacity: 0;
  transition: opacity 120ms ease;
}
.btn.loading { pointer-events: none; opacity: 0.9 }
.btn.loading .btn-spinner { opacity: 1; animation: spin 0.8s linear infinite }
.btn.loading .btn-text { opacity: 0.9 }

@keyframes spin { to { transform: rotate(360deg) } }

/* Inline success message shown after AJAX success */
.form-success {
  margin-top: 12px;
  display: inline-block;
  background: #e6ffef;
  color: #06633a;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(6,99,58,0.12);
  font-weight: 600;
}
.form-success[hidden] { display: none }

/* --- Modal --- */
/* Popup modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 400px;
  animation: fadeIn 0.3s ease;
}

.modal-content p {
  margin-bottom: 20px;
  font-size: 16px;
}

.close-btn {
  padding: 8px 16px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.close-btn:hover {
  background: #ff7bd1;
}

.success { border-left: 6px solid #28a745; }
.error { border-left: 6px solid #dc3545; }

@keyframes fadeIn {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}


/* --- Responsive --- */
@media (max-width: 800px) {
  .container { flex-direction: column; height: auto; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 14px 12px;
    gap: 12px;
    height: auto;
    position: relative;
  }
  /* make nav horizontal and scrollable on small screens */
  .nav ul { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0; }
  .nav li { margin-bottom: 0 }
  .nav a { padding: 8px 10px; font-size: 15px; white-space: nowrap }
  .logo { max-width: 120px; margin-right: 8px }

  .main {
    margin-left: 0;
    padding: 12px 8px;
    height: auto;
  }

  /* allow page to scroll naturally on mobile, avoid fixed full-viewport boxes */
  .hero, .card {
    width: 100%;
    height: auto;
    margin: 8px 0;
    padding: 20px;
    box-shadow: none;
  }

  /* keep decorative image visible on mobile but make it smaller and flow with content */
  .kontakt {
    display: block;
    position: relative; /* let it flow inside the card/section */
    width: 120px;
    bottom: auto;
    right: auto;
    transform: none;
    opacity: 0.95;
    margin: 12px auto 0; /* center horizontally on mobile */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
    z-index: 5;
    align-self: center;
  }

  .nas { width: 100%; padding: 0 12px; text-indent: 1em }

  .features-grid { gap: 18px }
  .feature .icon svg { width: 40px; height: 40px }

  .contact-form { width: 100%; padding: 0 8px; max-width: 100% }
  .contact-form input, .contact-form textarea { padding: 12px; font-size: 16px }

  .modal-content { margin: 0 16px; width: calc(100% - 32px); max-width: 480px }

  html, body { overflow-y: auto; height: auto }
}

@media (max-width: 480px) {
  .sidebar { padding: 10px; gap: 8px }
  .nav a { padding: 8px 10px; font-size: 14px }
  h1 { font-size: 24px }
  h2 { font-size: 18px }
  .btn { padding: 10px 14px; font-size: 15px; border-radius: 10px }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px }
  .features-grid .feature { text-align: left }
  .contact-form textarea { min-height: 180px }
  .nas { font-size: 15px }
}
.error-field {
  border: 2px solid #dc3545 !important;
  background: #ffe6e6;
}

.error-msg {
  display: block;
  color: #dc3545;
  font-size: 14px;
  margin-top: 4px;
}



