/* --- CSS RESET & NORMALIZE --- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {line-height: 1;}
ol, ul {list-style: none;}
blockquote, q {quotes: none;}
blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;}
a {color: inherit; text-decoration: none;}
table {border-collapse: collapse; border-spacing: 0;}
img {max-width: 100%; height: auto; display: block;}
button, input, textarea, select {font-family: inherit; font-size: inherit;}

/* --- CUSTOM PROPERTIES --- */
:root {
  --color-primary: #163753;
  --color-secondary: #D9B96D;
  --color-accent: #FAF6F2;
  --color-neutral-bg: #F8F7F4;
  --color-white: #fff;
  --color-black: #1A2328;
  --color-grey: #647184;
  --color-grey-light: #eaeaea;
  --color-border: #e5e7eb;
  --shadow-card: 0 2px 12px 0 rgba(30,37,41,0.07);
  --shadow-hover: 0 6px 24px 0 rgba(30,37,41,0.12);
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
}

/* --- BASE LAYOUT --- */
html, body {
  min-height: 100%;
  background: var(--color-neutral-bg);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  scroll-behavior: smooth;
}
body {position: relative;}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

main {flex: 1 0 auto; background: none;}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--color-white);
  box-shadow: 0 2px 10px 0 rgba(30,37,41,0.04);
  position: relative;
  z-index: 1002;
}
header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
header nav > a img {
  display: block;
  height: 44px;
  margin-right: 12px;
}
header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  flex: 1;
}
header nav ul li a {
  font-family: var(--font-display);
  font-size: 16px;
  padding: 6px 14px;
  color: var(--color-primary);
  border-radius: 3px;
  transition: background .15s, color .15s;
}
header nav ul li a:hover, header nav ul li a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
header nav .cta.primary {
  margin-left: 18px;
  padding: 10px 24px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-display);
  border-radius: 26px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-card);
  border: none;
  transition: background .18s, box-shadow .18s, color .18s;
  cursor: pointer;
  display: inline-block;
  letter-spacing: 0.03em;
}
.cta.primary:hover, .cta.primary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}
.cta.secondary {
  margin-top: 14px;
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 26px;
  padding: 10px 26px;
  transition: background .16s, color .14s, border-color .16s;
  cursor: pointer;
  display: inline-block;
}
.cta.secondary:hover, .cta.secondary:focus {
  background: var(--color-primary);
  color: var(--color-accent);
  border-color: var(--color-secondary);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 28px;
  cursor: pointer;
  transition: background .19s;
  z-index: 1004;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-white);
  box-shadow: 0 4px 32px 2px rgba(22,55,83,0.08);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.96,-0.06,.51,1.13);
  z-index: 1009;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  background: transparent;
  color: var(--color-primary);
  font-size: 30px;
  border: none;
  padding: 20px 22px 10px 18px;
  cursor: pointer;
  align-self: flex-end;
  transition: color .17s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-secondary);
}
.mobile-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 26px 24px 30px;
}
.mobile-nav a {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: 19px;
  padding: 10px 0;
  border-radius: 3px;
  font-weight: 500;
  transition: background .15s, color .15s;
  width: 100%;
  display: inline-block;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* HIDE/SHOW NAV FOR MOBILE */
@media (max-width: 992px) {
  header nav ul {
    display: none;
  }
  header nav .cta.primary {display: none;}
  .mobile-menu-toggle {display: block;}
}
@media (min-width: 993px) {
  .mobile-menu {display: none !important;}
}

/* --- SECTION SPACING --- */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: 18px;
}

/* --- CARD & FEATURE GRIDS ---- */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 28px 0 8px 0;
}
.feature-grid > div {
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  flex: 1 1 260px;
  max-width: 320px;
  min-width: 210px;
  padding: 28px 20px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow .19s, transform .17s;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  gap: 15px;
}
.feature-grid > div:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px) scale(1.012);
}
.feature-grid img {
  height: 40px;
  margin-bottom: 10px;
  margin-top: -6px;
}
.feature-grid h3 {
  font-size: 20px;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
}
.feature-grid p {
  font-size: 15px;
  color: var(--color-grey);
}
.feature-grid span {
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: box-shadow .19s, transform .17s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px) scale(1.01);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* --- TEXTUAL CONTENT LAYOUTS --- */
.text-section {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.text-section ul, .text-section ol {
  margin-left: 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.text-section ul li, .text-section ol li {
  font-size: 16px;
  color: var(--color-grey);
  position: relative; padding-left: 18px;
}
.text-section ul li:before {
  content: '•';
  position: absolute;
  left: 0; top: 0;
  color: var(--color-secondary);
  font-size: 19px;
  line-height: 1;
}
.text-section ol li:before {
  display: none;
}
.text-section strong {color: var(--color-primary); font-weight: 700;}

.text-section em {
  color: var(--color-secondary);
  font-style: italic;
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--color-accent);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  color: var(--color-black);
  font-size: 16px;
  flex-wrap: wrap;
  transition: box-shadow .17s, transform .15s;
}
.testimonial-card p {
  font-size: 16px;
  color: var(--color-black);
  line-height: 1.53;
  max-width: 460px;
}
.testimonial-card strong {
  font-weight: 600;
  color: var(--color-primary);
}
.testimonial-card div:last-child {
  color: var(--color-secondary);
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1.5px;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.017);
}

/* --- BLOG & FEATURED --- */
.blog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 16px 0 8px 0;
}
.blog-list article {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 24px 18px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  flex: 1 1 260px;
  margin-bottom: 20px;
  transition: box-shadow .18s, transform .12s;
}
.blog-list article h3 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: 18px;
  margin-bottom: 3px;
}
.blog-list article a {
  color: var(--color-secondary);
  font-weight: 500;
  margin-top: 4px;
  display: inline-block;
  font-size: 15px;
  transition: color .11s;
}
.blog-list article a:hover, .blog-list article a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}
.blog-list article:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.01);
}
.featured-post {
  margin-top: 28px;
  background: var(--color-accent);
  border-radius: 10px;
  padding: 22px 20px 20px 20px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  color: var(--color-black);
}
.featured-post h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}
.featured-post a {
  color: var(--color-secondary);
  font-weight: 500;
  transition: color .13s;
  display: inline-block;
  margin-top: 6px;
}
.featured-post a:hover, .featured-post a:focus { color: var(--color-primary); }

/* --- TABLES --- */
table {
  width: 100%;
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  margin-bottom: 26px;
  font-size: 16px;
}
thead {
  background: var(--color-accent);
}
th, td {
  text-align: left;
  padding: 15px 10px;
  color: var(--color-primary);
}
tbody tr { border-bottom: 1px solid var(--color-grey-light); }
tbody tr:last-child { border-bottom: none; }
tr:hover td { background: var(--color-accent); }

/* --- FORMS (kontakt.html) --- */
input, textarea {
  border-radius: 6px;
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--color-black);
  width: 100%;
  margin-bottom: 16px;
  background: var(--color-white);
  box-sizing: border-box;
}
input:focus, textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  background: var(--color-accent);
}
label {font-family: var(--font-display); font-size: 15px; margin-bottom: 6px; display: block; color: var(--color-primary);}

/* --- TYPOGRAPHY SCALE --- */
h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.19;
  margin-bottom: 16px;
}
h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.21;
  margin-bottom: 14px;
}
h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 3px;
  line-height: 1.2;
}
h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 600;
}
p {
  margin-bottom: 8px;
  color: var(--color-grey);
}

/* --- FOOTER --- */
footer {
  background: var(--color-white);
  padding: 32px 0 24px 0;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
  color: var(--color-grey);
  box-shadow: 0 -1px 8px 0 rgba(30,37,41,0.04);
  margin-top: 36px;
}
footer .container {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
footer nav a {
  color: var(--color-grey);
  font-size: 14px;
  transition: color .13s;
  font-family: var(--font-body);
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-primary);
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 -2px 14px 0 rgba(22,55,83,0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1030;
  padding: 18px 24px;
  font-size: 15px;
  transition: transform 0.35s, opacity 0.25s;
}
.cookie-consent-banner.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.cookie-consent-banner .cookie-btn {
  background: var(--color-primary);
  color: var(--color-accent);
  border: none;
  font-family: var(--font-display);
  border-radius: 18px;
  font-weight: 600;
  padding: 9px 19px;
  margin: 2px 6px 2px 0;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, color .14s;
}
.cookie-consent-banner .cookie-btn.secondary {
  background: var(--color-secondary);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.cookie-consent-banner .cookie-btn.settings {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.cookie-consent-banner .cookie-btn:hover, .cookie-consent-banner .cookie-btn:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* --- COOKIE SETTINGS MODAL --- */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(0.98);
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 18px;
  box-shadow: 0 8px 36px 4px rgba(22,55,83,0.13);
  z-index: 1060;
  padding: 32px 24px 28px 24px;
  max-width: 390px;
  width: 93vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,-50%) scale(1);
}
.cookie-modal h3 {
  font-size: 20px;
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 8px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cookie-modal .category-label {
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-grey);
}
.cookie-modal .cookie-toggle {
  appearance: none;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--color-grey-light);
  outline: none;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}
.cookie-modal .cookie-toggle:checked {
  background: var(--color-secondary);
}
.cookie-modal .cookie-toggle:before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left .18s;
  box-shadow: 0 1px 4px 0 rgba(80,80,80,0.09);
}
.cookie-modal .cookie-toggle:checked:before {
  left: 18px;
}
.cookie-modal .modal-actions {
  display: flex;
  gap: 13px;
}
.cookie-modal .cookie-btn {
  background: var(--color-primary);
  color: var(--color-accent);
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  padding: 9px 17px;
  min-width: 78px;
  border: none;
  transition: background .13s, color .13s;
}
.cookie-modal .cookie-btn.cancel {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.cookie-modal .cookie-btn:hover, .cookie-modal .cookie-btn:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-modal .close-modal {
  position: absolute;
  right: 20px; top: 13px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.cookie-modal .close-modal:hover { color: var(--color-secondary);}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1200px){
  .container{max-width: 97vw;}
}
@media (max-width: 992px){
  .feature-grid, .card-container, .content-grid, .blog-list {
    gap: 16px; /* slightly smaller gaps */
  }
  .feature-grid > div, .blog-list article {
    max-width: 98vw;
    min-width: 200px;
    flex: 1 1 100%;
  }
}
@media (max-width: 768px) {
  h1 {font-size: 24px;}
  h2 {font-size: 20px;}
  .container {padding: 0 8px;}
  section {padding: 26px 8px; margin-bottom: 40px;}
  .feature-grid, .content-grid, .card-container, .blog-list {
    flex-direction: column;
    gap: 18px;
  }
  .feature-grid > div, .card, .blog-list article {
    min-width: 98vw;
    max-width: 99vw;
    width: 100%;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  header nav {
    flex-direction: row;
    gap: 8px;
    min-height: 60px;
    padding: 0 8px;
  }
  header nav > a img {height: 36px;}
  .cookie-consent-banner {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    font-size: 14px;
    padding: 14px 10px;
  }
  .cookie-modal {
    padding: 23px 8px 17px 8px;
    max-width: 98vw;
  }
}

@media (max-width: 480px) {
  h1 {font-size: 19px;}
  h2 {font-size: 18px;}
  .feature-grid > div, .card, .blog-list article {
    min-width: 99vw;
    max-width: 99vw;
  }
  .footer {padding: 20px 0 12px 0;}
}

/* --- MISC UTILITY CLASSES --- */
.mt-1 {margin-top: 8px;}
.mt-2 {margin-top: 16px;}
.mb-1 {margin-bottom: 8px;}
.mb-2 {margin-bottom: 16px;}
.text-center {text-align: center!important;}
.text-right {text-align: right!important;}
.hide {display: none !important;}

/* --- FOCUS VISIBLE FOR ACCESSIBILITY --- */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 7px; background: #edeae7;}
::-webkit-scrollbar-thumb { background: var(--color-grey-light); border-radius: 5px;}

/* --- PRINT (minimal) --- */
@media print{
  header, footer, .mobile-menu, .cookie-consent-banner, .cookie-modal {display:none!important}
  section {box-shadow:none;background: #fff;}
}
