﻿
/* Custom Dialog / Modal Overlay */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Custom Dialog Box */
.custom-dialog-box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  border-top: 4px solid var(--accent);
}

.custom-dialog-overlay.active .custom-dialog-box {
  transform: translateY(0);
}

.custom-dialog-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text);
}

.custom-dialog-message {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 25px;
  line-height: 1.6;
}

.custom-dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-dialog {
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-dialog-primary {
  background-color: var(--accent);
  color: white;
}

.btn-dialog-primary:hover {
  background-color: var(--accent-dark);
}

.btn-dialog:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-dialog-secondary {
  background-color: transparent;
  border-color: #e0e0e0;
  color: var(--muted);
}

.btn-dialog-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Redesigned Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1a1a1a; /* Dark background for better contrast */
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
  border-left: 4px solid var(--accent);
}

.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #27ae60; /* Success green */
}

.toast-message {
  font-weight: 500;
  font-size: 14px;
}

/* Form Validation Styles */
.form-group {
  position: relative;
  margin-bottom: 24px; /* Increased space for error message */
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.form-control:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.form-control.invalid {
  border-color: #b91c1c; /* Red for error state */
  background-color: #fef2f2;
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.form-control.valid {
  border-color: #27ae60;
  background-color: #f8fff9;
}

.validation-message {
  display: block;
  font-size: 12px;
  color: #b91c1c; /* Dark red - 5.9:1 on white, meets WCAG AA */
  margin-top: 4px;
  min-height: 1em;
  transition: all 0.2s ease;
}

.validation-message:empty {
  display: none;
}

.form-control.invalid ~ .validation-message,
.form-control.invalid + .validation-message {
  display: block;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }
  40%, 60% { transform: translate3d(2px, 0, 0); }
}

/* ════════════════════════════════════════
   O NAS – page styles
   ════════════════════════════════════════ */
.onas-intro { padding: 120px 0 80px; }
.onas-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.onas-kicker {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  color: #166534;
  font-weight: 700;
  margin-bottom: 16px;
}
.onas-h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
  margin: 0 0 28px;
}
.onas-lead      { font-size: 16px; line-height: 1.85; color: #555; margin: 0 0 20px; }
.onas-lead-last { font-size: 16px; line-height: 1.85; color: #555; margin: 0 0 32px; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat-box {
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}
.stat-box--light { background: #dbeafe; }
.stat-box--dark  { background: #166534; }
.stat-number {
  font-family: 'Libre Baskerville', serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  display: block;
}
.stat-box--light .stat-number { color: #166534; }
.stat-box--dark  .stat-number { color: #fff; }
.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 10px;
}
.stat-box--light .stat-label { color: #555; }
.stat-box--dark  .stat-label { color: rgba(255,255,255,0.8); }

/* Dziedziny */
.onas-dziedziny { background: #f0f7ff; padding: 80px 0; }

/* Historia */
.onas-historia { padding: 80px 0; background: #fff; }
.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.onas-h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0 0 28px;
}
.onas-p { font-size: 15px; line-height: 1.85; color: #555; margin: 0 0 20px; }
.onas-blockquote {
  border-left: 4px solid #166534;
  padding: 16px 24px;
  margin: 32px 0 0;
  background: #dbeafe;
  border-radius: 0 8px 8px 0;
}
.onas-blockquote p  { font-family: 'Libre Baskerville', serif; font-size: 16px; font-style: italic; color: #1a1a1a; margin: 0 0 12px; }
.onas-blockquote cite { font-size: 13px; color: #166534; font-weight: 700; font-style: normal; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 36px;
  border-left: 2px solid #e2e8f0;
  margin-left: 12px;
}
.tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl-dot {
  position: absolute;
  left: -13px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #166534;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-dot--gold  { background: #f59e0b; }
.tl-dot--empty { background: #fff; border: 2px solid #166534; }
.tl-dot-inner  { width: 10px; height: 10px; background: white; border-radius: 50%; }
.tl-year       { font-size: 11px; font-weight: 700; color: #166534; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.tl-year--gold  { color: #f59e0b; }
.tl-year--muted { color: #999; }
.tl-title { font-size: 15px; font-weight: 700; color: #1a1a1a; margin: 0 0 6px; }
.tl-text  { font-size: 14px; color: #666; line-height: 1.7; margin: 0; }

/* Dlaczego my */
.onas-dlaczego { background: #f0f7ff; padding: 80px 0; }

/* CTA bar */
.onas-cta { background: #166534; padding: 80px 0; text-align: center; }
.onas-cta h2 { font-family: 'Libre Baskerville', serif; font-size: 34px; color: #fff; margin: 0 0 20px; font-weight: 700; }
.onas-cta p  { color: rgba(255,255,255,0.85); font-size: 17px; max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.onas-cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-white        { background: #fff !important; color: #166534 !important; }
.btn-outline-white { background: transparent !important; border: 2px solid #fff !important; color: #fff !important; }

/* Responsive */
@media (max-width: 900px) {
  .onas-intro-grid,
  .historia-grid { grid-template-columns: 1fr; gap: 40px; }
  .onas-h1 { font-size: 28px; }
  .onas-cta h2 { font-size: 26px; }
}
