/* ==========================================================================
   FUNDACJA REGIONALNE CENTRUM KOMPETENCJI — style.css
   Deep forest green / warm off-white / muted gold · Lora + Public Sans
   ========================================================================== */

:root {
  --green: #1E4D3B;
  --green-dark: #14352A;
  --green-soft: #2A5F4B;
  --gold: #C99A3C;
  --gold-soft: #E4C98F;
  --bg: #F7F5F0;
  --white: #FFFFFF;
  --text: #22302B;
  --text-muted: #56645E;
  --line: #E4E0D6;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(30, 77, 59, 0.08);
  --shadow-md: 0 6px 18px rgba(30, 77, 59, 0.10);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Public Sans', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.02rem;
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  color: var(--green);
  line-height: 1.25;
}

p { margin-bottom: 1rem; }

a { color: var(--green); }
a:hover { color: var(--green-soft); }

img, svg { max-width: 100%; height: auto; display: block; }

/* --- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 2000;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* --- Focus visibility --------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  flex-shrink: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 1rem;
  line-height: 1.25;
  color: inherit;
}

.brand-text small {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* --- Language switch ------------------------------------------------------ */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  flex-shrink: 0;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Public Sans', Arial, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--green);
  color: #fff;
}

/* --- Navigation ----------------------------------------------------------- */
.main-nav .nav-link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  color: var(--green);
  background: rgba(30, 77, 59, 0.07);
}

.navbar-toggler {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1050;
}

.navbar-toggler .toggler-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
  opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991.98px) {
  .main-nav .navbar-collapse {
    background: var(--white);
    border-top: 1px solid var(--line);
    margin-top: 0.75rem;
    padding: 0.5rem 0 0.75rem;
  }
  .main-nav .nav-link {
    padding: 0.7rem 0.9rem;
  }
}

/* --- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  background-color: var(--green);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  color: #fff;
  padding: 4.5rem 0;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(201, 154, 60, 0.14);
  pointer-events: none;
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.hero .lead-text {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 46rem;
}

.hero .eyebrow {
  color: var(--gold-soft);
}

.hero-accent { color: var(--gold-soft); }

/* --- Sections ---------------------------------------------------------------- */
.section {
  padding: 3.5rem 0;
}

.section-white {
  background: var(--white);
}

.eyebrow {
  display: inline-block;
  font-family: 'Public Sans', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 1.25rem;
}

.section-intro {
  max-width: 48rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-intro,
.center-block {
  margin-left: auto;
  margin-right: auto;
}

.center-block { text-align: center; }

/* --- Cards -------------------------------------------------------------------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  height: auto;
}

.card-body { padding: 1.6rem; }

.card h3, .card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.97rem;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(30, 77, 59, 0.08);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* --- Buttons --------------------------------------------------------------------- */
.btn-green {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-green:hover,
.btn-green:focus {
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-gold:hover,
.btn-gold:focus {
  background: #b88930;
  color: var(--green-dark);
  transform: translateY(-1px);
}

.btn-outline-green {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline-green:hover,
.btn-outline-green:focus {
  background: var(--green);
  color: #fff;
}

.hero .btn-outline-light-custom {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem;
  font-weight: 600;
}

.hero .btn-outline-light-custom:hover,
.hero .btn-outline-light-custom:focus {
  background: #fff;
  color: var(--green);
}

/* --- Numbered / info blocks --------------------------------------------------------- */
.info-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.info-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

/* --- Registration table ----------------------------------------------------------------- */
.reg-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.reg-table th,
.reg-table td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.reg-table th {
  font-family: 'Public Sans', Arial, sans-serif;
  font-weight: 600;
  color: var(--green);
  background: rgba(30, 77, 59, 0.05);
  white-space: nowrap;
  width: 40%;
}

.reg-table tr:last-child th,
.reg-table tr:last-child td {
  border-bottom: none;
}

/* --- Note box ------------------------------------------------------------------------------ */
.note-box {
  background: rgba(201, 154, 60, 0.10);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}

.note-box h3, .note-box h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.note-box p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 0.97rem;
}

/* --- Contact strip ---------------------------------------------------------------------------- */
.contact-strip {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
}

.contact-strip h2,
.contact-strip h3 {
  color: #fff;
}

.contact-strip p {
  color: rgba(255, 255, 255, 0.88);
}

/* --- Forms -------------------------------------------------------------------------------------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.8rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--bg);
}

.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 77, 59, 0.12);
  background: var(--white);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.invalid-feedback {
  display: none;
  color: #A3402B;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.invalid-feedback.show { display: block; }

.form-success {
  display: none;
  background: rgba(30, 77, 59, 0.08);
  border: 1px solid rgba(30, 77, 59, 0.25);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  color: var(--green);
  font-size: 0.93rem;
}

.form-success.show { display: block; }

/* --- Contact info cards --------------------------------------------------------------------------- */
.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
}

.info-card:last-child { margin-bottom: 0; }

.info-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}

.info-card p, .info-card address {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
  font-style: normal;
}

/* --- Map -------------------------------------------------------------------------------------------- */
.map-frame {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--line);
}

@media (max-width: 575.98px) {
  .map-frame { height: 300px; }
}

/* --- Footer ------------------------------------------------------------------------------------------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 2rem;
  margin-top: 0;
}

.footer-logo {
  display: inline-block;
  width: 170px;
  height: auto;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--gold-soft);
  text-decoration: underline;
}

.site-footer .footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .footer-list li {
  margin-bottom: 0.45rem;
  font-size: 0.93rem;
}

.site-footer .footer-reg {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.3rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

/* --- Legal / policy pages ------------------------------------------------------------------------------ */
.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.legal-section p,
.legal-section li {
  color: var(--text-muted);
}

/* --- Timeline (mission context) -------------------------------------------------------------------------- */
.context-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.context-item .num {
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  background: rgba(201, 154, 60, 0.12);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.context-item h3 {
  font-size: 1.08rem;
  margin-bottom: 0.3rem;
}

.context-item p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.97rem;
}

/* --- Utility ------------------------------------------------------------------------------------------------ */
.text-muted-soft { color: var(--text-muted); }

.mb-section { margin-bottom: 2.5rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
