/* ========================
   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,
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;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
button, input, select, textarea {
  font: inherit;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
}

/* ========================
   Custom Properties (with fallbacks)
  ======================== */
:root {
  --color-primary: #233038;
  --color-primary-rgb: 35, 48, 56;
  --color-secondary: #8B6942;
  --color-accent: #F0EFEA;
  --color-white: #fff;
  --color-black: #0e1012;
  --color-gray: #e2e2e2;
  --color-neutral: #f6f6f4;
  --shadow-elevate: 0 3px 24px rgba(35,48,56,0.09);
  --shadow-card: 0 2px 16px rgba(35,48,56,0.10);
  --shadow-gold: 0 1px 24px rgba(139,105,66,0.10);
  --border-radius: 22px;
  --border-radius-small: 10px;
  --font-display: 'Oswald', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* ========================
   Typography & Body Setup
  ======================== */
body {
  font-family: var(--font-body, Roboto, Arial, sans-serif);
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 400;
  min-height: 100vh;
  scroll-behavior: smooth;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display, Oswald, Arial, sans-serif);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}
h1 {
  font-size: 2.75rem;
  letter-spacing: 0.04em;
}
h2 {
  font-size: 2rem;
  letter-spacing: 0.03em;
}
h3 {
  font-size: 1.3rem;
}
h4, h5, h6 {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}
p, .subheadline, ul, ol {
  font-size: 1rem;
  color: var(--color-primary);
}
.subheadline {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 24px;
  color: var(--color-secondary);
  letter-spacing: 0.01em;
}

strong, b {
  color: var(--color-secondary);
  font-weight: 700;
}

/* ===========================
   Layout Containers & Sections
   (critical flexbox layouts)
  =========================== */
.container {
  width: 100%;
  max-width: 1080px;
  padding: 0 20px;
  margin: 0 auto;
  box-sizing: border-box;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* CRITICAL: Required Spacing Patterns */
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: var(--border-radius-small);
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  position: relative;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  background: var(--color-white);
  padding: 32px 28px;
  transition: box-shadow 0.23s;
}
.card:hover {
  box-shadow: 0 4px 32px 0 rgba(139, 105, 66, 0.11), var(--shadow-elevate);
}
.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;
  margin-bottom: 20px;
  background: var(--color-white);
  box-shadow: var(--shadow-gold);
  border-radius: var(--border-radius);
  border: 1.5px solid var(--color-neutral);
  transition: box-shadow 0.23s, border 0.23s;
}
.testimonial-card:hover {
  box-shadow: 0 8px 32px 0 rgba(35,48,56,0.13);
  border-color: var(--color-secondary);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ===========
   NAVIGATION
  =========== */
header {
  background: var(--color-white);
  box-shadow: 0 2px 16px rgba(35, 48, 56, 0.05);
  z-index: 100;
  position: relative;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-primary);
  transition: color 0.18s;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
}
.btn-primary {
  background: var(--color-secondary);
  color: var(--color-accent);
  border-radius: 25px;
  padding: 12px 34px;
  font-size: 1.08rem;
  font-family: var(--font-display);
  font-weight: 700;
  border: none;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-gold);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: inline-block;
  margin-left: 8px;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-primary);
  color: var(--color-secondary);
  box-shadow: 0 6px 24px rgba(139,105,66,0.16);
}

/* ===============
   HERO SECTION
  =============== */
.hero-section {
  background: var(--color-primary);
  background-position: center;
  background-size: cover;
  color: var(--color-accent);
  border-radius: var(--border-radius);
  margin-bottom: 60px;
  box-shadow: var(--shadow-elevate);
}
.hero-section .container {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-section .content-wrapper {
  align-items: flex-start;
  max-width: 650px;
  gap: 30px;
}
.hero-section h1, .hero-section .subheadline, .hero-section a.btn-primary {
  color: var(--color-accent);
}
.hero-section .btn-primary {
  background: var(--color-secondary);
  color: var(--color-white);
  box-shadow: 0 3px 24px rgba(139,105,66,0.08);
}
.hero-section .btn-primary:hover, .hero-section .btn-primary:focus {
  background: var(--color-white);
  color: var(--color-secondary);
}

/* ==================
   FEATURES SECTION
  ================== */
.features-section {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
}
.features-section .feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
  margin-top: 30px;
}
.features-section .feature-grid li {
  background: var(--color-accent);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 8px rgba(35, 48, 56, 0.07);
  padding: 32px 22px 26px 22px;
  flex: 1 1 210px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--color-gray);
  transition: border 0.2s, box-shadow 0.2s;
}
.features-section .feature-grid li:hover {
  border: 1.5px solid var(--color-secondary);
  box-shadow: 0 3px 12px rgba(139,105,66,0.11);
  background: #f6f3ee;
}
.features-section .feature-grid img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.features-section .feature-grid h3 {
  color: var(--color-primary);
  font-family: var(--font-display);
}

/* ==================
   TESTIMONIALS SECTION
  ================== */
.testimonials-section {
  background: none;
  margin-bottom: 60px;
}
.testimonials-section .content-wrapper {
  gap: 32px;
}
.testimonial-card {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-gold), var(--shadow-card);
  border-left: 5px solid var(--color-secondary);
  padding: 30px 32px 28px 26px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--border-radius);
  min-width: 0;
}
.testimonial-rating {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-bottom: 4px;
}
.testimonial-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-secondary);
  font-size: 1.02rem;
  margin-top: 10px;
}
.testimonial-card p {
  font-size: 1.07rem;
  color: var(--color-primary);
  font-style: italic;
}

/* CTA SECTION */
.cta-section {
  background: var(--color-secondary);
  color: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-gold);
  margin-bottom: 60px;
  text-align: center;
}
.cta-section h2, .cta-section p {
  color: var(--color-white);
}
.cta-section .btn-primary {
  background: var(--color-white);
  color: var(--color-secondary);
  border: 2px solid var(--color-white);
  font-weight: 700;
  font-family: var(--font-display);
  margin-top: 22px;
}
.cta-section .btn-primary:hover,
.cta-section .btn-primary:focus {
  background: var(--color-secondary);
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

/* ============
   TEXT SECTIONS
  ============ */
.text-section {
  max-width: 720px;
  margin: 0 auto 0 auto;
}
.text-section ul, .text-section ol {
  margin-left: 16px;
  margin-bottom: 20px;
  list-style-type: disc;
  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1.7;
  padding-inline-start: 18px;
}
.text-section ul li, .text-section ol li {
  margin-bottom: 7px;
  padding-left: 2px;
}
.text-section a {
  color: var(--color-secondary);
  text-decoration: underline;
}

.text-section table {
  width: 100%;
  background: var(--color-white);
  border-radius: 13px;
  box-shadow: var(--shadow-card);
  border-collapse: collapse;
  margin-bottom: 28px;
  overflow: hidden;
  font-size: 1rem;
}
.text-section table thead tr {
  background: var(--color-secondary);
  color: var(--color-accent);
  font-family: var(--font-display);
}
.text-section th, .text-section td {
  padding: 14px 19px;
  text-align: left;
  border-bottom: 1px solid #ede8e0;
}
.text-section th {
  font-weight: 700;
  letter-spacing: 0.03em;
}
.text-section td {
  font-family: var(--font-body);
}
.text-section tbody tr:last-child td {
  border-bottom: none;
}

/* Contact Details */
.contact-details ul {
  margin-top: 8px;
  margin-bottom: 16px;
  padding-inline-start: 0;
  list-style: none;
}
.contact-details li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.08rem;
  color: var(--color-primary);
}
.contact-details img {
  width: 24px;
  height: 24px;
}
.contact-info {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}
.contact-info span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

/* Contact map placeholder */
.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: #eaeaea;
  color: var(--color-primary);
  border-radius: var(--border-radius-small);
  font-style: italic;
  font-size: 1.04rem;
}

/* CONDITIONAL SPACING BETWEEN SECTIONS */
section + section {
  margin-top: 0;
}
.content-wrapper + .content-wrapper {
  margin-top: 24px;
}

/* ===================
   FOOTER
  =================== */
footer {
  background: var(--color-primary);
  color: var(--color-accent);
  padding: 40px 0 28px 0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  margin-top: 70px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}
.footer-nav {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--color-accent);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-size: 1.05rem;
  transition: color 0.16s, border-bottom 0.16s;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 1px;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-secondary);
  border-bottom: 1.5px solid var(--color-secondary);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 1rem;
  color: var(--color-accent);
}
.footer-contact img {
  width: 20px;
  margin-right: 6px;
}
.footer-logo {
  margin-top: 18px;
}
.footer-logo img {
  max-width: 80px;
  filter: brightness(1.2);
}

/* ================================
   MOBILE & BURGER MENU NAVIGATION
  ================================ */
.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: 2rem;
  border-radius: 12px;
  border: none;
  padding: 8px 18px;
  margin-left: auto;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  z-index: 202;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-primary);
  color: var(--color-secondary);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(35,48,56,0.97);
  color: var(--color-accent);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.7,.3,.23,1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  margin: 26px 14px 10px 22px;
  font-size: 2rem;
  color: var(--color-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.17s;
  align-self: flex-end;
  z-index: 202;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-white);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  margin-top: 15px;
  align-items: flex-start;
  padding-left: 28px;
}
.mobile-nav a {
  font-size: 1.5rem;
  color: var(--color-accent);
  padding: 9px 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1.5px solid transparent;
  transition: color 0.16s, border-bottom 0.16s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-secondary);
  border-bottom: 1.5px solid var(--color-secondary);
}

/* ===============
   COOKIE BANNER
  =============== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-primary);
  color: var(--color-white);
  z-index: 250;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 28px 20px 23px 33px;
  box-shadow: 0 -2px 16px rgba(35,48,56,0.15);
  gap: 18px;
  border-radius: 22px 22px 0 0;
  animation: slideUpBanner 0.55s cubic-bezier(.6,.2,.2,1);
  font-size: 1rem;
}
@keyframes slideUpBanner {
  0% { transform: translateY(100%); opacity: 0; }
  80% { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  flex: 1 1 240px;
  font-size: 1rem;
}
.cookie-banner-buttons {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
}
.cookie-btn {
  background: var(--color-secondary);
  color: var(--color-white);
  border-radius: 22px;
  font-weight: 700;
  font-family: var(--font-display);
  border: none;
  font-size: 1rem;
  padding: 10px 31px;
  margin-right: 0px;
  transition: background 0.18s, color 0.18s, box-shadow 0.13s;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
}
.cookie-btn.cookie-settings {
  background: var(--color-primary);
  color: var(--color-secondary);
  border: 1.5px solid var(--color-secondary);
  padding: 10px 24px;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
/* ========================
   COOKIE SETTINGS MODAL
  ======================== */
.cookie-modal-overlay {
  position: fixed;
  z-index: 251;
  inset: 0;
  background: rgba(35,48,56,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInModal 0.3s cubic-bezier(.6,.2,.2,1);
}
@keyframes fadeInModal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.cookie-modal {
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 16px;
  padding: 44px 32px 36px 32px;
  box-shadow: 0 8px 40px rgba(35,48,56,0.12);
  min-width: 300px;
  max-width: 92vw;
  width: 410px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}
.cookie-modal h3 {
  margin-bottom: 8px;
  color: var(--color-secondary);
}
.cookie-modal-category {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  border-radius: 9px;
  background: #faf7f2;
  padding: 13px 10px 13px 18px;
}
.cookie-category-label {
  flex: 1 1 100px;
  font-size: 1rem;
  color: var(--color-primary);
}
.cookie-toggle {
  width: 45px;
  height: 26px;
  border-radius: 18px;
  background: #e6e4de;
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
  margin-right: 12px;
  cursor: pointer;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-toggle::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-secondary);
  position: absolute;
  left: 3px;
  top: 2px;
  transition: left 0.18s;
}
.cookie-toggle input:checked + span::before {
  background: var(--color-secondary);
  left: 21px;
}
.cookie-toggle[data-checked='true']::before {
  left: 21px;
}
/* For essential = always enabled */
.cookie-toggle[aria-disabled='true'] {
  background: #eee6d4;
  cursor: not-allowed;
  opacity: 0.7;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
}
.cookie-modal-close {
  background: none;
  border: none;
  color: var(--color-secondary);
  font-size: 1.5rem;
  position: absolute;
  top: 14px;
  right: 20px;
  cursor: pointer;
  transition: color 0.13s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-primary);
}

/* =====================
   GENERAL UI ELEMENTS 
  ===================== */
::-webkit-scrollbar {
  width: 9px;
  background: var(--color-neutral);
}
::-webkit-scrollbar-thumb {
  background: #ccb393;
  border-radius: 8px;
}

input, textarea, select {
  background: var(--color-accent);
  border: 1.5px solid var(--color-gray);
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 1rem;
  transition: border 0.16s;
  color: var(--color-primary);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-secondary);
}
label {
  font-size: 1rem;
  font-family: var(--font-display);
  color: var(--color-primary);
  display: block;
  margin-bottom: 5px;
}

/* Hover for links */
a {
  transition: color 0.16s;
}
a:hover, a:focus {
  color: var(--color-secondary);
}

/* ================
   MEDIA QUERIES: RESPONSIVE
  ================ */
@media (max-width: 1100px) {
  .container {
    max-width: 96vw;
    padding: 0 7vw;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 100vw;
    padding: 0 6vw;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.45rem; }
  .section, section {
    padding: 28px 7vw;
    margin-bottom: 45px;
  }
  .hero-section .container {
    min-height: 320px;
  }
  .features-section .feature-grid {
    flex-direction: column;
    gap: 26px;
  }
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block !important;
  }
  .footer-nav {
    flex-direction: column;
    gap: 5px;
    margin-bottom: 18px;
  }
  .footer-contact {
    font-size: 0.97rem;
  }
}
@media (max-width: 600px) {
  .container {
    padding: 0 12px;
  }
  .section, section {
    padding: 18px 6px 22px 6px;
    margin-bottom: 28px;
  }
  .content-wrapper, .content-grid {
    gap: 14px;
  }
  .footer-logo {
    margin-top: 11px;
  }
  .footer-logo img {
    max-width: 60px;
  }
  .card {
    padding: 22px 12px;
  }
}
@media (max-width: 900px) {
  .text-image-section, .content-grid, .features, .card-container {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 17px !important;
  }
}
@media (max-width: 540px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px 0;
    padding: 17px 9px 15px 14px;
    font-size: 0.95rem;
  }
  .cookie-banner p {
    font-size: 0.98rem;
    margin-bottom: 9px;
  }
  .cookie-banner-buttons {
    flex-direction: column;
    gap: 9px;
    align-items: stretch;
  }
  .cookie-btn {
    width: 100%;
    min-width: 100px;
    padding: 10px 8px;
  }
  .cookie-modal {
    padding: 18px 5vw 21px 5vw;
    min-width: 0;
    width: 90vw;
  }
}

/* ===============
   PRINT STYLES
  =============== */
@media print {
  header, footer, .hero-section, .mobile-menu, .cookie-banner, .cookie-modal-overlay {
    display: none !important;
  }
  body {
    background: #fff;
    color: #222;
  }
  .container {
    max-width: 100vw;
    padding: 0 8px;
  }
  .section, section {
    background: #fff;
    padding: 0;
  }
}
