/* --- 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, 
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 & body styles */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  font-family: 'Roboto', Georgia, serif;
  background: #F4F2EB;
  color: #2d3237;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: #17404F;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:active, a:focus {
  color: #8BB7C8;
  outline: none;
}
/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Georgia, 'Times New Roman', Times, serif;
  color: #17404F;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: 16px;
}
h1 {
  font-size: 2.3rem;
  margin-top: 0; margin-bottom: 24px;
}
h2 {
  font-size: 1.65rem;
  margin-top: 0; margin-bottom: 20px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}
h4,h5,h6 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
p, ul, ol, li {
  font-size: 1rem;
  margin-bottom: 14px;
}
ul, ol {
  padding-left: 28px;
  margin-bottom: 20px;
}
ul li, ol li {
  margin-bottom: 8px;
}
strong { font-weight: 600; }
.text-section {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* Spacing/Sections */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(23,64,79,0.06);
}
section:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  section { padding: 32px 8px; }
  .container { padding: 0 8px; }
}
@media (max-width: 600px) {
  section { padding: 20px 2vw; margin-bottom: 38px; border-radius: 8px; }
  .container { padding: 0 3vw; }
}

/* --- Header and Navigation --- */
header {
  background: #F4F2EB;
  border-bottom: 1.5px solid #e0e0db;
  box-shadow: 0 0 18px rgba(23,64,79,0.06);
  position: relative;
  z-index: 100;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-start;
  padding: 18px 0;
}
.main-nav img {
  max-height: 40px;
  margin-right: 32px;
}
.main-nav a {
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 7px;
  transition: background 0.25s, color 0.15s;
  color: #17404F;
  margin-right: 4px;
}
.main-nav a:hover,
.main-nav a:focus {
  background: #e7e7e0;
  color: #8BB7C8;
}
.main-nav .cta-btn {
  background: #17404F;
  color: #fff;
  border-radius: 7px;
  padding: 9px 20px;
  font-weight: 700;
  margin-left: auto;
  border: none;
  box-shadow: 0 1px 7px rgba(0,0,0,.06);
  transition: background 0.2s, color 0.15s, box-shadow 0.2s;
}
.main-nav .cta-btn:hover,
.main-nav .cta-btn:focus {
  background: #8BB7C8;
  color: #17404F;
  box-shadow: 0 3px 16px rgba(23,64,79,.10);
}

/* Hide mobile navigation by default */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.1rem;
  color: #17404F;
  cursor: pointer;
  margin-left: auto;
  z-index: 120;
  transition: color 0.15s;
}
.mobile-menu-toggle:hover {
  color: #8BB7C8;
}
@media (max-width: 1000px) {
  .main-nav {
    gap: 12px;
    font-size: 15px;
    padding: 14px 0;
  }
  .main-nav img {
    max-width: 105px;
    margin-right: 14px;
  }
}
@media (max-width: 900px) {
  .main-nav a, .main-nav .cta-btn { font-size: .98rem; padding: 6px 8px; }
}
@media (max-width: 790px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 4vw;
    top: 14px;
  }
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #F4F2EB;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.85,.01,.33,1.02);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 20px;
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0%);
}
.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #17404F;
  align-self: flex-end;
  margin-right: 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: color 0.17s;
}
.mobile-menu-close:hover {
  color: #8BB7C8;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 14px 30px;
  width: 100%;
  margin-top: 0;
}
.mobile-nav a {
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1.07rem;
  color: #17404F;
  padding: 12px 0 12px 6px;
  border-bottom: 1px solid #e0e0db;
  transition: background 0.16s, color 0.12s;
  border-radius: 0 7px 7px 0;
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: #e7e7e0;
  color: #8BB7C8;
}

/* --- CTA Button (also applies to anchor buttons) --- */
.cta-btn {
  display: inline-block;
  padding: 12px 32px;
  background: #17404F;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: 'Montserrat',Georgia,serif;
  font-size: 1.06rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 14px;
  text-align: center;
  box-shadow: 0 2px 13px rgba(23,64,79,.08);
  transition: background 0.19s, color 0.19s, box-shadow 0.21s, transform 0.19s;
}
.cta-btn:hover, .cta-btn:focus {
  background: #8BB7C8;
  color: #17404F;
  box-shadow: 0 5px 22px rgba(23,64,79,.18);
  transform: translateY(-2px) scale(1.022);
  outline: none;
}

/* --- Hero, Features, Cards, Testimonials --- */
.feature-grid, .project-grid, .card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 10px;
  margin-bottom: 16px;
}
.feature-grid > div, .project-grid > div, .card {
  background: #F4F2EB;
  border-radius: 14px;
  box-shadow: 0 1px 9px rgba(23,64,79,0.03);
  padding: 28px 18px 22px 18px;
  flex: 1 1 290px;
  min-width: 260px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  transition: box-shadow 0.18s, transform 0.2s;
}
.feature-grid > div:hover, .project-grid > div:hover, .card:hover {
  box-shadow: 0 4px 32px rgba(23,64,79,.17);
  transform: translateY(-2px) scale(1.012);
  z-index: 2;
}
.feature-grid img {
  width: 38px; height: 38px; margin-bottom: 10px;
}
.project-grid span {
  color: #17404F;
  font-style: italic;
  font-size: .98rem;
  opacity: 0.9;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .feature-grid, .project-grid, .card-container {
    gap: 18px;
  }
  .feature-grid > div, .project-grid > div, .card {
    padding: 19px 10px;
  }
}
@media (max-width: 650px) {
  .feature-grid, .project-grid, .card-container {
    flex-direction: column;
    gap: 15px;
  }
  .feature-grid > div, .project-grid > div, .card {
    min-width: 0; width: 100%;
  }
}

/* --- Testimonials --- */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  padding: 24px 38px 22px 30px;
  border-left: 6px solid #8BB7C8;
  border-radius: 0 13px 13px 0;
  margin-bottom: 20px;
  margin-top: 10px;
  box-shadow: 0 4px 24px rgba(23,64,79,0.11);
  color: #17404F;
  font-size: 1.09rem;
  transition: box-shadow 0.17s, transform 0.18s;
}
.testimonial-card strong {
  margin-top: 10px;
  color: #17404F;
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
}
.testimonial-card:hover {
  box-shadow: 0 7px 35px rgba(23,64,79,.17);
  transform: translateY(-2px) scale(1.012);
}
@media (max-width: 700px) {
  .testimonial-card {
    padding: 15px 11px 14px 13px;
    border-left-width: 4px;
  }
}

/* --- List styling for sections --- */
.content-wrapper ul, .content-wrapper ol {
  margin-top: 8px;
  margin-bottom: 20px;
}
.content-wrapper ul {
  list-style-type: disc;
}
.content-wrapper ol {
  list-style-type: decimal;
}
.content-wrapper li {
  margin-bottom: 10px;
  font-size: 1rem;
}

/* --- Section & Card Patterns --- */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
@media (max-width: 900px) { .content-grid { gap: 10px; } }
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

/* --- Footer --- */
footer {
  background: #17404F;
  color: #fff;
  font-size: 1rem;
  padding: 32px 0 0 0;
  border-top: 2px solid #8BB7C8;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.footer-nav a {
  color: #8BB7C8;
  font-family: 'Montserrat', Georgia, serif;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.16s, color 0.15s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: #8BB7C8;
  color: #17404F;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #F4F2EB;
  margin-bottom: 10px;
}
.footer-contact img {
  height: 16px;
  width: 16px;
  vertical-align: middle;
  margin-right: 8px;
}
@media (max-width: 650px) {
  .footer-nav { gap: 10px; font-size: 0.97rem; }
  .footer-contact p { font-size: .97rem; }
}

/* --- Forms (kontakt) --- */
input, textarea, select, button {
  font-family: inherit;
  font-size: 1em;
  background: #F4F2EB;
  border: 1px solid #8BB7C8;
  border-radius: 7px;
  padding: 11px 13px;
  margin-bottom: 18px;
  color: #17404F;
  outline: none;
  transition: border-color 0.16s;
}
input:focus, textarea:focus, select:focus {
  border-color: #17404F;
  background: #fff;
}
label { font-size: 1rem; display: block; margin-bottom: 7px; color: #17404F; font-weight: 500; }

/* --- Responsive Headings (accessibility) --- */
@media (max-width: 600px) {
  h1 { font-size: 1.44rem; margin-bottom: 18px; }
  h2 { font-size: 1.18rem; margin-bottom: 13px; }
  h3 { font-size: 1.03rem; }
}

/* --- Cookie Consent Banner --- */
#cookie-consent-banner {
  position: fixed;
  z-index: 9999;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: #fffefb;
  color: #17404F;
  box-shadow: 0 -5px 32px rgba(23,64,79,.13);
  padding: 32px 26px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border-top: 3px solid #8BB7C8;
  font-size: 1rem;
  animation: ccbouncein 0.5s cubic-bezier(.79,0,.41,1.15) 1;
}
@keyframes ccbouncein {
  0% {transform: translateY(100%); opacity: 0;}
  70% {transform: translateY(-8px); opacity: 1;}
  100% {transform: translateY(0);}
}
#cookie-consent-banner p {
  margin: 0 0 12px 0;
  font-size: 1rem;
}
#cookie-consent-banner .cookie-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
}
.cookie-btns button {
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1rem;
  padding: 9px 19px;
  border-radius: 7px;
  border: none;
  margin-right: 4px;
  margin-bottom: 2px;
  background: #8BB7C8;
  color: #17404F;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 7px rgba(23,64,79,0.06);
  transition: background 0.17s, color 0.17s, transform 0.13s;
}
.cookie-btns .accept-btn {
  background: #17404F;
  color: #fff;
}
.cookie-btns .accept-btn:hover, .cookie-btns .accept-btn:focus {
  background: #8BB7C8;
  color: #17404F;
}
.cookie-btns .reject-btn {
  background: #8BB7C8;
  color: #17404F;
}
.cookie-btns .reject-btn:hover, .cookie-btns .reject-btn:focus {
  background: #17404F;
  color: #fff;
}
.cookie-btns .settings-btn {
  background: #fff;
  border: 1.5px solid #8BB7C8;
  color: #17404F;
}
.cookie-btns .settings-btn:hover, .cookie-btns .settings-btn:focus {
  background: #F4F2EB;
  color: #8BB7C8;
}

/* --- Cookie Settings Modal Popup --- */
#cookie-settings-modal {
  position: fixed;
  top: 0; left: 0; z-index: 10000;
  width: 100vw; height: 100vh;
  background: rgba(23,64,79,0.23);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s;
}
#cookie-settings-modal.open {
  pointer-events: auto;
  opacity: 1;
}
.cookie-modal-content {
  background: #fffefb;
  border-radius: 15px;
  padding: 38px 30px 28px 30px;
  max-width: 430px;
  width: 92vw;
  box-shadow: 0 8px 32px rgba(23,64,79,0.17);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  animation: modalfade .53s cubic-bezier(.75,.01,.32,1.01) 1;
  position: relative;
}
@keyframes modalfade {
  0% { transform: translateY(-38px) scale(.93); opacity: 0;}
  80% { transform: translateY(6px) scale(1.01); opacity: 1;}
  100% { transform: translateY(0) scale(1);}
}
.cookie-modal-content h2 {margin-top: 0; font-size: 1.25rem; color: #17404F;}
.cookie-modal-content label {
  font-size: 1rem;
  color: #17404F;
  font-family: 'Montserrat', Georgia, serif;
  margin-bottom: 5px;
}
.cookie-modal-section {
  border-bottom: 1px solid #e0e0db;
  padding-bottom: 13px; margin-bottom: 13px;
  width: 100%;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 7px;
}
.cookie-category input[type=checkbox] {
  width: 22px; height: 22px;
}
.cookie-modal-content .modal-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  width: 100%;
}
.cookie-modal-content .save-btn {
  background: #17404F;
  color: #fff;
  font-family: 'Montserrat', Georgia,serif;
  padding: 10px 24px;
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.17s, color 0.17s;
}
.cookie-modal-content .save-btn:hover,
.cookie-modal-content .save-btn:focus {
  background: #8BB7C8;
  color: #17404F;
}
.cookie-modal-close {
  position: absolute;
  top: 15px; right: 17px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #17404F;
  cursor: pointer;
  transition: color 0.18s;
}
.cookie-modal-close:hover { color: #8BB7C8; }
@media (max-width: 480px) {
  #cookie-consent-banner { padding: 15px 6px 10px 6px; font-size: .98rem;}
  .cookie-modal-content { padding: 18px 6vw 20px 6vw; max-width: 98vw; }
}

/* --- Misc Spacing Utilities & Helpers --- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-20 { margin-bottom: 20px !important; }
.pt-16 { padding-top: 16px !important; }
.pb-16 { padding-bottom: 16px !important; }

/* --- Scrollbar Styling --- */
::-webkit-scrollbar { width: 9px; background: #EEE; }
::-webkit-scrollbar-thumb { background: #8BB7C8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #17404F; }

/*--- Subtle fade/slide-in effects for content ---*/
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-in-up 0.9s cubic-bezier(.47,.08,.3,1.43) 0.12s forwards;
}
@keyframes fade-in-up {
  to { opacity: 1; transform: none; }
}

/* --- Accessibility & Focus States --- */
a, button, input, select, textarea {
  outline-color: #8BB7C8;
  outline-width: 2px;
  outline-style: auto;
}

/* High-contrast micro-interaction for accessibility on testimonials */
.testimonial-card:focus-within, .testimonial-card.active {
  border-left-color: #17404F;
  box-shadow: 0 0 0 2px #8BB7C8;
}

/* --- Z-index & Layering Structure for overlays (menus, modals) --- */
header, .mobile-menu, #cookie-consent-banner, #cookie-settings-modal  {
  z-index: 2000;
}

/* --- Print styles --- */
@media print {
  header, footer, #cookie-consent-banner, #cookie-settings-modal { display: none !important; }
  section, .container { box-shadow: none !important; background: #fff !important; }
  section { padding: 0 !important; margin: 0 !important; }
}
