/* ============================================================
   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,
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;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #FFF7EE;
  color: #1D3557;
  font-family: 'Open Sans', Arial, sans-serif;
  min-height: 100vh;
  font-size: 16px;
}
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
ul, ol {
  list-style-position: inside;
  padding-left: 0;
  margin-left: 0;
  margin-bottom: 1.5em;
}
a {
  color: #1D3557;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus, a:hover {
  color: #E77E16;
  text-decoration: underline;
  outline: none;
}
strong { font-weight: 700; }

/* ============================================================
   Brand Colors / CSS Custom Properties
   ============================================================ */
:root {
  --primary: #1D3557;
  --secondary: #A8DADC;
  --accent: #F6C453;
  --bg: #FFF7EE;
  --shadow: rgba(40,34,25,0.09);
  --shadow-md: 0 4px 24px rgba(66, 51, 1, 0.13);
  --border-radius: 18px;
  --border-radius-sm: 10px;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --error: #E77E16;
}

/* ============================================================
   Typography & Headings
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.66em;
  letter-spacing: 0.04em;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-top: 0.2em;
}
h2 {
  font-size: 2rem;
  margin-top: 0.5em;
}
h3 {
  font-size: 1.4rem;
  margin-top: 0.75em;
}
h4 {
  font-size: 1.15rem;
  margin-top: 1em;
}
p, ul, ol, blockquote {
  font-size: 1rem;
  font-family: var(--font-body);
  color: #492f0f;
  line-height: 1.7;
  margin-bottom: 1.1em;
}
blockquote {
  background: #FAE2BF;
  padding: 20px 28px;
  border-radius: var(--border-radius-sm);
  color: #855C1D;
  font-style: italic;
  margin-bottom: 1em;
  box-shadow: 0 4px 16px rgba(234,193,108,0.11);
}
ul li, ol li {
  margin-bottom: 0.66em;
  font-family: var(--font-body);
  color: #492f0f;
}

/* Typography hierarchy adjustments for mobile */
@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.07rem; }
  h4 { font-size: 1rem; }
  p, ul, ol, blockquote { font-size: 0.97rem; }
}

/* ============================================================
   Layout Containers / Spacing Patterns
   ============================================================ */
.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}
main {
  flex: 1;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: var(--border-radius);
  position: relative;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

/* Card & Cards Container Patterns */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow 0.18s;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(246,196,83,0.28), 0 1.5px 6px rgba(29,53,87,0.11);
}

.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: #FFF7EE;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

/* Responsive Layout Patterns */
@media (max-width: 1024px) {
  .container { max-width: 96vw; }
  .feature-grid, .content-grid {
    flex-direction: column;
    gap: 20px;
  }
}
@media (max-width: 768px) {
  .section { padding: 32px 8px; }
  .feature-grid, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
}

/* Card Styling on Feature Grid */
.feature-grid > div {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 24px 18px 20px 18px;
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.14s;
}
.feature-grid > div img {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
}
.feature-grid > div:hover {
  box-shadow: 0 6px 18px rgba(246, 196, 83, 0.27), 0 1.5px 6px rgba(29,53,87,0.09);
}

/* ============================================================
   Global Buttons
   ============================================================ */
.button {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #492808;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 1.12rem;
  padding: 12px 32px;
  border-radius: 40px;
  box-shadow: 0 2px 12px rgba(246,196,83,0.13);
  cursor: pointer;
  margin: 0.55em 0 0.4em 0;
  outline: none;
  transition: background 0.13s, color 0.18s, box-shadow 0.19s, transform 0.14s;
}
.button.primary {
  background: var(--accent);
  color: #492808;
}
.button.primary:hover, .button.primary:focus {
  background: #facf6b;
  color: #1D3557;
  box-shadow: 0 2px 16px rgba(246,196,83,0.29);
  transform: translateY(-2px) scale(1.04);
}
.button.secondary {
  background: var(--secondary);
  color: var(--primary);
}
.button.secondary:hover, .button.secondary:focus {
  background: #C1E5EC;
  color: #E77E16;
}
.button:active {
  transform: scale(0.98);
}

/* Focus visible for accessibility */
.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
}

/* ============================================================
   Header & Navigation
   ============================================================ */
header {
  background: #FDF6ED;
  box-shadow: 0 4px 16px rgba(246,196,83,0.03);
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  margin-bottom: 0;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
header img {
  height: 52px;
  border-radius: var(--border-radius-sm);
  margin-right: 16px;
}
header nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}
header nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  color: var(--primary);
  padding: 6px 12px;
  transition: background 0.1s, color 0.15s, border-radius 0.075s;
  border-radius: 12px;
}
header nav a:hover, header nav a:focus {
  background: var(--accent);
  color: #492808;
}

/* Show call-to-action button next to menu */
header .button.primary {
  margin-left: 16px;
  box-shadow: 0 1.5px 9px rgba(246,196,83,0.12);
}

/* Burger Menu */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: #492808;
  border: none;
  border-radius: 60px;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(246,196,83,0.12);
  margin-left: 12px;
  transition: background 0.13s, transform 0.12s;
  z-index: 151;
}
.mobile-menu-toggle:active {
  background: #facf6b;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #FFF7EE;
  z-index: 150;
  transform: translateX(-120vw);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(.83,.11,.16,1.07), opacity 0.3s;
  box-shadow: 0 15px 48px rgba(246,196,83,0.16);
  padding: 0 28px;
  justify-content: flex-start;
}
.mobile-menu.open {
  transform: translateX(0vw);
  opacity: 1;
}
.mobile-menu-close {
  align-self: flex-end;
  background: var(--accent);
  color: #492808;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  margin: 16px 0 6px 0;
  cursor: pointer;
  transition: background 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #facf6b;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 16px;
  gap: 18px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--primary);
  padding: 10px 12px;
  background: transparent;
  border-radius: 15px;
  width: 100%;
  transition: background 0.13s, color 0.15s;
}
.mobile-nav a:active, .mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--accent);
  color: #492808;
}
@media (max-width:1024px) {
  header .container nav {
    gap: 11px;
  }
}
@media (max-width: 900px) {
  header .container nav, header .container .button.primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (max-width: 450px) {
  .mobile-nav a { font-size: 1.016rem; }
  .mobile-menu-close, .mobile-menu-toggle { width: 38px; height: 38px; font-size: 1.6rem; }
}
/* Hide desktop nav, show burger on mobile */

/* ============================================================
   Main Section & Flex Utilities
   ============================================================ */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
/* ------------------------------------------
   Visual Hierarchy, Shadows & Rounding
   ------------------------------------------ */
section, .card, .feature-grid > div, .testimonial-card {
  border-radius: var(--border-radius);
  box-shadow: 0 2.5px 13px var(--shadow);
  background: white;
}
/* Alternate backgrounds for testimonials */
.testimonial-card {
  background: #FAE2BF;
  color: #263238;
  box-shadow: 0 4px 24px rgba(209,168,71,0.13);
  border: 1.5px solid #F6C453;
}
.testimonial-card blockquote {
  background: none;
  color: #855C1D;
  box-shadow: none;
  padding: 0;
  margin: 0 0 0.4em 0;
}
.testimonial-card div {
  font-family: var(--font-display);
  font-size: 0.97em;
  color: #2b2b2b;
  opacity: 0.84;
  margin-bottom: 0;
}
/* Ensure testimonial text is readable */

/* ============================================================
   Footer Styles
   ============================================================ */
footer {
  background: #FAE2BF;
  color: #262017;
  padding: 38px 0 0 0;
  margin-top: 60px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  box-shadow: 0 -2.5px 16px var(--shadow);
  font-size: 1rem;
}
footer .container {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 24px;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 18px;
  margin-bottom: 10px;
}
footer nav a {
  color: var(--primary);
  font-size: 0.98rem;
  border-radius: 12px;
  padding: 6px 10px;
}
footer nav a:focus, footer nav a:hover {
  background: var(--accent);
  color: #492808;
  outline: none;
}
footer .text-section {
  font-family: var(--font-body);
  color: #665930;
  font-size: 0.97rem;
  line-height: 1.6;
  opacity: 0.95;
}
@media (max-width: 600px) {
  footer nav {
    flex-direction: column;
    gap: 11px;
  }
}

/* ============================================================
   Cookie Consent Banner & Modal
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: #FFF7EE;
  border-top: 2px solid #F6C453;
  box-shadow: 0 -3px 14px 0px rgba(246,196,83,0.14);
  padding: 24px 22px;
  z-index: 9999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: transform 0.28s cubic-bezier(.83,.11,.16,1.07), opacity 0.24s;
}
.cookie-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}
.cookie-banner__text {
  flex: 2;
  color: #5d3d13;
}
.cookie-banner__actions {
  display: flex;
  gap: 14px;
}
.cookie-banner .button {
  min-width: 138px;
  padding: 10px 20px;
  font-size: 1рем;
}
.cookie-banner .button.secondary {
  background: #A8DADC;
  color: #1D3557;
}
.cookie-banner .button.secondary:hover {
  background: #C1E5EC;
  color: #E77E16;
}

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 8px;
  }
  .cookie-banner__actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}

/* ----------- Cookie Modal ------------- */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(54,37,12,0.21);
  align-items: center;
  justify-content: center;
}
.cookie-modal-overlay.active {
  display: flex;
}
.cookie-modal {
  background: #FFF7EE;
  padding: 32px 24px 24px 24px;
  border-radius: var(--border-radius);
  min-width: 328px;
  max-width: 97vw;
  box-shadow: 0 2px 28px rgba(246,196,83,0.29), 0 1.5px 7px rgba(29,53,87,0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: fadeinModal 0.25s ease;
}
@keyframes fadeinModal {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
.cookie-modal__title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 6px;
}
.cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #F6C453;
  font-size: 1.05rem;
}
.cookie-category:last-child {
  border-bottom: none;
}
.cookie-category label {
  flex: 1;
  color: #695013;
}
/* Essential cookies toggle always disabled */
.cookie-category input[type=checkbox][disabled] + span {
  color: #A6A4A0;
}
/* Style custom toggles */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.cookie-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.cookie-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #E2C98B;
  border-radius: 12px;
  transition: background .2s;
}
.cookie-switch input:checked + .cookie-slider {
  background: #A8DADC;
}
.cookie-slider:before {
  content: "";
  position: absolute;
  left: 3px; top: 2px;
  width: 15px; height: 15px;
  background: #FFF;
  border-radius: 50%;
  transition: transform .18s, background .16s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(16px);
  background: #A8DADC;
  border: 1px solid #1D3557;
}

.cookie-modal__actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
  margin-top: 14px;
}
.cookie-modal .button {
  min-width: 120px;
  padding: 9px 18px;
}
.cookie-modal__close {
  position: absolute;
  top: 16px; right: 18px;
  background: var(--accent);
  color: #492808;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: #facf6b;
}

@media (max-width: 530px) {
  .cookie-modal {
    padding: 20px 8px 14px 8px;
    min-width: unset;
    font-size: 0.97rem;
  }
}

/* ============================================================
   Miscellaneous UI Enhancements
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  background: #f6e9d3;
}
::-webkit-scrollbar-thumb {
  background: #e5be7a;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #facf6b;
}

/* List Icons for Contact/Feature Info */
li img {
  vertical-align: middle;
  height: 22px;
  width: 22px;
  margin-right: 8px;
  display: inline-block;
  border-radius: 8px;
  background: #fae2bf;
  padding: 1.5px;
}

/* Links in main */
main a {
  color: var(--primary);
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.13s, color 0.15s;
  padding: 2px 4px;
}
main a:hover, main a:focus {
  background: #FAE2BF;
  color: #E77E16;
}

/* Table Styles (for Cookie Policy, Datasecurity) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3em 0;
  background: white;
  box-shadow: 0 2px 16px rgba(246,196,83,0.14);
  border-radius: var(--border-radius);
  overflow: hidden;
}
th, td {
  padding: 10px 14px;
  border-bottom: 1px solid #e5be7a;
  text-align: left;
}
th {
  background: #F6C453;
  color: #492808;
  font-family: var(--font-display);
  font-size: 1.08rem;
}
tr:last-child td { border-bottom: none; }

/* ============================================================
   Responsive Details
   ============================================================ */
@media (max-width: 600px) {
  .container { padding: 0 4px; }
  section { padding: 22px 3px; }
  .feature-grid > div, .card {
    min-width: unset;
    padding: 18px 7px 14px 7px;
  }
}
@media (max-width: 420px) {
  section { padding: 11px 1px; }
  .feature-grid > div, .card { padding: 12px 2px 10px 2px; }
  .testimonial-card { padding: 10.5px; }
}

/* Smoother micro-interactions */
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.card, .feature-grid > div, .testimonial-card, .button, .mobile-menu, .cookie-banner, .cookie-modal {
  transition: box-shadow 0.16s, background 0.13s, transform 0.14s;
}

/* Remove user-select on interactive buttons */
.button, .mobile-menu-toggle, .mobile-menu-close, .cookie-banner .button, .cookie-modal .button {
  user-select: none;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 24px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 24px; }
.mt-1 { margin-top: 10px; }
.gap-1 { gap: 12px; }
.gap-2 { gap: 24px; }

/* Loading spinner/animation for future micro-interactions */
@keyframes gentlePulse {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  70% { box-shadow: 0 0 0 8px rgba(246,196,83,0.0); }
  100% { box-shadow: 0 0 0 0 var(--accent); }
}
.button.loading {
  pointer-events: none;
  opacity: 0.82;
  position: relative;
}
.button.loading:after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -8px;
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #D6AA4A;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
