/* ==================================================================
   CSS RESET & NORMALIZE (Mobile-first, add box-sizing for all)
   ================================================================== */
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;
  vertical-align: baseline;
  background: transparent;
  font-size: 100%;
  font: inherit;
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  scroll-behavior: smooth;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #FFFAF4;
  color: #6D4C41;
  min-height: 100vh;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: #8D6E63;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #FFC107;
}
ul, ol {
  list-style-position: inside;
  padding-left: 0;
  margin-left: 0;
}
li + li { margin-top: 12px; }
strong { font-weight: 700; }

/* ==================================================================
   TYPOGRAPHY SCALE & FONT STACK
   ================================================================== */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #6D4C41;
  margin-bottom: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
h1 { font-size: 2.4rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.subtitle {
  color: #8D6E63;
  font-size: 1.2rem;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

p,
ul,
ol {
  color: #6D4C41;
  font-size: 1rem;
  margin-bottom: 18px;
}

/* ==================================================================
   LAYOUT CONTAINERS (FLEX ONLY!)
   ================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 18px 0 rgba(141,110,99,0.06);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff8f1;
  border-radius: 18px;
  box-shadow: 0 2px 8px 0 rgba(141,110,99,0.08);
  margin-bottom: 20px;
  position: relative;
  padding: 24px 20px;
  min-width: 240px;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #fffdfa;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px 0 rgba(252,204,54,0.07), 0 1px 3px 0 rgba(141,110,99,0.02);
  border-left: 6px solid #FFC107;
}
.testimonial-card p {
  color: #6D4C41;
  font-size: 1.1rem;
  margin-bottom: 0;
  line-height: 1.5;
}
.testimonial-card span {
  color: #8D6E63;
  font-size: 1rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff8f1;
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 18px;
}

/* ==================================================================
   NAVIGATION (DESKTOP & MOBILE)
   ================================================================== */
.main-nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  padding: 16px 0;
}
.main-nav a {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #8D6E63;
  font-size: 1rem;
  border-radius: 8px;
  padding: 7px 14px;
  transition: background 0.18s, color 0.18s;
  font-weight: 500;
}
.main-nav a:hover, .main-nav a:focus {
  background: #FFF2CF;
  color: #6D4C41;
}
.primary-cta {
  background: #FFC107;
  color: #6D4C41;
  font-weight: 700;
  box-shadow: 0 2px 8px 0 rgba(255,193,7,0.05);
  border-radius: 999px;
  padding: 8px 24px;
  margin-left: auto;
  transition: background 0.2s, color 0.18s, transform 0.23s;
  font-size: 1.1rem;
}
.primary-cta:hover, .primary-cta:focus {
  background: #FFD54F;
  color: #6D4C41;
  transform: translateY(-2px) scale(1.03);
}

/* Hamburger */
.mobile-menu-toggle, .mobile-menu-close {
  background: #FFC107;
  color: #6D4C41;
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  cursor: pointer;
  position: relative;
  z-index: 1202;
  box-shadow: 0 2px 10px 0 rgba(252,193,7,0.07);
  transition: background 0.2s, color 0.18s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle:hover, .mobile-menu-close:hover {
  background: #FFD54F;
  color: #6D4C41;
}

.mobile-menu {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(252, 193, 7, 0.90);
  box-shadow: 0 2px 30px 0 rgba(141,110,99, 0.20);
  display: flex;
  flex-direction: column;
  transform: translateX(-100vw);
  transition: transform 0.36s cubic-bezier(.77,0,.18,1);
  pointer-events: none;
  overflow-y: auto;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 18px 24px 0 0;
  z-index: 1202;
  font-size: 2.4rem;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding: 32px 32px;
  margin-top: 32px;
  width: 100%;
}
.mobile-nav a {
  font-size: 1.3rem;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #6D4C41;
  font-weight: 600;
  background: none;
  border-radius: 12px;
  padding: 12px 20px;
  transition: background 0.17s, color 0.17s;
}
.mobile-nav a:active,
.mobile-nav a:hover {
  background: #FFF2CF;
  color: #8D6E63;
}

/* Hide by default */
.mobile-menu-toggle {
  display: none;
}

/* ==================================================================
   CTA BUTTONS
   ================================================================== */
.cta {
  display: inline-block;
  background: #FFC107;
  color: #6D4C41;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 10px 32px;
  border-radius: 999px;
  box-shadow: 0 2px 8px 0 rgba(255,193,7,0.07);
  border: none;
  transition: background 0.18s, color 0.18s, transform 0.17s;
  margin-top: 4px;
}
.cta:hover, .cta:focus {
  background: #FFD54F;
  color: #6D4C41;
  transform: translateY(-2px) scale(1.07);
}

/* List override for main content */
ul {
  list-style-type: disc;
  margin-left: 20px;
}
ol {
  list-style-type: decimal;
}

/* ==================================================================
   FOOTER
   ================================================================== */
footer {
  background: #8D6E63;
  color: #fff;
  padding: 38px 0 20px 0;
}
footer .container {
  max-width: 1200px;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-menu a {
  color: #FFC107;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: color 0.18s;
}
.footer-menu a:hover,
.footer-menu a:focus {
  color: #fffde7;
}
.brand-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.97rem;
  color: #FFFDE7;
}
.brand-info img {
  width: 50px; height: auto; margin-bottom: 8px;
}
.newsletter-signup {
  background: #fff8e1;
  color: #6D4C41;
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 0px;
  min-width: 260px;
  box-shadow: 0 2px 8px 0 rgba(252,193,7,0.12);
  font-size: 1rem;
}
.newsletter-signup h3 {
  color: #8D6E63;
  font-size: 1.11rem;
  margin-bottom: 10px;
}


/* ==================================================================
   RESPONSIVE DESIGN (Mobile-First)
   ================================================================== */
@media (max-width: 992px) {
  .container {
    max-width: 960px;
  }
  .content-wrapper {
    gap: 20px;
  }
  footer .content-wrapper {
    gap: 30px;
  }
}
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  .container {
    max-width: 98vw;
    padding-left: 9px;
    padding-right: 9px;
  }
  .section {
    padding: 30px 8px;
    margin-bottom: 36px;
  }
  .content-wrapper {
    gap: 16px;
  }
  .card {
    min-width: 90vw;
    padding: 18px 9px;
    border-radius: 14px;
  }
  .testimonial-card {
    padding: 14px 9px;
    border-radius: 13px;
  }
  .feature-item {
    padding: 12px 6px;
    border-radius: 10px;
  }
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex;
    position: fixed;
    right: 18px;
    top: 16px;
    z-index: 1201;
    box-shadow: 0 1px 5px rgba(255,193,7,0.08);
  }
  .mobile-menu {
    padding-top: 0;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 28px;
  }
  .brand-info {
    margin-top: 8px;
    order: 3;
  }
  .newsletter-signup {
    min-width: 0;
    width: 100%;
    margin-top: 12px;
  }
  .footer-menu {
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}
@media (max-width: 480px) {
  .section {
    padding: 16px 0 20px 0;
    border-radius: 8px;
  }
  .container {
    padding-left: 4px;
    padding-right: 4px;
  }
  .card {
    padding: 9px 2px;
    border-radius: 7px;
  }
  .testimonial-card, .feature-item {
    border-radius: 7px;
    padding: 7px 3px;
  }
}

/* ==================================================================
   COOKIE CONSENT BANNER & MODAL
   ================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: #fff8e1;
  color: #6D4C41;
  box-shadow: 0 -2px 16px 0 rgba(141,110,99, 0.10);
  z-index: 1560;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 24px 14px 18px 22px;
  gap: 18px;
  font-size: 1rem;
  animation: cookieBannerPopIn 0.45s;
}
@keyframes cookieBannerPopIn {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}
.cookie-banner button {
  background: #FFC107;
  color: #6D4C41;
  font-family: 'Montserrat','Roboto',Arial,sans-serif;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  margin-top: 6px;
  margin-bottom: 0;
  margin-right: 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.17s, color 0.14s, transform 0.18s;
  box-shadow: 0 2px 8px 0 rgba(255,193,7,0.07);
}
.cookie-banner button:hover,
.cookie-banner button:focus {
  background: #FFD54F;
  color: #5D4037;
  transform: translateY(-1px) scale(1.04);
}

/* Cookie Preferences Modal */
#cookie-modal, .cookie-modal {
  position: fixed;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(35, 28, 16, 0.32);
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.30s;
}
.cookie-modal.active {
  display: flex;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal-content {
  background: #fffdfa;
  color: #6D4C41;
  border-radius: 16px;
  box-shadow: 0 6px 32px 0 rgba(252,193,7,0.15);
  max-width: 95vw;
  width: 410px;
  padding: 36px 26px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  animation: popUpModal 0.25s;
}
@keyframes popUpModal {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cookie-categories {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 16px 0;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #EEE3C0;
}
.cookie-category:last-child {
  border-bottom: none;
}
.cookie-category label {
  font-size: 1rem;
  color: #6D4C41;
}
.cookie-locked {
  opacity: 0.6;
  pointer-events: none;
}
/* Toggle Switch for cookies */
.cookie-switch {
  width: 36px; height: 18px;
  border-radius: 15px;
  background: #ECECEC;
  display: inline-block;
  position: relative;
  transition: background 0.15s;
}
.cookie-switch input[type='checkbox'] {
  display: none;
}
.cookie-switch .slider {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #8D6E63;
  transition: left 0.15s, background 0.20s;
}
.cookie-switch input[type='checkbox']:checked + .slider {
  left: 20px;
  background: #FFC107;
}

.cookie-modal-actions {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 4px;
}
.cookie-modal-actions button {
  background: #FFC107;
  color: #6D4C41;
  border: none;
  border-radius: 999px;
  padding: 7px 20px;
  font-weight: 700;
  font-family: 'Montserrat','Roboto',Arial,sans-serif;
  font-size: 1rem;
  transition: background 0.15s;
  cursor: pointer;
  box-shadow: 0 1px 7px 0 rgba(255,193,7,0.07);
}
.cookie-modal-actions button:hover {
  background: #FFD54F;
}
.cookie-modal-closebtn {
  position: absolute;
  top: 18px; right: 22px;
  background: none;
  border: none;
  color: #6D4C41;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ==================================================================
   MISC COMPONENTS & SECTION STYLES
   ================================================================== */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fffdfa;
  border-radius: 20px;
  box-shadow: 0 2px 18px 0 rgba(141,110,99,0.07);
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  align-items: flex-start;
}

.newsletter-signup p {
  margin-bottom: 0;
  color: #6D4C41;
}

/* Links in article context */
.section a:not(.cta):not(.primary-cta) {
  color: #8D6E63;
  text-decoration: underline dotted;
  transition: color 0.14s;
}
.section a:not(.cta):not(.primary-cta):hover {
  color: #FFC107;
}

/* ================================================================== 
   UTILITIES & MICRO-INTERACTIONS
   ================================================================== */
@media (hover: hover) and (pointer: fine) {
  .card, .section, .feature-item, .testimonial-card {
    transition: box-shadow 0.18s, transform 0.17s;
  }
  .card:hover, .feature-item:hover, .testimonial-card:hover,
  .section:hover {
    box-shadow: 0 6px 32px 0 rgba(252,193,7,0.14);
    transform: translateY(-2px) scale(1.022);
  }
}

.card, .feature-item, .section, .testimonial-card {
  will-change: box-shadow, transform;
}

/* Focus visibility for accessibility */
:focus {
  outline: 2px solid #FFC107;
  outline-offset: 1.5px;
}

/* Hide visually */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ================================================================== 
   SPECIAL COMPONENTS
   ================================================================== */

/* Attribution style in testimonials */
.testimonial-card strong {
  color: #6D4C41;
  font-weight: 700;
  font-size: 1.03em;
  letter-spacing: 0.01em;
}

/* ==============================================
   ADDITIONAL: prevent overlapping, spacing, etc.
   ============================================== */
section + section, .section + .section, .card + .card, .testimonial-card + .testimonial-card, .feature-item + .feature-item {
  margin-top: 20px;
}

/* Overlap prevention for all typical blocks */
.card, .testimonial-card, .feature-item, .section {
  margin-bottom: 20px;
}

/* Ensure cards and content don't overlap in all container types */
.content-grid, .card-container {
  gap: 24px;
}

/* ================
   PRINT FRIENDLY
   ================ */
@media print {
  header, footer, nav, .cookie-banner, .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
  .section, .card, .testimonial-card, .feature-item {
    box-shadow: none;
    background: #faf6ef !important;
  }
  a { text-decoration: underline; color: #000; }
}
