/* =======================
   NATURE ORGANIC STYLE CSS
   Emerge Digi | Modern, inspiring, organic
   ======================= */

/*--------------------------------------
  RESET & BASE
--------------------------------------*/
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,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  line-height: 1.5;
  font-family: 'Roboto', Arial, sans-serif;
  color: #24342a;
  background-color: #F7FAF6;
  min-height: 100vh;
  font-size: 16px;
}
img, svg, video {
  max-width: 100%;
  display: block;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
input, textarea, select, button {
  font-family: inherit;
}

/*--------------------------------------
  COLOR VARIABLES & FONT STACKS
--------------------------------------*/
:root {
  --brand-primary: #143352; /* dark blue */
  --brand-secondary: #F8F9FA; /* light bg */
  --brand-accent: #28B18F; /* green accent */
  --organic-earth: #78644A; /* earth brown */
  --organic-stone: #bfc9b5; /* stone light */
  --organic-sand: #EDEBDC; /* sand light */
  --organic-leaf: #4B8045; /* midgreen */
  --organic-green: #28B18F; /* vibrant accent */
  --organic-bg: #F7FAF6;
  --text-dark: #24342a;

  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/*--------------------------------------
  TYPOGRAPHY
--------------------------------------*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.5px;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
h4 { font-size: 1.1rem; }
.lead {
  font-size: 1.2rem;
  color: var(--organic-earth);
  margin-bottom: 18px;
}
p, ul, ol, blockquote {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 14px;
}
blockquote {
  font-style: italic;
  border-left: 5px solid var(--organic-leaf);
  padding-left: 18px;
  color: var(--brand-primary);
  background-color: var(--organic-sand);
  border-radius: 14px;
}
ul, ol {
  margin-left: 28px;
  margin-bottom: 14px;
}
strong { font-weight: 700; }

/*--------------------------------------
  ORGANIC ELEMENTS
--------------------------------------*/
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--organic-bg);
  border-radius: 48px 24px 40px 64px/48px 60px 28px 36px;
  box-shadow: 0 4px 16px 0 rgba(72, 104, 80, 0.07);
  /* soft organic shadow */
  position: relative;
}
@media (max-width: 768px) {
  section {
    padding: 32px 10px;
    border-radius: 28px 16px 24px 36px/24px 32px 18px 18px;
  }
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.text-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

/*--------------------------------------
  FLEXBOX LAYOUTS (MANDATORY)
--------------------------------------*/
.feature-grid, .service-cards, .pricing-table, .blog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
  margin-bottom: 20px;
  align-items: stretch;
}
.feature-grid > div, .service-cards > div, .pricing-table > div, .blog-list > div, .post-card {
  flex: 1 1 260px;
  background: var(--organic-sand);
  border-radius: 22px;
  padding: 28px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px 0 rgba(72, 104, 80, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.23s, box-shadow 0.23s;
}
.pricing-table > div {
  border: 2.5px solid var(--organic-leaf);
}
.feature-grid > div:hover, .service-cards > div:hover, .post-card:hover, .pricing-table > div:hover {
  transform: translateY(-4px) scale(1.022);
  box-shadow: 0 12px 28px 0 rgba(30, 80, 60, 0.09);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--organic-sand);
  border-radius: 18px;
  box-shadow: 0 2px 8px 0 rgba(72,104,80, 0.08);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 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(--brand-secondary);
  border-radius: 24px;
  box-shadow: 0 3px 14px 0 rgba(72,104,80, 0.09);
  margin-bottom: 20px;
  width: 100%;
  flex-direction: column;
  min-width: 230px;
  border: 1.5px solid var(--organic-leaf);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/*--------------------------------------
  SPECIAL COMPONENTS: CTA
--------------------------------------*/
.cta-banner {
  background: var(--brand-accent);
  color: #fff;
  border-radius: 40px 18px 40px 36px/36px 22px 36px 40px;
  padding: 38px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  box-shadow: 0 4px 28px 0 rgba(40,177,143,0.13);
  margin-bottom: 16px;
}
.cta-banner h2,
.cta-banner h1 {
  color: #fff;
  margin-bottom: 14px;
}
.cta-banner p { color: #f4fff8; }

/*--------------------------------------
  HEADER & NAVIGATION
--------------------------------------*/
header {
  background: var(--organic-bg);
  border-bottom: 1.5px solid var(--organic-stone);
  box-shadow: 0 3px 8px 1px rgba(56, 84, 60, 0.05);
  position: relative;
  z-index: 30;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.logo img { height: 42px; width: auto; }
.main-nav ul {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 22px;
  align-items: center;
}
.main-nav ul li a,
.footer-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--brand-primary);
  font-weight: 600;
  border-radius: 12px;
  padding: 7px 13px;
  transition: background 0.17s, color 0.19s;
}
.main-nav ul li a:hover,
.footer-nav a:hover {
  background: var(--organic-leaf);
  color: #fff;
}
.main-nav .button.primary {
  margin-left: 10px; /* override, important for alignment */
}

/* Hamburger Menu Button */
.mobile-menu-toggle {
  display: none;
  background: var(--brand-accent);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.19s, transform 0.19s;
  margin-left: 12px;
  z-index: 52;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--organic-leaf);
  transform: scale(1.08);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,51,82,0.97);
  color: #fff;
  z-index: 1002;
  transform: translateX(-100%);
  transition: transform 0.34s cubic-bezier(.65,.01,.26,1.04);
  display: flex;
  flex-direction: column;
  padding: 26px 22px 22px 26px;
  width: 100vw;
  max-width: 100vw;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 700;
  align-self: flex-end;
  cursor: pointer;
  margin-bottom: 16px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  margin-top: 18px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  padding: 11px 0;
  width: 100%;
  border-radius: 6px;
  transition: background .18s, color .18s;
}
.mobile-nav a:hover {
  background: var(--brand-accent);
  color: #fff;
}

/* Show/hide: responsive */
@media (max-width: 990px) {
  .main-nav ul { display: none; }
  .main-nav .button.primary { display: none; }
  .mobile-menu-toggle { display: inline-block; }
}
@media (min-width: 991px) {
  .mobile-menu,
  .mobile-menu-toggle { display: none !important; }
}

/*--------------------------------------
  BUTTONS
--------------------------------------*/
.button, button, input[type="submit"] {
  display: inline-block;
  font-family: var(--font-display);
  background: var(--organic-leaf);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 20px 50px 40px 18px/32px 18px 24px 32px;
  padding: 14px 34px;
  margin-top: 8px;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 12px 0 rgba(40,177,143,0.13);
  transition: background 0.17s, color 0.17s, box-shadow 0.18s, transform 0.17s;
}
.button.primary {
  background: var(--brand-accent);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px 0 rgba(40,177,143,0.16);
}
.button.primary:hover, .button.primary:focus {
  background: var(--organic-leaf);
  color: #fff;
  transform: scale(1.04);
}
.button:hover, button:hover, input[type="submit"]:hover {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 10px 32px 0 rgba(20,51,82,0.10);
  transform: translateY(-2px) scale(1.02);
}
.button:active,
button:active { transform: scale(0.98); }

/*--------------------------------------
  SPECIAL BADGES
--------------------------------------*/
.best-value-badge {
  display: inline-block;
  background: var(--organic-leaf);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 5px 17px;
  border-radius: 25px 6px 15px 22px/10px 15px 18px 12px;
  margin-top: 12px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 4px 0 rgba(56,104,90,.11);
}

/*--------------------------------------
  BLOG/POSTS
--------------------------------------*/
.blog-list {
  gap: 24px;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.post-card {
  flex: 1 1 260px;
  background: var(--organic-sand);
  border-radius: 18px;
  box-shadow: 0 2px 12px 0 rgba(110,120,109,0.08);
  padding: 22px 16px 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 230px;
}
.read-more {
  color: var(--brand-accent);
  font-weight: 600;
  transition: color 0.18s;
}
.read-more:hover { color: var(--organic-leaf); }

.categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--organic-earth);
  margin: 8px 0 0 0;
}
.categories-nav a {
  color: var(--brand-primary);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 7px;
  transition: background 0.17s, color 0.15s;
}
.categories-nav a:hover {
  background: var(--brand-accent);
  color: #fff;
}

/*--------------------------------------
  FOOTER
--------------------------------------*/
footer {
  background: var(--organic-earth);
  color: #fff;
  border-radius: 40px 24px 0 0/48px 32px 0px 0;
  box-shadow: 0 -2px 18px 0 rgba(72,104,80,0.07);
  padding: 36px 0 30px 0;
  margin-top: 34px;
}
.footer-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
  justify-content: center;
}
.footer-nav a {
  color: #fff;
  background: transparent;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 10px;
  transition: background 0.18s, color 0.18s;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
}
.footer-brand img { height: 32px; width: auto; border-radius: 7px; }

/*--------------------------------------
  COOKIE CONSENT BANNER
--------------------------------------*/
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: #fffbe5;
  color: var(--brand-primary);
  box-shadow: 0 -2px 18px 0 rgba(40, 65, 55, 0.19);
  border-top: 2px solid var(--organic-sand);
  padding: 22px 16px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  align-items: flex-start;
  min-width: 0;
  animation: cookieDrop 0.89s cubic-bezier(.19,1,.22,1);
}
@keyframes cookieDrop {
  0% { transform: translateY(80px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cookie-banner button {
  background: var(--organic-leaf);
  color: #fff;
  border: none;
  padding: 8px 22px;
  font-size: 1em;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 14px 38px 24px 12px/17px 12px 22px 14px;
  transition: background 0.16s, color 0.13s;
  cursor: pointer;
}
.cookie-banner button.reject {
  background: #fff;
  color: var(--organic-leaf);
  border: 1px solid var(--organic-leaf);
}
.cookie-banner button.settings {
  background: var(--brand-primary);
  color: #fff;
}
.cookie-banner button:hover,
.cookie-banner button:focus {
  background: var(--brand-accent);
  color: #fff;
}
.cookie-banner button.settings:hover {
  background: var(--organic-stone);
  color: var(--brand-primary);
}

/* COOKIE PREFERENCES MODAL */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-52%) scale(0.98);
  z-index: 12000;
  background: #fff;
  color: var(--brand-primary);
  border-radius: 28px 36px 20px 28px/32px 24px 18px 28px;
  min-width: 330px;
  max-width: 98vw;
  box-shadow: 0 10px 64px 8px rgba(34,56,41,0.14);
  padding: 38px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 1;
  transition: opacity 0.25s, transform 0.25s;
  animation: modalIn 0.4s cubic-bezier(.44,1.7,.84,1) both;
}
@keyframes modalIn {
  0% { opacity: 0; transform: translate(-50%,-62%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%,-52%) scale(0.98); }
}
.cookie-modal .modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--brand-primary);
}
.cookie-modal .modal-section {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cookie-modal .switch {
  appearance: none;
  width: 46px;
  height: 23px;
  border-radius: 18px;
  background: var(--organic-stone);
  transition: background 0.2s;
  position: relative;
  cursor: pointer;
  outline: none;
}
.cookie-modal .switch:checked {
  background: var(--brand-accent);
}
.cookie-modal .switch::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px 0 rgba(34,56,41,0.14);
  position: absolute;
  top: 1.5px;
  left: 3px;
  transition: left 0.16s;
}
.cookie-modal .switch:checked::after {
  left: 24px;
}
.cookie-modal .modal-btns {
  display: flex;
  gap: 15px;
  margin-top: 6px;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 1.3rem;
  color: var(--organic-leaf);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.cookie-modal .close-modal:hover {
  color: var(--brand-accent);
}

/* Hide modal/banner with `.hide` class */
.cookie-banner.hide,
.cookie-modal.hide {
  display: none !important;
  opacity: 0;
}

/*--------------------------------------
  RESPONSIVE DESIGN
--------------------------------------*/
@media (max-width: 1100px) {
  .container { max-width: 98vw; }
  .content-wrapper { gap: 16px; }
}
@media (max-width: 900px) {
  .feature-grid > div,
  .service-cards > div,
  .pricing-table > div,
  .blog-list > div,
  .post-card {
    flex: 1 1 390px;
    min-width: 180px;
  }
}
@media (max-width: 768px) {
  .feature-grid, .service-cards, .pricing-table, .blog-list, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .feature-grid > div, .service-cards > div, .pricing-table > div {
    min-width: 0;
    padding: 18px 10px;
    font-size: 1rem;
  }
  .cta-banner {
    padding: 22px 10px;
    border-radius: 27px 17px 20px 18px/18px 11px 18px 20px;
  }
  .content-wrapper,
  .container {
    padding: 0 8px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
  }
  .footer-brand {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}
@media (max-width: 414px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.07rem; }
  .cookie-modal, .cookie-banner {
    min-width: 0;
    width: 96vw;
    padding-left: 5vw; padding-right: 5vw;
  }
}

/*--------------------------------------
  FORMS (Future-proof for contact)
--------------------------------------*/
input, textarea, select {
  padding: 10px 14px;
  border: 1.5px solid var(--organic-stone);
  border-radius: 15px 22px 20px 18px/12px 16px 18px 14px;
  background: #fff;
  color: var(--brand-primary);
  font-size: 1em;
  margin-bottom: 16px;
  transition: border 0.16s;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand-accent);
  border: 1.5px solid var(--brand-accent);
}

/*--------------------------------------
  ACCESSIBILITY: HIGH CONTRAST FOR CARDS
--------------------------------------*/
.testimonial-card {
  background: #fff;
  color: var(--brand-primary);
  border: 2px solid var(--organic-stone);
}
.testimonial-card blockquote {
  color: var(--brand-primary);
  background: var(--organic-sand);
  border-radius: 12px;
}
.testimonial-card footer {
  color: #4B8045; /* green */
  font-weight: 600;
  font-size: 1rem;
  margin-top: 7px;
}

/* Critical: Ensure text on testimonial/review backgrounds is always dark/high contrast */

/*--------------------------------------
  MISC CLASSES (spacing, etc)
--------------------------------------*/
.m-0 { margin: 0; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-20 { margin-bottom: 20px; }

/*--------------------------------------
  ANIMATIONS & INTERACTIONS
--------------------------------------*/
.button, .cta-banner, .card, .feature-grid > div, .service-cards > div {
  transition: box-shadow 0.19s, transform 0.19s, background 0.14s, color 0.15s;
}
section, .feature-grid > div, .card, .post-card, .testimonial-card, .pricing-table > div {
  will-change: transform, box-shadow, opacity;
}
.button:focus-visible, .button.primary:focus-visible {
  outline: 2.5px dashed var(--brand-accent);
  outline-offset: 2px;
}

/*--------------------------------------
  ORGANIC TEXTURES (SUBTLE)
--------------------------------------*/
section {
  background-image: url('../assets/organic-bg.png'), linear-gradient(107deg, #F7FAF6 60%, #EDEBDC 100%);
  background-size: 360px 260px, cover;
  background-position: top right, center;
  background-repeat: no-repeat, no-repeat;
}

/* If .card-texture is used in HTML in the future */
.card.card-texture {
  background-image: url('../assets/texture-fiber.png');
  background-blend-mode: multiply;
}

/*--------------------------------------
  UTILITIES
--------------------------------------*/
.hide { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/*--------------------------------------------------------------
  END: Nature/Organic Brand CSS for Emerge Digi
--------------------------------------------------------------*/