/* ThalaSec Institute – arkusz stylów strony (bez zależności zewnętrznych) */

/* ---------- Czcionki (SIL Open Font License, pliki lokalne) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Zmienne ---------- */
:root {
  --accent: #d2ab82;        /* beż – przyciski, akcenty */
  --accent-strong: #b88d60;
  --heading: #8f7151;       /* brąz – nagłówki sekcji */
  --navy: #0f2a3a;          /* granat – nawiązanie do logo */
  --teal: #1d6f7f;
  --text: #474747;
  --text-dark: #1b1b1b;
  --light: #f7f5f2;
  --border: #e4ded6;
  --white: #fff;
  --font-head: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --header-h: 124px;        /* nagłówek na starcie (duże logo) */
  --header-h-small: 76px;   /* nagłówek po przewinięciu */
  --logo-h: 84px;
  --logo-h-small: 48px;
  --max: 1200px;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h-small) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--heading); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; color: var(--text-dark); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 4px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Przyciski ---------- */
.btn { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--text-dark); background: var(--accent); border: 2px solid var(--accent); padding: 14px 30px; border-radius: 2px;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--text-dark); }
.btn-outline { background: transparent; color: var(--heading); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--text-dark); }

/* ---------- Nagłówek i menu ---------- */
/* Nagłówek przypięty do góry okna; po przewinięciu strony (klasa is-scrolled z main.js)
   płynnie się zmniejsza. Odstęp body = pełna wysokość, więc treść nie przeskakuje. */
body { padding-top: var(--header-h); }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: box-shadow .3s ease; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(8px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); transition: height .3s ease, min-height .3s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(15,42,58,.08); }
.site-header.is-scrolled .container { height: var(--header-h-small); }
.brand img { height: var(--logo-h); width: auto; transition: height .3s ease; }
.site-header.is-scrolled .brand img { height: var(--logo-h-small); }
.nav-toggle { display: none; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 500; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--navy); text-decoration: none; padding: 10px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav-link:hover { background: var(--light); color: var(--navy); }
.nav-link[aria-current="page"] { background: var(--navy); color: #fff; }
.nav-item-dropdown { display: flex; align-items: center; }
.nav-item-dropdown .nav-link { padding-right: 6px; }
.submenu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--navy); cursor: pointer; }
.submenu-toggle:hover { background: var(--light); }
.chevron { width: 14px; height: 14px; transition: transform .2s; }
.submenu-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.submenu { list-style: none; margin: 0; padding: 10px; position: absolute; top: calc(100% + 10px); right: 0; min-width: 280px;
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 6px; box-shadow: 0 14px 34px rgba(15,42,58,.14);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.submenu a { display: block; padding: 10px 14px; border-radius: 4px; color: var(--text-dark); text-decoration: none; font-size: 15px; }
.submenu a small { display: block; color: var(--text); font-size: 13px; }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--light); color: var(--heading); }
/* Podmenu: po najechaniu, fokusie (klawiatura, działa bez JS) lub kliknięciu strzałki (JS) */
.nav-item-dropdown:hover .submenu, .nav-item-dropdown:focus-within .submenu, .submenu.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-cta { margin-left: 10px; }
.nav-cta .btn { padding: 11px 20px; }

/* Przełącznik języka PL | EN – widoczny zawsze (także na telefonie) */
.site-header .container { justify-content: flex-start; }
.site-nav { margin-left: auto; }
.lang-switch { order: 3; display: flex; align-items: center; gap: 2px; margin-left: 16px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.lang-switch a { font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .08em; line-height: 1;
  color: var(--navy); text-decoration: none; padding: 7px 10px; border-radius: 999px; transition: background .2s, color .2s; }
.lang-switch a:hover { background: var(--light); color: var(--navy); }
.lang-switch a[aria-current="true"] { background: var(--navy); color: #fff; }
.lang-switch.is-alone { margin-left: auto; }

@media (max-width: 900px) {
  :root { --header-h: 84px; --header-h-small: 64px; --logo-h: 46px; --logo-h-small: 36px; }
  .site-header .container { padding: 0 16px; }
  .js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; color: var(--navy); cursor: pointer; }
  .nav-toggle .bar, .nav-toggle .bar::before, .nav-toggle .bar::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .nav-toggle .bar::before, .nav-toggle .bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .bar::before { top: -6px; } .nav-toggle .bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar::after { transform: translateY(-6px) rotate(-45deg); }
  .site-header .container { flex-wrap: wrap; height: auto; min-height: var(--header-h); }
  .site-header.is-scrolled .container { height: auto; min-height: var(--header-h-small); }
  .lang-switch { order: 2; margin-left: auto; margin-right: 10px; }
  .js .nav-toggle { order: 3; }
  .site-nav { order: 4; width: 100%; margin-left: 0; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; }
  .nav-list > li { border-top: 1px solid var(--border); }
  .nav-link { border-radius: 0; padding: 14px 4px; width: 100%; }
  .nav-link[aria-current="page"] { background: transparent; color: var(--heading); }
  .nav-item-dropdown { flex-wrap: wrap; }
  .nav-item-dropdown .nav-link { width: auto; flex: 1; }
  .submenu { position: static; width: 100%; min-width: 0; box-shadow: none; border: 0; border-left: 3px solid var(--accent);
    border-radius: 0; margin: 0 0 10px; padding: 0 0 0 8px; transform: none; display: none; opacity: 1; visibility: visible; }
  .submenu.is-open, .nav-item-dropdown:focus-within .submenu { display: block; }
  .nav-cta { margin: 12px 0 0; border-top: 0 !important; }
  .nav-cta .btn { width: 100%; text-align: center; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  :root { --logo-h: 64px; --header-h: 108px; }
}
@media (max-width: 360px) {
  :root { --logo-h: 38px; --logo-h-small: 32px; }
}

/* ---------- Hero ---------- */
/* Efekt "nieruchomego tła": zdjęcie jest przypięte do okna (position: fixed),
   a sekcja wycina z niego swój fragment (clip-path) – przewijana treść przesuwa
   się nad obrazem. Działa także na iOS, gdzie background-attachment: fixed nie działa. */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  background-color: #0b1a24; clip-path: inset(0); isolation: isolate; }
.hero::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(5,20,30,.28), rgba(5,20,30,.45)), url("../img/head-2000.jpg"); background-size: cover; background-position: center; }
@media (max-width: 900px) { .hero::before { background-image: linear-gradient(rgba(5,20,30,.3), rgba(5,20,30,.5)), url("../img/head-1000.jpg"); } }
.hero-inner { position: relative; padding: 96px 24px; max-width: 900px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5.4vw, 64px); margin-bottom: .3em; letter-spacing: -.01em; }
.hero p { font-size: clamp(17px, 1.8vw, 21px); margin-bottom: 2em; color: rgba(255,255,255,.92); }

/* ---------- Sekcje ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--light); }
.section-title { text-align: center; color: var(--heading); font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 56px; }
.center-actions { text-align: center; }
.divider { width: 80px; border: 0; border-top: 2px solid var(--accent); margin: 56px auto; }
.page-title { text-align: center; color: var(--heading); font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 48px; }

/* Bloki tekst + obraz (naprzemiennie) */
.features { display: grid; gap: 72px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; box-shadow: 0 18px 40px rgba(15,42,58,.16); }
.feature h3 { font-size: 22px; }
.feature .btn { margin-top: .4em; }
@media (max-width: 800px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* Cytat */
.quote { position: relative; color: #fff; text-align: center; padding: 120px 0;
  background-image: linear-gradient(rgba(10,20,28,.55), rgba(10,20,28,.55)), url("../img/quote-engineer.jpg"); background-size: cover; background-position: center; }
.quote blockquote { margin: 0 auto; max-width: 860px; }
.quote blockquote p { font-family: var(--font-head); font-weight: 500; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.4; margin: 0; }
.quote hr { width: 60px; border: 0; border-top: 2px solid var(--accent); margin: 32px auto 20px; }
.quote footer { color: rgba(255,255,255,.88); letter-spacing: .06em; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
.contact-info h2 { color: var(--heading); font-size: clamp(26px, 3vw, 36px); }
.contact-info h3 { font-size: 20px; margin-top: 1.4em; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 1.2em; }
.contact-info dt { font-weight: 700; color: var(--text-dark); }
.contact-info dd { margin: 0; }
.contact-lines { list-style: none; padding: 0; margin: 0 0 1.6em; }
.contact-lines li { margin: 4px 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.map-box { position: relative; min-height: 380px; border-radius: 6px; overflow: hidden; background: #dfe7ea;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder { max-width: 360px; }
.map-placeholder p { font-size: 14px; }
.map-placeholder svg { width: 48px; height: 48px; color: var(--teal); margin: 0 auto 12px; display: block; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Strona szkolenia ---------- */
.course { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.course-title { color: var(--heading); font-size: clamp(24px, 2.6vw, 30px); font-weight: 500; }
.course-aside { position: sticky; top: calc(var(--header-h-small) + 24px); text-align: center; }
.course-aside img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; box-shadow: 0 18px 40px rgba(15,42,58,.18); margin-bottom: 24px; }
.course-aside .btn { width: 100%; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 2em; padding: 20px 24px; background: var(--light);
  border-left: 3px solid var(--accent); border-radius: 4px; }
.facts dt { color: var(--text); }
.facts dd { margin: 0; font-weight: 600; color: var(--text-dark); }
.course h3 { font-size: 18px; margin-top: 2em; color: var(--text-dark); }
.course ul, .course ol { padding-left: 1.3em; margin: 0 0 1em; }
.course li { margin: 3px 0; }
.course ol > li { margin: 14px 0; }
.course ol > li > strong { color: var(--text-dark); }
.course ol ul { margin-top: 4px; }
@media (max-width: 900px) {
  .course { grid-template-columns: 1fr; }
  .course-aside { position: static; max-width: 320px; margin: 0 auto; order: -1; }
}

/* ---------- Polityka prywatności ---------- */
.policies { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 980px; margin: 0 auto; }
.policy { text-align: center; }
.policy img { width: 260px; height: 260px; object-fit: cover; border-radius: 50%; margin: 0 auto 24px; }
.policy h2 { font-size: 22px; font-weight: 500; }
.policy details { text-align: left; margin-top: 12px; }
.policy summary { cursor: pointer; color: var(--heading); font-weight: 600; text-align: center; list-style: none; padding: 8px; }
.policy summary::-webkit-details-marker { display: none; }
.policy summary::before { content: "+ "; }
.policy details[open] summary::before { content: "− "; }
.policy-text h3, .legal h3 { font-size: 16px; margin: 1.4em 0 .3em; color: var(--text-dark); font-family: var(--font-body); font-weight: 700; }
.legal { max-width: 860px; margin: 0 auto; }
.legal .page-title { margin-bottom: 12px; }
.legal-meta { text-align: center; color: var(--heading); font-size: 14px; margin-bottom: 32px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin: 6px 0; }
.privacy-note { font-size: 13px; margin-top: 20px; color: var(--text); }
.legal + .legal { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--border); }
.legal h2 { color: var(--heading); font-size: 26px; }
@media (max-width: 800px) { .policies { grid-template-columns: 1fr; } }

/* ---------- Baner zgody (pliki cookies) ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; display: flex; justify-content: center; pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { pointer-events: auto; width: 100%; max-width: 760px; background: #fff; border: 1px solid var(--border);
  border-top: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 18px 48px rgba(15,42,58,.25); padding: 20px 24px; }
.cookie-inner h2 { font-size: 18px; margin-bottom: .4em; }
.cookie-inner p { font-size: 14px; margin-bottom: 16px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-actions .btn { flex: 1 1 180px; text-align: center; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: #fff; }
.cookie-settings { display: none; }
.js .cookie-settings { display: inline; }

/* Tabela w Polityce cookies */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.cookie-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.cookie-table th, .cookie-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.cookie-table th { background: var(--light); color: var(--text-dark); }

/* ---------- Stopka ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 48px 0; text-align: center; font-size: 14px; }
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

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