/* ==========================================================================
   IMFIB — Instytut Międzynarodowych Finansów i Bankowości
   Modern shared stylesheet (responsive, centered, accessible)
   ========================================================================== */

:root {
  --navy: #0f2a4a;
  --navy-2: #123a63;
  --navy-3: #1b4f86;
  --gold: #c9a227;
  --gold-2: #b8860b;
  --teal: #0e7c86;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #2b3440;
  --text-soft: #5a6675;
  --border: #e3e8ef;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(15, 42, 74, 0.08);
  --shadow-lg: 0 12px 34px rgba(15, 42, 74, 0.14);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--navy-3); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; color: #fff;
  flex: 0 0 auto;
}
.brand-name { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.brand-name small { display: block; font-size: 0.78rem; font-weight: 400; opacity: 0.85; }
.header-contact { text-align: right; font-size: 0.9rem; line-height: 1.5; }
.header-contact a { color: #fff; }
.header-contact .phone { font-weight: 700; color: var(--gold); }

/* ---------- Navigation ---------- */
.site-nav { background: var(--navy-2); border-top: 1px solid rgba(255,255,255,0.08); }
.nav-toggle {
  display: none;
  background: none; border: 0; color: #fff;
  font-size: 1.4rem; cursor: pointer; padding: 12px 0;
}
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.nav-list li { margin: 0; }
.nav-list a {
  display: block; padding: 14px 16px;
  color: #eaf1f8; font-weight: 500; font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,0.06); }
.nav-list a.active { color: #fff; border-bottom-color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 60%, var(--teal) 100%);
  color: #fff;
  padding: 64px 0;
}
.hero .container { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero-text h1 { font-size: 2.3rem; line-height: 1.2; margin: 0 0 16px; }
.hero-text p { font-size: 1.1rem; opacity: 0.92; max-width: 60ch; }
.hero-cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }
.hero-stats { flex: 1 1 300px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius); padding: 20px; text-align: center;
  backdrop-filter: blur(4px);
}
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--gold); }
.stat .lbl { font-size: 0.85rem; opacity: 0.9; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; padding: 44px 0;
}
.page-hero h1 { margin: 0 0 8px; font-size: 2rem; }
.page-hero p { margin: 0; opacity: 0.9; max-width: 70ch; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--text-soft); padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px; color: #b9c2cd; }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--navy-3); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { font-size: 1.9rem; color: var(--navy); margin: 0 0 10px; }
.section-head p { color: var(--text-soft); margin: 0; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.75rem; font-weight: 700; color: var(--gold-2); margin-bottom: 8px;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 48px; height: 48px; border-radius: 10px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--navy-3), var(--teal));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--navy); }
.card p { margin: 0 0 12px; color: var(--text-soft); font-size: 0.95rem; }
.card a.more { font-weight: 600; font-size: 0.9rem; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid var(--border); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 10px;
  color: var(--teal); font-weight: 800;
}

/* ---------- Two column content ---------- */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.split .side { position: sticky; top: 20px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.side-card h3 { margin-top: 0; color: var(--navy); }
.side-card ul { margin: 0; padding-left: 20px; }
.side-card li { margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--navy);
  list-style: none; position: relative; padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--gold-2); font-weight: 700;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--text-soft); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
table.data thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.data tbody tr:nth-child(even) { background: #f8fafc; }
table.data tbody tr:hover { background: #eef4fb; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info .info-row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-info .info-row .ic { flex: 0 0 40px; height: 40px; border-radius: 8px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }
.contact-info h3 { margin: 0 0 4px; color: var(--navy); }
.contact-info p { margin: 0; color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d6e4; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #c9d6e4; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { font-size: 0.9rem; margin: 12px 0 0; max-width: 40ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; font-size: 0.85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a { color: #c9d6e4; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split .side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 1.9rem; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-contact { text-align: left; }
  .nav-toggle { display: block; }
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.open { display: flex; }
  .nav-list a { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .hero { padding: 40px 0; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .section { padding: 40px 0; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
