/* =======================================================================
   LUCIDLEAF HOMES - Scandinavian Clean CSS
   Author: Senior CSS Developer & UI Designer
   ======================================================================= */

/* ===== 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: border-box;
}
html { box-sizing: border-box; height: 100%; }
*, *:before, *:after { box-sizing: inherit; }
body {
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #2d2f2a;
  background: #F4F0E3;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; border: 0; }
a { color: #356334; text-decoration: none; transition: color 0.2s; }
a:hover, a:focus { color: #7DA17C; outline: none; }
ul, ol { list-style-position: inside; margin-bottom: 1em; }
button { background: none; border: none; font-family: inherit; cursor: pointer; padding: 0; }

/* ===== VARIABLES ===== */
:root {
  --color-primary: #356334;
  --color-secondary: #7DA17C;
  --color-accent: #F4F0E3;
  --color-bg: #ffffff;
  --color-grey: #e6e8e1;
  --color-card-bg: #ffffff;
  --color-text-primary: #2d2f2a;
  --color-text-secondary: #628156;
  --color-btn-text: #ffffff;
  --shadow-sm: 0 2px 8px rgba(53,99,52,0.05);
  --shadow-md: 0 4px 16px rgba(53,99,52,0.08);
  --border-radius: 14px;
}

/* ===== TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,600&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:400,700&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.018em;
  line-height: 1.16;
  margin-bottom: 0.5em;
}
h1 { font-size: 2.5rem; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.25rem; margin-bottom: 16px; }
h4 { font-size: 1.12rem; }

p, ul, ol {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-bottom: 18px;
}
.subhead {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  margin-bottom: 24px;
}
strong { font-weight: 700; }

blockquote {
  font-style: italic;
  color: var(--color-primary);
  padding-left: 16px;
  border-left: 3px solid var(--color-secondary);
  margin-bottom: 14px;
}

/* ===== LAYOUT WRAPPERS ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: none;
  gap: 0;
}
.text-section {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 24px;
  margin-bottom: 32px;
}

/* ===== FLEXBOX CONTENT GRIDS ===== */
.feature-grid, .step-grid, .team-overview, .article-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 20px;
}
.feature-grid > div,
.step-grid > div,
.team-overview > div,
.article-list > article {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 22px 22px 22px;
  flex: 1 1 300px;
  min-width: 260px;
  margin-bottom: 0;
  transition: box-shadow 0.18s, transform 0.18s;
}
.feature-grid > div:hover,
.step-grid > div:hover,
.team-overview > div:hover,
.article-list > article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px) scale(1.012);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  min-width: 250px;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

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

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #f9f9f6;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 12px rgba(34,70,39,0.07);
  margin-bottom: 24px;
  transition: box-shadow 0.17s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(53,99,52,0.13);
}
.testimonial-meta {
  font-size: 1rem;
  color: var(--color-secondary);
}

/* Guarantee testimonial text is readable */
.testimonial-card blockquote,
.testimonial-card span {
  color: #222b26;
}

/* ===== NAVIGATION ===== */
header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(53,99,52,0.04);
  z-index: 30;
  position: relative;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 18px;
  gap: 18px;
}
header img {
  height: 50px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}
.main-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: 7px;
  transition: background 0.18s, color 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.main-nav .btn-primary {
  margin-left: 12px;
}
.mobile-menu-toggle {
  display: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 2rem;
  border-radius: 8px;
  padding: 4px 12px;
  line-height: 1;
  z-index: 98;
  transition: background 0.18s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: #fff;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(244,240,227,0.90);
  backdrop-filter: blur(2.5px);
  z-index: 99;
  transform: translateX(-105vw);
  transition: transform 0.34s cubic-bezier(.54,.04,.39,1.19);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu-close {
  font-size: 2rem;
  color: var(--color-primary);
  background: #fff;
  border-radius: 50%;
  margin: 20px 0 0 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background .14s;
  border: none;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 40px 0 0 34px;
}
.mobile-nav a {
  font-size: 1.12rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--color-primary);
  padding: 10px 0;
  border-bottom: 1px solid #e8e9e4;
  width: fit-content;
  transition: color .17s;
}
.mobile-nav a:active, .mobile-nav a:focus, .mobile-nav a:hover {
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
}

/* Hamburger visible on mobile */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: block; }
}
@media (min-width: 1021px) {
  .mobile-menu { display: none !important; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-btn-text);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  outline: none;
  border-radius: 8px;
  padding: 12px 32px;
  margin-top: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(53,99,52,0.07);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.14s, color 0.18s, transform 0.13s;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(53,99,52,0.13);
}

.btn-secondary {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  box-shadow: 0 2px 8px rgba(53,99,52,0.12);
  cursor: pointer;
  transition: background 0.2s, color 0.18s;
  margin-right: 12px;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-primary);
  color: #fff;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 28px;
  margin-right: 8px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border 0.16s;
}
.btn-ghost:hover, .btn-ghost:focus {
  background: var(--color-accent);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* ===== FOOTER ===== */
footer {
  background: #fff;
  border-top: 1px solid #e7eadf;
  margin-top: 60px;
  padding: 44px 0 24px 0;
}
footer .container {
  flex-direction: row;
  gap: 34px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-nav a {
  color: var(--color-primary);
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  transition: color 0.16s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-secondary);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 1rem;
  color: var(--color-text-primary);
}
.footer-contact img:first-child {
  height: 38px;
  width: auto;
  margin-bottom: 8px;
}
footer address {
  font-style: normal;
}
footer small {
  display: block;
  padding-top: 24px;
  color: #9c9e90;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  width: 100%;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 -2px 18px rgba(49,99,44,0.12);
  padding: 22px 16px 12px 16px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  animation: cookieIn 0.8s cubic-bezier(.55,.16,.02,1.08);
}
@keyframes cookieIn {
  0% {transform: translateY(120px); opacity: 0;}
  80% {transform: translateY(-8px); opacity: 1;}
  100% {transform: translateY(0); opacity: 1;}
}
.cookie-banner p {
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-bottom: 0;
}
.cookie-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cookie-buttons .btn-primary,
.cookie-buttons .btn-secondary,
.cookie-buttons .btn-ghost {
  margin: 0;
  padding: 10px 18px;
  font-size: 1rem;
}
.cookie-buttons .btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

/* ***** COOKIE SETTINGS MODAL ***** */
.cookie-modal-overlay {
  display: none;
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(36,38,30,0.28);
  z-index: 180;
  align-items: center;
  justify-content: center;
}
.cookie-modal-overlay.open { display: flex !important; }
.cookie-modal {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 32px rgba(49,99,44,0.16);
  padding: 36px 26px;
  min-width: 340px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalIn 0.5s cubic-bezier(.61,.14,.24,1.22);
  position: relative;
}
@keyframes modalIn {
  0% {transform: scale(0.9) translateY(80px); opacity: 0;}
  70% {transform: scale(1.01) translateY(-10px); opacity: 1;}
  100% {transform: scale(1) translateY(0); opacity: 1;}
}
.cookie-modal h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}
.cookie-modal .modal-section {
  margin-bottom: 12px;
}
.cookie-modal label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 10px;
}
.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  display: inline-block;
}
.toggle-switch input[type="checkbox"] {
  display: none;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background: #e5ecd7;
  border-radius: 15px;
  transition: background 0.23s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  left: 4px; top: 4px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(53,99,52,0.11);
  transition: transform 0.23s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-secondary);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(14px);
  background: var(--color-primary);
}
.cookie-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 1.32rem;
  background: #f4f0e3;
  color: var(--color-primary);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background 0.15s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--color-secondary);
  color: #fff;
}

/* ===== CARDS, MISCELLANEOUS COMPONENTS ===== */
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.article-list > article a {
  color: var(--color-secondary);
  text-decoration: underline;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  margin-top: 8px;
  transition: color 0.16s;
}
.article-list > article a:hover, .article-list > article a:focus {
  color: var(--color-primary);
}

ul {
  padding-left: 16px;
  margin-bottom: 18px;
}
li {
  margin-bottom: 8px;
}

/* ===== FORM ELEMENTS (Basic for Kontakt) ===== */
input, textarea, select {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 10px;
  border: 1px solid #dbe2d2;
  border-radius: 7px;
  background: #f9f9f6;
  color: #2d2f2a;
  outline: none;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-secondary);
}

/* ===== RESPONSIVENESS & FLEX ADAPTATION ===== */
@media (max-width: 960px) {
  .container { max-width: 98vw; }
  .feature-grid, .step-grid, .team-overview, .article-list, .content-grid {
    gap: 16px;
  }
  .feature-grid > div, .step-grid > div, .team-overview > div {
    min-width: 210px;
    font-size: 0.97rem;
  }
  .footer-contact {
    font-size: 0.98rem;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.06rem; }
  .container { padding: 0 8px; }
  .section { padding: 32px 10px; margin-bottom: 44px; }
  .feature-grid, .step-grid, .team-overview, .article-list, .content-grid {
    flex-direction: column;
    gap: 16px;
  }
  .feature-grid > div, .step-grid > div, .team-overview > div {
    min-width: 100%;
  }
  .text-section { padding: 16px 10px; }
  .content-wrapper { padding: 0; }
  .footer-contact { font-size: 0.93rem; }
  .footer-nav { gap: 6px; }
  footer .container { gap: 10px; flex-direction: column; }
}
@media (max-width: 600px) {
  .testimonial-card { padding: 14px; }
  .footer-contact img { height: 28px; }
  .mobile-menu-close { width: 38px; height: 38px; }
  .cookie-modal { padding: 18px 8px; min-width: 94vw; }
  .cookie-buttons { gap: 6px; }
}
@media (max-width: 420px) {
  h1, h2, h3 { font-size: 1rem !important; }
  .footer-contact, .footer-nav { font-size: 0.89rem; }
  .article-list > article { padding: 12px 6px; }
}

/* ===== ACCESSIBILITY ===== */
:focus { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

/* ===== Z-INDEX & STACKING ===== */
.mobile-menu, .cookie-banner, .cookie-modal-overlay { z-index: 120; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ===== SCANDINAVIAN STYLE EXTRAS ===== */
section {
  border-radius: var(--border-radius);
  background: transparent;
  margin-bottom: 44px;
}
.text-section, .feature-grid > div, .step-grid > div, .team-overview > div, .article-list > article, .card, .testimonial-card {
  background: linear-gradient(120deg, #fff 85%, #fbfbf7 100%);
  border: 1px solid #ede9d7;
}

/* Decorative natural accent bar for h1 (Scandinavian accent) */
h1::before {
  content: '';
  display: block;
  width: 46px;
  height: 3.5px;
  background: var(--color-secondary);
  border-radius: 2px;
  margin-bottom: 15px;
}

/* ===== END ===== */
