/* RESET & NORMALIZE (basic subset) */
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-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: 'Roboto', Arial, sans-serif;
  color: #2E2920;
  background-color: #FFFDF6;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}
:root {
  --color-primary: #133A5B;
  --color-primary-dark: #102e45;
  --color-secondary: #E0E6ED;
  --color-accent: #F9B526;
  --color-warning: #E37C40;
  --color-bg: #FFFDF6;
  --color-card: #FBF6EE;
  --color-border: #DCC99F;
  --color-muted: #786951;
  --color-retro1: #E9D8A6;
  --color-retro2: #B59469;
  --color-retro3: #FED6BA;
  --color-retro4: #A68F68;
}

/* RETRO FONTS (display + body)  */
h1, h2, h3, h4, h5, h6, .btn-primary, nav a, .mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 0.02em;
}

/* -------------- LAYOUTS ---------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-card);
  border: 2px solid var(--color-retro1);
  border-radius: 18px;
  box-shadow: 0 4px 16px 0 rgba(20,19,19,.07);
  padding: 28px 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: #FFF9EE;
  border: 2px solid var(--color-border);
  border-radius: 15px;
  box-shadow: 0 2px 10px 0 rgba(35,30,16,.11);
  margin-bottom: 24px;
  max-width: 540px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* BLOG GRID (adapted for flex) */
.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}
.blog-grid article {
  flex: 1 1 260px;
  min-width: 260px;
  background: #F6EED9;
  border: 1.5px solid var(--color-retro1);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 1.5px 8px 0 rgba(20,19,19,.09);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background .2s, box-shadow .2s;
}
.blog-grid article:hover {
  background: #FFF4EC;
  box-shadow: 0 5px 24px 0 rgba(249,181,38,0.12);
}
.featured-article {
  background: #FFF4E0;
  border-left: 4px solid var(--color-accent);
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px 0 rgba(30, 25, 6, 0.11);
}

/* --------------- TYPOGRAPHY --------------- */
h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}
h2 {
  font-size: 2rem; font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-retro4);
}
h3 {
  font-size: 1.35rem; font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
}
h4, h5, h6 {
  color: var(--color-retro2);
}
p, ul, ol {
  font-size: 1.09rem;
  margin-bottom: 8px;
}
strong { font-weight: 700; }
em, i { font-style: italic; color: var(--color-retro2); }
a {
  color: var(--color-primary);
  text-decoration: underline dotted;
  transition: color 0.18s;
  cursor: pointer;
}
a:hover, a:focus {
  color: var(--color-accent);
}
.text-section {
  margin-bottom: 24px;
}
blockquote {
  font-family: 'Montserrat', Arial, sans-serif;
  font-style: italic;
  color: #443D2E;
  font-size: 1.13rem;
  background: #FFF9ED;
  border-left: 5px solid var(--color-accent);
  margin: 0;
  padding: 10px 18px 10px 12px;
  border-radius: 9px;
  line-height: 1.5;
}
cite {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: var(--color-retro2);
  margin-left: 8px;
}

ul, ol {
  padding-left: 26px;
}
ul li, ol li {
  margin-bottom: 10px;
  position: relative;
  list-style-position: outside;
}
ul li img, ol li img {
  margin-right: 11px;
  vertical-align: middle;
  height: 21px;
  width: 21px;
}

/* -------------- HEADER & NAV ------------- */
header {
  background: #F3E4BE url('../assets/vintage-pattern.png');
  background-blend-mode: multiply;
  border-bottom: 3px double var(--color-primary);
  padding-top: 0;
  padding-bottom: 0;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  min-height: 80px;
  position: relative;
}
header a img {
  height: 45px;
  margin-right: 20px;
  vertical-align: middle;
}
nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.07rem;
  color: var(--color-primary);
  background: transparent;
  border-radius: 6px;
  padding: 5px 9px;
  transition: background .18s, color .18s;
  text-decoration: none;
}
nav a:hover, nav a:focus {
  background: var(--color-accent);
  color: #133A5B;
  text-decoration: underline;
}
.btn-primary {
  display: inline-block;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  padding: 12px 28px;
  background: var(--color-accent);
  border: none;
  border-radius: 22px;
  color: var(--color-primary);
  box-shadow: 0 2px 10px 0 rgba(225,152,31,0.17);
  font-size: 1.13rem;
  margin-left: 20px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .21s, box-shadow .21s, color .19s;
  text-shadow: 0 1px 0 #fff2d2;
  outline: none;
  text-decoration: none;
}
.btn-primary:hover, .btn-primary:focus {
  background: #FAD999;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 16px 0 rgba(249,181,38,0.22);
}

/* -------------- MOBILE MENU -------------- */
.mobile-menu-toggle {
  display: none;
  position: relative;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  margin-left: auto;
  padding: 6px 8px;
  z-index: 21;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #F3E4BE url('../assets/vintage-pattern.png');
  background-blend-mode: multiply;
  z-index: 99;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 48px 24px 32px;
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(.52,.19,.32,1.31), box-shadow .22s;
  box-shadow: 0 0 0 rgba(0,0,0,0.0);
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
  box-shadow: 0 0 48px 14px rgba(22,19,7,.24);
}
.mobile-menu-close {
  font-size: 2rem;
  background: none;
  color: var(--color-retro2);
  border: none;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 199;
  transition: color .24s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 30px;
}
.mobile-nav a {
  font-size: 1.23rem;
  color: var(--color-primary);
  font-weight: 600;
  background: none;
  border: none;
  padding: 12px 0;
  text-decoration: none;
  border-radius: 10px;
  transition: color .18s, background .14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-retro1);
  color: var(--color-accent);
}

/* ------------ HERO & SECTION ------------ */
main > section {
  background: none;
  margin-bottom: 60px;
  padding: 40px 0 0 0;
}
main > section:first-child {
  background: #FFF6E1 url('../assets/vintage-pattern-bg.svg') repeat;
  border-bottom: 2px dashed var(--color-retro1);
}
main section h1, main section h2 {
  margin-bottom: 16px;
}

/* --------- SPECIAL CARD/PATTERN BLOCKS --------- */
.card, .testimonial-card, .blog-grid article, .featured-article {
  position: relative;
  overflow: hidden;
}
.card::before, .testimonial-card::before {
  content: '';
  position: absolute;
  left: -28px; top: -22px;
  width: 98px; height: 38px;
  background: url('../assets/deco-corner-retro.svg') no-repeat;
  opacity: .13;
  z-index: 0;
  pointer-events: none;
}
.testimonial-card {
  background: #FFF9EE;
  border: 2.5px solid var(--color-retro1);
  color: #2C2007;
  font-size: 1.08rem;
  z-index: 2;
}

/* -------------- FOOTER --------------- */
footer {
  background: #EEE6DE url('../assets/vintage-pattern-footer.png');
  border-top: 3px double var(--color-primary);
  margin-top: 60px;
  padding: 40px 0 26px 0;
  color: var(--color-primary);
  font-size: 1rem;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
footer nav {
  justify-content: center;
  gap: 11px;
}
footer nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  color: var(--color-primary);
  text-decoration: underline dotted;
  margin-right: 4px;
}
footer nav a:last-child {
  margin-right: 0;
}
footer .text-section {
  color: #796745;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* ------- COOKIE CONSENT BANNER & MODAL ------- */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2222;
  background: #FFF6E1;
  border-top: 2.5px solid var(--color-retro1);
  box-shadow: 0 -6px 24px 0 rgba(136,113,43,.11);
  padding: 26px 16px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-consent-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.cookie-consent-banner p {
  color: #2E2920;
  font-size: 1.03rem;
}
.cookie-btns {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.cookie-btns button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  border-radius: 19px;
  padding: 8px 18px;
  background: var(--color-primary);
  color: #FFF6E1;
  box-shadow: 0 2px 10px 0 rgba(19,58,91,.07);
  cursor: pointer;
  transition: background .16s, color .14s, box-shadow .16s;
}
.cookie-btns .cookie-accept {
  background: var(--color-accent);
  color: var(--color-primary);
}
.cookie-btns .cookie-reject {
  background: var(--color-retro3);
  color: var(--color-primary);
}
.cookie-btns .cookie-settings {
  background: var(--color-primary);
  color: #FFF6E1;
  border: 2px solid var(--color-accent);
}
.cookie-btns button:hover, .cookie-btns button:focus {
  background: var(--color-retro1);
  color: var(--color-primary-dark);
  box-shadow: 0 4px 16px 0 rgba(249,181,38,0.15);
}

.cookie-consent-modal {
  position: fixed;
  z-index: 3333;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(34,27,5,0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .33s;
}
.cookie-consent-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal-content {
  background: #FFF6E1;
  border-radius: 16px;
  padding: 32px 22px 24px 22px;
  box-shadow: 0 10px 38px 0 rgba(19, 58, 91, 0.13);
  min-width: 312px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  color: #2E2920;
}
.cookie-modal-content h2 {
  font-size: 1.27rem;
  color: var(--color-primary);
}
.cookie-modal-content label {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.09rem;
  color: var(--color-retro2);
  margin-left: 12px;
  cursor: pointer;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.cookie-category input[type=checkbox] {
  width: 19px; height: 19px;
  accent-color: var(--color-accent);
  border-radius: 7px;
}
.cookie-category input[disabled] {
  opacity: .55;
}
.cookie-modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: none;
  border: none;
  font-size: 1.64rem;
  color: var(--color-retro2);
  cursor: pointer;
  transition: color .19s;
  z-index: 5;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-accent);
}

/* ------------ FORM ELEMENTS (contact, input) ------------ */
input[type=text], input[type=email], input[type=tel], textarea {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.05rem;
  border: 1.5px solid var(--color-retro1);
  border-radius: 10px;
  padding: 10px 16px;
  background: #FAF3E7;
  margin-bottom: 20px;
  width: 100%;
  max-width: 440px;
  transition: border-color .17s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #FEF8E8;
}

/* ------------- MICRO-INTERACTIONS ------------- */
button, a, .btn-primary {
  transition: color .18s, background .20s, box-shadow .19s, border .17s;
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 1200px) {
  .container {
    max-width: 95vw;
    padding: 0 10px;
  }
}
@media (max-width: 990px) {
  .blog-grid article,
  .featured-article {
    min-width: 220px;
  }
}
@media (max-width: 850px) {
  header .container {
    gap: 14px;
    min-height: 64px;
    flex-wrap: wrap;
  }
  nav {
    gap: 13px;
    font-size: 1rem;
  }
}
@media (max-width: 768px) {
  html { font-size: 15px; }
  .container {
    padding: 0 7px;
    max-width: 100vw;
  }
  .content-wrapper, .card-container, .content-grid {
    gap: 16px;
  }
  .text-image-section, .content-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .card, .testimonial-card, .blog-grid article {
    padding: 16px 9px;
  }
  main > section {
    padding: 28px 0 0 0;
    margin-bottom: 38px;
  }
  .feature-item {
    gap: 8px;
  }
  footer {
    padding: 22px 0 16px 0;
  }
  .mobile-menu-toggle {
    display: block;
  }
  nav {
    display: none;
  }
}
@media (max-width: 600px) {
  html { font-size: 14px; }
  h1 { font-size: 1.64rem; }
  h2 { font-size: 1.32rem; }
  h3 { font-size: 1.07rem; }
  .btn-primary {
    padding: 9px 16px;
    font-size: 0.98rem;
  }
  .testimonial-card, .card {
    min-width: 0;
  }
  .cookie-modal-content {
    min-width: unset;
    padding: 20px 8px 16px 8px;
  }
}

/* ------------- PRINT STYLES ------------- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-consent-banner, .cookie-consent-modal {
    display: none !important;
  }
  nav, footer, header, .btn-primary {
    color: #000 !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* ------------ CUSTOM RETRO TOUCHES ------------ */
body {
  background: #FFFDF6 url('../assets/bg-retro-fabric.png') repeat;
}
section {
  border-radius: 18px;
  box-shadow: 0 2px 32px 0 rgba(190,174,139,0.07);
}
.card, .testimonial-card {
  box-shadow: 0 5px 32px 0 rgba(231,201,112,0.05);
  border-style: solid;
  border-width: 2px;
}
.card {
  border-color: var(--color-retro3);
}
.testimonial-card {
  background: #FFFDF6;
  border-color: var(--color-retro1);
}

/* Decorative dash lines for some sections */
main > section:not(:first-child) {
  border-top: 1.5px dashed #dec08b;
  border-radius: 0 0 18px 18px;
}

/* ------------- ACCESSIBILITY PATCHES ------------- */
.testimonial-card, .testimonial-card blockquote, .testimonial-card cite {
  color: #27406A !important;
  background: #FFF9EE;
}
.testimonial-card blockquote {
  border-left: 5px solid #FACD7E;
  padding-left: 18px;
}

/* Hide native outlines for buttons, add custom focus ring */
button:focus, .btn-primary:focus, a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ------------- ANIMATIONS & TRANSITIONS ------------- */
.mobile-menu, .mobile-menu.open {
  transition: transform .36s cubic-bezier(.65,.26,.32,1.02);
}
.cookie-consent-banner {
  animation: cookieSlideIn .6s cubic-bezier(.77,.43,.12,1.15);
}
@keyframes cookieSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----------- ICONS/TABLE/IMG -------------- */
img {
  max-width: 100%;
  height: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 24px;
}
th, td {
  border: 1.5px solid var(--color-retro1);
  padding: 8px 12px;
  text-align: left;
}
th {
  background: var(--color-retro1);
  font-family: 'Montserrat', Arial, sans-serif;
}

/* ------------ UTILITY CLASSES ------------ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.center-x { justify-content: center; }
.center-y { align-items: center; }

/* SCROLLBAR RETRO STYLE */
::-webkit-scrollbar {
  width: 10px;
  background: #F5E7C4;
}
::-webkit-scrollbar-thumb {
  background-color: #DCC99F;
  border-radius: 6px;
}
