/* ============================================================
   FinOdnowa – Główny arkusz styli (main.css)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #028E7F;
  --lightgreen:  #DCF8D6;
  --darkgreen:   #004447;
  --gray-bg:     #F5F5F5;
  --border:      #E5E7EC;
  --cyan:        #29BBCF;
  --text:        #212529;
  --muted:       #555;
  --white:       #fff;
  --radius-card: 20px;
  --font:        'Montserrat', sans-serif;
}

body  { font-family: var(--font); color: var(--text); font-size: 14px; line-height: 1.5; overflow-x: hidden; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
img   { display: block; max-width: 100%; }

/* ── CONTAINER ── */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.header__top    { background-color: var(--green); padding: 8px 0; }
.header__bottom { background-color: var(--lightgreen); padding: 14px 0; }
.header__top .container,
.header__bottom .container { display: flex; align-items: center; }
.header__top .container    { justify-content: flex-end; }
.header__bottom .container { justify-content: space-between; }

.enter-account {
  display: flex; align-items: center; color: #fff;
  font-size: 14px; font-weight: 600; gap: 6px;
}
.enter-account img { width: 20px; height: 20px; }
.enter-account:hover { opacity: .85; }

.logo img { height: 36px; }

/* ── DESKTOP NAV (visible above 768px) ── */
.header__nav { display: flex; align-items: center; }
.header__nav ul { display: flex; align-items: center; gap: 24px; }
.header__nav a {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text); transition: color .2s;
}
.header__nav a:hover,
.header__nav a.active { color: var(--green); }
.header__nav img { width: 18px; height: 18px; }

/* ══════════════════════════════════
   BURGER BUTTON (hidden above 768px)
══════════════════════════════════ */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.burger-btn:hover { background: rgba(2, 142, 127, 0.12); }
.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--darkgreen);
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
  transform-origin: center;
}
/* Animated X when open */
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════
   MOBILE NAV DROPDOWN
══════════════════════════════════ */
.mobile-nav {
  display: none;
  background: var(--lightgreen);
  border-top: 1px solid rgba(2, 142, 127, 0.18);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.mobile-nav.open { display: block; }

.mobile-nav ul {
  padding: 8px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
  transition: background .18s, color .18s;
}
.mobile-nav li a:hover,
.mobile-nav li a.active {
  background: rgba(2, 142, 127, 0.13);
  color: var(--green);
}
.mobile-nav li a img { width: 20px; height: 20px; flex-shrink: 0; }

.mobile-nav .mobile-login {
  padding: 8px 16px 16px;
}
.mobile-nav .mobile-login a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  transition: background .2s;
}
.mobile-nav .mobile-login a:hover { background: #026d60; }
.mobile-nav .mobile-login a img {
  width: 18px; height: 18px;
  filter: brightness(0) invert(1);
}

/* ── SECTION TITLES ── */
.section-subtitle {
  font-size: 28px; line-height: 1.14; font-weight: 700;
  color: var(--green); margin-bottom: 40px;
}

/* ── BREADCRUMB ── */
.breadcrumb { padding: 14px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span + span::before { content: ' › '; }

/* ── PAGE HERO (subpages) ── */
.page-hero { background: var(--darkgreen); color: #fff; padding: 48px 0 40px; }
.page-hero h1 {
  font-size: 34px; font-weight: 800; line-height: 1.2;
  color: #fff; margin-bottom: 14px;
}
.page-hero p { font-size: 16px; opacity: .9; max-width: 620px; line-height: 1.65; }

/* ── PAGE CONTENT ── */
.page-content { padding: 48px 0 72px; }
.page-content h2 {
  font-size: 20px; font-weight: 700; margin: 36px 0 14px;
  color: var(--text); border-left: 4px solid var(--green); padding-left: 12px;
}
.page-content h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; }
.page-content p  { font-size: 15px; line-height: 1.75; color: var(--muted); margin-bottom: 14px; }
.page-content ul { padding-left: 22px; margin-bottom: 14px; }
.page-content ul li { font-size: 15px; line-height: 1.75; color: var(--muted); list-style: disc; margin-bottom: 6px; }
.page-content table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
.page-content table th { background: var(--green); color: #fff; padding: 12px 16px; text-align: left; font-weight: 700; }
.page-content table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.page-content table tr:nth-child(even) td { background: var(--gray-bg); }
.page-content .info-box { background: var(--lightgreen); border-left: 4px solid var(--green); border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; }
.page-content .info-box p { margin: 0; color: var(--text); font-weight: 500; }

/* ── STEPS ── */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 10px;
}
.step-card {
  background: var(--gray-bg); border-radius: var(--radius-card);
  padding: 28px 20px; display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--green);
  color: #fff; font-size: 18px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}
.step-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── FAQ ── */
.faq-section { padding: 60px 0; background: var(--gray-bg); }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.faq-item__question {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 18px 24px; font-family: var(--font); font-size: 15px; font-weight: 600;
  color: var(--text); text-align: left; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; transition: color .2s;
}
.faq-item__question:hover { color: var(--green); }
.faq-item__question svg { flex-shrink: 0; transition: transform .3s; }
.faq-item.open .faq-item__question svg { transform: rotate(180deg); }
.faq-item.open .faq-item__question { color: var(--green); }
.faq-item__answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  font-size: 14px; line-height: 1.7; color: var(--muted); padding: 0 24px;
}
.faq-item.open .faq-item__answer { max-height: 500px; padding: 0 24px 20px; }

/* ── ADVANTAGES ── */
.advantages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.adv-card { display: flex; align-items: flex-start; gap: 16px; }
.adv-card img { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.adv-card__text h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.adv-card__text p  { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ── FOOTER ── */
.footer { background-color: var(--green); color: #fff; padding: 40px 0 30px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 40px;
  padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.25); margin-bottom: 24px;
}
.footer-about .brand { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.footer-about p { font-size: 13px; line-height: 1.6; opacity: .9; }
.footer-about .psk { font-size: 13px; margin-top: 16px; opacity: .85; }
.footer-links h5, .footer-contact h5 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-links ul li + li { margin-top: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.85); text-decoration: underline; }
.footer-links a:hover { color: #fff; }
.footer-contact .phone { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-contact .phone img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.footer-contact .email { font-size: 13px; opacity: .85; margin-bottom: 16px; }
.footer-legal { font-size: 12px; line-height: 1.7; opacity: .8; }
.footer-legal p + p { margin-top: 8px; }
.footer-legal a { color: rgba(255,255,255,.85); text-decoration: underline; }
.footer-legal a:hover { color: #fff; }

/* ════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════ */

/* 1180px */
@media (max-width: 1180px) {
  .hero__message { top: -46px; left: 240px; width: 240px; font-size: 12px; }
}

/* 991px — tablet */
@media (max-width: 991px) {
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid      { grid-template-columns: repeat(2, 1fr); }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
}

/* ══ 768px — MOBILE NAV SWITCH ══
   Everything below this width gets the burger instead of the desktop nav */
@media (max-width: 768px) {
  /* Hide desktop nav, show burger */
  .header__nav { display: none !important; }
  .burger-btn  { display: flex; }

  /* Hide top "Zaloguj się" bar — button is now in burger dropdown */
  .header__top { display: none; }

  /* Adjustments */
  .header__bottom { padding: 12px 0; }
  .logo img { height: 32px; }

  /* Layout fixes */
  .footer-grid     { grid-template-columns: 1fr; gap: 24px; }
  .advantages-grid { grid-template-columns: 1fr; }
  .section-subtitle { font-size: 22px; margin-bottom: 28px; }

  .page-hero h1 { font-size: 26px; }
  .page-hero p  { font-size: 14px; }
  .page-hero    { padding: 36px 0 28px; }

  .faq-item__question { font-size: 14px; padding: 15px 18px; }
  .faq-item__answer   { padding: 0 18px; }
  .faq-item.open .faq-item__answer { padding: 0 18px 16px; }

  .page-content h2 { font-size: 18px; }
  .page-content p  { font-size: 14px; }
  .page-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .footer { padding: 28px 0 16px; }
  .footer-legal { font-size: 11px; }
}

/* 575px — small mobile */
@media (max-width: 575px) {
  .container { padding: 0 16px; }
  .steps-grid { grid-template-columns: 1fr; gap: 14px; }
  .section-subtitle { font-size: 20px; }
  .adv-card img { width: 60px; height: 60px; }
  .adv-card { gap: 12px; }
  .faq-item__question { font-size: 13px; padding: 13px 14px; }
  .faq-item__answer   { padding: 0 14px; }
  .faq-item.open .faq-item__answer { padding: 0 14px 14px; }
}

/* 400px — very small phones */
@media (max-width: 400px) {
  .container { padding: 0 12px; }
  .logo img { height: 26px; }
  .section-subtitle { font-size: 18px; }
}
