/* ====================================================== */
/* ========= CSS RESET + NORMALIZE FOR CONSISTENCY ======= */
/* ====================================================== */
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, menu, 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, 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;
}

a {
  text-decoration: none;
  color: inherit;
}
ul, ol {
  list-style: none;
}
img, picture, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: #254154;
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

:root {
  --primary: #254154;
  --secondary: #F2EDE9;
  --accent: #A47040;
  --white: #ffffff;
  --black: #1a1a1a;
  --shadow: 0 4px 24px rgba(37,65,84,0.13);
  --radius-lg: 22px;
  --radius-md: 12px;
  --radius-sm: 6px;
  --transition-default: 0.18s cubic-bezier(0.4,0.05,0.6,1.2);
}

/* ====================================================== */
/* ================== TYPOGRAPHY BOLD =================== */
/* ====================================================== */
h1, .h1 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.16;
  color: var(--primary);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
h4, .h4 {
  font-size: 1rem;
  font-weight: 700;
}

p, ul, ol, li {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: var(--primary);
}

.subheadline {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
  letter-spacing: 0.005em;
  line-height: 1.3;
}

strong {
  font-weight: 700;
  color: var(--primary);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.1rem; }
  .subheadline { font-size: 1.1rem; }
}

/* ====================================================== */
/* =============== LAYOUT CONTAINERS ==================== */
/* ====================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
}

/* Section spacing and alignment - CRITICAL */
section, .section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: var(--radius-md);
}
@media (max-width: 768px) {
  section, .section {
    margin-bottom: 32px;
    padding: 28px 8px;
  }
}

/* Flex-based grid containers - CRITICAL */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  position: relative;
  margin-bottom: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.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;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(37,65,84,0.07);
  position: relative;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Responsive text-image-section */
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 20px;
  }
}

/* Geometric elements (visual style) */
.hero {
  background: var(--secondary);
  min-height: 340px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(37,65,84,0.10);
}
@media (max-width: 768px) {
  .hero {
    min-height: 220px;
    margin-bottom: 32px;
  }
}

/* Cards, features, services, project highlights */
.feature-grid, .service-cards, .highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}
.feature-item, .service-card, .project-highlight {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 28px 22px 20px 22px;
  flex: 1 1 260px;
  min-width: 230px;
  max-width: 320px;
  transition: box-shadow var(--transition-default), transform var(--transition-default);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid transparent;
}
.feature-item:hover, .service-card:hover, .project-highlight:hover {
  box-shadow: 0 4px 32px rgba(37,65,84,0.19);
  transform: translateY(-7px) scale(1.025);
  border-color: var(--accent);
}
@media (max-width: 768px) {
  .feature-grid, .service-cards, .highlight-list {
    flex-direction: column;
    gap: 20px;
  }
}

/* Testimonial card - CRITICAL contrast */
.testimonial-card {
  background: #fff;
  color: #254154;
  font-weight: 600;
  border-left: 7px solid var(--accent);
  font-size: 1.09rem;
  box-shadow: 0 2px 12px rgba(37,65,84,0.08);
  margin-bottom: 24px;
  transition: box-shadow var(--transition-default), border-color var(--transition-default);
}
.testimonial-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(164, 112, 64, 0.10);
}
.testimonial-card span {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 0.98rem;
  color: var(--accent);
  font-weight: 700;
  margin-left: 14px;
}

/* Project highlights spacing */
.project-highlight {
  background: var(--secondary);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin-bottom: 18px;
  border-left: 5px solid var(--primary);
  transition: box-shadow var(--transition-default), border-color var(--transition-default);
}
.project-highlight:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 18px rgba(37,65,84,0.13);
}

/* General text section for contact-details */
.text-section {
  margin-bottom: 20px;
}
.text-section a {
  color: var(--accent);
  text-decoration: underline;
  transition: color var(--transition-default);
}
.text-section a:hover {
  color: var(--primary);
}

/* ====================================================== */
/* ================= BUTTONS/CTAs ======================= */
/* ====================================================== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: none;
  gap: 9px;
  transition: background var(--transition-default), color var(--transition-default), box-shadow var(--transition-default), transform var(--transition-default);
  box-shadow: 0 2px 10px rgba(37,65,84,0.08);
  text-transform: uppercase;
}
.cta.primary {
  background: var(--primary);
  color: var(--secondary);
  letter-spacing: 0.025em;
  border: 2px solid var(--primary);
}
.cta.primary:hover, .cta.primary:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(164, 112, 64, 0.13);
  transform: translateY(-2px) scale(1.03);
}
.cta.secondary {
  background: var(--accent);
  color: var(--primary);
  border: 2px solid var(--accent);
}
.cta.secondary:hover, .cta.secondary:focus {
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--primary);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 2px 12px rgba(37,65,84,0.07);
}

/* Link hover for navigation and footer */
nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--primary);
  margin-right: 26px;
  transition: color var(--transition-default);
  position: relative;
}
nav a:last-child { margin-right: 0; }
nav a:hover, nav a:focus {
  color: var(--accent);
  text-decoration: underline 3px var(--accent);
}
footer nav a {
  font-size: 1rem;
  font-weight: 600;
  margin-right: 22px;
}
footer nav a:hover, footer nav a:focus {
  color: var(--primary);
  text-decoration: underline 2px var(--primary);
}

/* ====================================================== */
/* ================= HEADER & NAV ======================= */
/* ====================================================== */
header {
  width: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  padding: 0 22px;
  height: 86px;
  position: relative;
  box-shadow: 0 1px 12px rgba(37,65,84,0.15);
  z-index: 30;
}
header > a img {
  height: 46px;
  margin-right: 32px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
header .cta.primary {
  margin-left: 24px;
}
header .mobile-menu-toggle {
  display: none;
}

/* Responsive header navigation */
@media (max-width: 900px) {
  header nav, header .cta.primary {
    display: none;
  }
  header .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
    background: var(--accent);
    color: var(--white);
    font-size: 2.2rem;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-default);
    z-index: 52;
    cursor: pointer;
  }
  header .mobile-menu-toggle:hover {
    background: var(--primary);
    color: var(--accent);
  }
}

/* Mobile menu overlay - slide in/out */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(37,65,84, 0.98);
  color: var(--white);
  z-index: 1000;
  transform: translateX(-100vw);
  transition: transform 0.36s cubic-bezier(0.4,0.55,0.10,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 27px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 2.6rem;
  color: var(--accent);
  cursor: pointer;
  margin: 14px 18px 0 0;
  transition: color var(--transition-default);
  z-index: 1051;
}
.mobile-menu-close:hover {
  color: var(--white);
  background: var(--accent);
  border-radius: 50%;
  padding: 2px 12px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 48px 0 0 36px;
}
.mobile-nav a {
  color: var(--white);
  font-size: 1.18rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 800;
  padding: 13px 0;
  border-radius: var(--radius-sm);
  transition: background var(--transition-default), color var(--transition-default);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--accent);
  background: rgba(242,237,233,0.10);
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
  header .mobile-menu-toggle {
    display: none !important;
  }
}

/* ====================================================== */
/* =================== FOOTER =========================== */
footer {
  width: 100%;
  background: var(--secondary);
  padding: 28px 20px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -2px 12px rgba(37,65,84,0.06);
  font-size: 0.98rem;
  margin-top: 60px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
}
footer p {
  color: var(--primary);
  font-weight: 500;
  font-size: 1rem;
}

/* ====================================================== */
/* ==================== COOKIE BANNER =================== */
/* ====================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0;
  width: 100vw;
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 -2px 16px rgba(37,65,84,0.07);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 26px 24px;
  z-index: 2000;
  animation: cookieBannerFadeIn 0.49s cubic-bezier(0.42,0,0.58,1);
}
@keyframes cookieBannerFadeIn {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner-message {
  flex: 1 1 320px;
  font-size: 1.08rem;
  color: var(--primary);
}
.cookie-banner-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.cookie-btn {
  padding: 8px 24px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  margin-right: 6px;
  transition: background var(--transition-default), color var(--transition-default);
}
.cookie-btn.secondary {
  background: var(--white);
  color: var(--accent);
}
.cookie-btn.settings {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
}
.cookie-btn:hover, .cookie-btn:focus {
  filter: brightness(1.06) contrast(1.08);
  background: var(--accent);
  color: var(--white);
}
.cookie-btn.secondary:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    gap: 18px;
    padding: 20px 10px;
    font-size: 0.95rem;
  }
  .cookie-banner-message {
    font-size: 1rem;
  }
  .cookie-banner-buttons {
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
  }
}

/* Cookie modal popup for settings */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%) scale(0.96);
  width: 95vw;
  max-width: 420px;
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 38px rgba(164,112,64,0.13), 0 1.5px 12px rgba(37,65,84,0.14);
  z-index: 2200;
  padding: 34px 28px 28px 28px;
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: cookieModalFadeIn 0.45s cubic-bezier(.32,.72,.46,1.26);
}
.cookie-modal.open { display: flex; }
@keyframes cookieModalFadeIn {
  from { opacity: 0; transform: translate(-50%, -44%) scale(0.93); }
  to { opacity: 1; transform: translate(-50%, -55%) scale(1); }
}
.cookie-modal-title {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.cookie-modal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cookie-toggle-label {
  font-size: 1.02rem;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}
.cookie-toggle {
  appearance: none;
  width: 36px;
  height: 20px;
  background: var(--secondary);
  border: 2px solid var(--accent);
  border-radius: 13px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.15s;
}
.cookie-toggle:checked {
  background: var(--accent);
  border-color: var(--primary);
}
.cookie-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.21s cubic-bezier(0.45,0.12,0.7,1.01);
}
.cookie-toggle:checked::before {
  transform: translateX(16px);
}
.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  position: absolute;
  top: 14px;
  right: 16px;
  cursor: pointer;
}
.cookie-modal-close:hover {
  color: var(--accent);
}

/* ====================================================== */
/* ================ GENERAL ELEMENTS ==================== */
/* ====================================================== */
ul, ol {
  margin-left: 1.1em;
  margin-bottom: 18px;
  line-height: 1.5;
}
ul li, ol li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
}
ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
ol li {
  list-style: decimal inside;
  padding-left: 0;
}

/* Headline Underlines (modern, geometric) */
h2, .h2 {
  position: relative;
}
h2:after, .h2:after {
  content: '';
  display: block;
  width: 48px;
  height: 5px;
  background: var(--accent);
  border-radius: 3px;
  margin-top: 10px;
}
@media (max-width: 768px) {
  h2:after, .h2:after {
    width: 36px;
    height: 4px;
    margin-top: 5px;
  }
}

hr {
  border: none;
  border-top: 1.5px solid var(--accent);
  margin: 36px 0;
}

/* Modal overlay for cookie modal */
.cookie-modal-overlay {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(37, 65, 84, 0.4);
  z-index: 2100;
  display: none;
}
.cookie-modal-overlay.open { display: block; }

/* Input fields, forms (for kontakt.html) */
input, textarea, select {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--secondary);
  margin-bottom: 18px;
  background: var(--secondary);
  width: 100%;
  color: var(--primary);
  transition: border-color var(--transition-default);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  outline: none;
}

/* ====================================================== */
/* ======== Utility: Spacing Consistency ================ */
/* ====================================================== */
.mb-0  { margin-bottom: 0 !important; }
.mb-8  { margin-bottom: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-24 { margin-bottom: 24px !important; }
.mb-32 { margin-bottom: 32px !important; }
.mb-40 { margin-bottom: 40px !important; }

/* ====================================================== */
/* ========== Micro-interactions/Transitions ============ */
/* ====================================================== */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a, button, .cta, .cookie-btn {
  transition: all var(--transition-default);
}

/* Card hover animation */
.card, .feature-item, .service-card, .project-highlight {
  transition: box-shadow var(--transition-default), transform var(--transition-default), border-color var(--transition-default);
}

/* ====================================================== */
/* ========== RESPONSIVE: LAYOUTS & STYLES ============= */
/* ====================================================== */
@media (max-width: 1200px) {
  .container { max-width: 98vw; }
}
@media (max-width: 900px) {
  .container { max-width: 99vw; }
}
@media (max-width: 768px) {
  body { font-size: 0.98rem; }
  .container { padding: 0 6px; }
  .content-wrapper { gap: 18px; }
  section, .section {
    margin-bottom: 26px;
    padding: 18px 2px;
  }
  .feature-item, .service-card, .project-highlight, .card {
    min-width: unset;
    max-width: 99vw;
    padding: 18px 7px;
  }
  header { flex-direction: row; height: 66px; padding: 0 6px; }
  header > a img { height: 38px; margin-right: 18px; }
  .hero { min-height: 130px; padding: 24px 0; margin-bottom: 22px; }
  footer { padding: 16px 7px 12px 7px; }
}

/* Prevent content overlap -- CRITICAL */
.card, .feature-item, .service-card, .project-highlight, .testimonial-card, .section, .cookie-banner, .cookie-modal {
  box-sizing: border-box;
  z-index: 0;
}

/* Form (kontakt.html simulated form) */
.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--secondary);
  padding: 28px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 14px rgba(37,65,84,0.085);
}
.kontakt-form label { font-weight: 700; margin-bottom: 4px; }

/* Hide elements for a clean print */
@media print {
  header, footer, .cookie-banner, .cookie-modal, .mobile-menu { display: none !important; }
  section, .section, .container { padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
}

/* =============== Scrollbar styling (optional modern) ============== */
::-webkit-scrollbar {
  width: 9px;
  background: var(--secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
