/* --- 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, main, 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;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

/* --- BRAND & BASE TYPOGRAPHY --- */
:root {
  --primary: #8B1E3F;
  --secondary: #222B45;
  --accent: #F4F8FB;
  --white: #fff;
  --text: #222B45;
  --text-secondary: #626681;
  --shadow: 0 2px 12px rgba(34,43,69,0.05);
  --radius: 14px;
  --transition: 0.18s cubic-bezier(.33,1,.68,1);
  --focus: #E4E9F2;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--accent);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--secondary);
  font-weight: 700;
  line-height: 1.18;
}
h1 { font-size: 2.5rem; margin-bottom: 18px; }
h2 { font-size: 2rem; margin-bottom: 14px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; font-weight: 600; }
h4, h5, h6 { font-size: 1.075rem; }
p, ul, ol, .text-section {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.subheadline {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.15rem;
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: 400;
}
strong, b { font-weight: 700; color: var(--secondary); }

/* --- APP CONTAINER --- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- HEADER, NAVIGATION --- */
header {
  background: var(--white);
  border-bottom: 1px solid #F0F1F7;
  position: sticky;
  top: 0;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 32px;
}
header img[alt="Crimson Surplus"] {
  height: 44px;
  width: auto;
  margin-right: 32px;
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav a {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: 5px;
  transition: background var(--transition), color var(--transition);
}
nav a:hover, nav a:focus {
  background: var(--focus);
  color: var(--primary);
}
nav .cta-btn {
  background: var(--primary);
  color: var(--white) !important;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 8px 22px;
  margin-left: 16px;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 12px rgba(139,30,63,0.06);
  border: none;
  cursor: pointer;
}
nav .cta-btn:hover, nav .cta-btn:focus {
  background: #a02448;
  color: #fff;
  box-shadow: 0 5px 20px rgba(139,30,63,0.1);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--primary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 102;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--focus);
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 1000;
  transition: transform .35s cubic-bezier(.48,1,.35,1);
  transform: translateX(-100%);
  display: flex;
  flex-direction: column;
  padding: 0;
  opacity: 1;
  box-shadow: 0 0 20px rgba(55,50,75,0.09);
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2rem;
  margin: 22px 22px 0 0;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  transition: background var(--transition);
  border-radius: 50%;
  height: 44px;
  width: 44px;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--focus);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: 35px;
  gap: 26px;
}
.mobile-nav a {
  font-size: 1.22rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--secondary);
  padding: 16px 0;
  letter-spacing: 0.01em;
  width: 80vw;
  text-align: center;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--accent);
  color: var(--primary);
}

/* --- MAIN SECTIONS & SPACING --- */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.hero {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 48px 0 36px 0;
  margin-bottom: 60px;
}
.about, .contact, .footer, .services, .cta, .features, .testimonials {
  margin-bottom: 60px;
  padding: 40px 0;
}
.cta {
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

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

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  transition: box-shadow var(--transition), background var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 32px rgba(34,43,69,0.13);
  background: #fafbfe;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* --- FEATURE LISTS --- */
.features .content-wrapper ul, 
.services .content-wrapper ul, 
.about .content-wrapper ul,
.contact .content-wrapper ul,
.footer .content-wrapper ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 0;
}
.features .content-wrapper ul li, 
.services .content-wrapper ul li, 
.about .content-wrapper ul li,
.contact .content-wrapper ul li {
  display: flex;
  align-items: center;
  gap: 15px;
  background: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}
.features .content-wrapper ul li img, 
.services .content-wrapper ul li img { height: 28px; width: auto; margin-right: 10px; }

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- TESTIMONIAL CARDS --- */
.testimonials .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 18px rgba(34,43,69,0.09);
  min-width: 240px;
  max-width: 370px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card p {
  color: var(--secondary);
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.testimonial-card div {
  color: var(--primary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.90;
}
.testimonial-card:hover, .testimonial-card:focus-within {
  box-shadow: 0 8px 32px rgba(34,43,69,0.16);
  transform: translateY(-4px) scale(1.022);
}

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 32px 0 0 0;
  overflow: hidden;
}
thead tr {
  background: var(--accent);
}
th, td {
  padding: 13px 15px;
  font-size: 1rem;
  text-align: left;
}
th {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  color: var(--secondary);
}
td {
  color: var(--text-secondary);
}
tbody tr + tr {
  border-top: 1px solid #E9ECF7;
}

/* --- MAP PLACEHOLDER --- */
.map-placeholder {
  background: #fcfcfc;
  color: #8F929D;
  padding: 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-style: italic;
  text-align: center;
  border: 1px solid #E4E9F2;
}

/* --- CTA BUTTONS & LINK BUTTONS --- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  padding: 13px 38px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(139,30,63,0.07);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 10px;
}
.cta-btn:hover, .cta-btn:focus {
  background: #a02448;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 7px 22px rgba(139,30,63,0.13);
  color: var(--white);
  text-decoration: none;
}

/* --- BLOG CATEGORY --- */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.blog-categories li a {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  border-radius: 24px;
  padding: 7px 20px;
  font-size: 0.97rem;
  font-family: 'Roboto', Arial, sans-serif;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--primary);
}
.blog-categories li a:hover, .blog-categories li a:focus {
  background: var(--primary);
  color: #fff;
}

/* --- CREDENTIALS LIST IN EXPERTS --- */
.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 22px 0 0 0;
}
.credentials-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
}
.credentials-list li img {
  height: 26px;
  width: auto;
}

/* --- ADDRESS & FOOTER --- */
footer {
  background: var(--white);
  border-top: 1px solid #E4E9F2;
  font-size: 0.98rem;
  margin-top: 70px;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 16px 15px 16px;
}
footer nav {
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
footer address {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 210px;
  color: var(--text-secondary);
  font-style: normal;
}
footer address img {
  height: 20px;
  width: 20px;
  margin-right: 7px;
  vertical-align: middle;
}
footer address div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}
footer address a {
  color: var(--primary);
  transition: text-decoration var(--transition);
}
footer address a:hover, footer address a:focus {
  text-decoration: underline;
}
footer .copyright {
  margin-top: 18px;
  color: #bbb;
  font-size: 0.92rem;
  flex: 1 1 100%;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: rgba(255,255,255,0.99);
  box-shadow: 0 -6px 32px rgba(34,43,69,0.08);
  z-index: 3000;
  padding: 24px 6vw 24px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 1rem;
  transition: transform var(--transition), opacity var(--transition);
}
.cookie-banner.hide {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner__text {
  color: var(--text-secondary);
  max-width: 600px;
}
.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-btn {
  background: var(--accent);
  color: var(--primary);
  border-radius: 8px;
  padding: 10px 18px;
  margin-left: 0;
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  border: 0;
  cursor: pointer;
}
.cookie-btn.accept {
  background: var(--primary);
  color: #fff;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: #a02448;
}
.cookie-btn.reject {
  background: var(--accent);
  color: var(--secondary);
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #f3e7eb;
  color: var(--primary);
}
.cookie-btn.settings {
  background: #E4E9F2;
  color: var(--secondary);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #f6f6f9;
}

/* --- COOKIE PREFERENCES MODAL --- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34,43,69,0.16);
  z-index: 3050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity var(--transition);
}
.cookie-modal-overlay.hide { opacity: 0; pointer-events: none; }
.cookie-modal {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 48px rgba(34,43,69,0.17);
  min-width: 330px;
  max-width: 96vw;
  padding: 38px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  animation: fadeinModal .36s cubic-bezier(.48,1,.35,1);
}
@keyframes fadeinModal {
  from { opacity: 0; transform: translateY(60px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cookie-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: background var(--transition);
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--focus);
}
.cookie-modal h2 {
  margin-bottom: 4px;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 1rem;
  margin-bottom: 6px;
}
.cookie-category .toggle {
  width: 44px;
  height: 24px;
  border-radius: 13px;
  background: var(--accent);
  border: 1px solid #E4E9F2;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}
.cookie-category .toggle input[type="checkbox"] {
  display: none;
}
.cookie-category .toggle span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #BBB;
  transition: left var(--transition), background var(--transition);
}
.cookie-category .toggle input[type="checkbox"]:checked + span {
  background: var(--primary);
  left: 22px;
}
.cookie-category.essential .toggle {
  background: var(--accent);
  border: 1px solid #f0eae5;
}
.cookie-category.essential .toggle span {
  background: #aabaad;
}
.cookie-category.essential .toggle {
  pointer-events: none;
  opacity: 0.7;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1120px) {
  .container { max-width: 97vw; }
  footer .container { flex-direction: column; gap: 18px; }
}
@media (max-width: 920px) {
  header .container { flex-direction: column; align-items: stretch; gap: 18px; }
  header nav { justify-content: flex-start; gap: 11px; flex-wrap: wrap; margin-bottom: 0; }
}
@media (max-width: 768px) {
  .container { padding: 0 7vw; }
  header .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 7vw 15px 7vw;
    gap: 0;
    min-height: 60px;
  }
  header nav {
    display: none;
  }
  .mobile-menu-toggle { display: flex; }
  .card-container, .content-grid, .testimonials .content-wrapper, .features .content-wrapper ul, .about .content-wrapper ul, .services .content-wrapper ul {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section { flex-direction: column; gap: 14px; }
  .section, .about, .contact, .footer, .services, .cta, .features, .testimonials {
    margin-bottom: 38px;
    padding: 28px 0;
  }
  .hero { padding: 28px 0 16px 0; }
  table thead { display: none; }
  table,
  tbody, tr, td { display: block; width: 100%; }
  td {
    box-sizing: border-box;
    padding: 12px 10px;
    position: relative;
    border-bottom: 1px solid #ececee;
  }
  tbody tr { margin-bottom: 14px; box-shadow: 0 2px 10px rgba(34,43,69,0.07); border-radius: var(--radius); background: var(--white);}
}
@media (max-width: 540px) {
  .container { padding: 0 3vw; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.36rem; }
  .cta-btn, nav .cta-btn { padding: 10px 14px; font-size: 1rem; }
  .cookie-modal { min-width: 0; padding: 28px 10px 21px 10px; }
  .testimonial-card { padding: 16px 10px; min-width: 85vw; }
}

/* --- INTERACTIONS & FOCUS STATES --- */
a, button, .cta-btn, .cookie-btn, .mobile-menu-toggle, .mobile-menu-close {
  outline: none;
  box-shadow: none;
}
a:focus-visible, button:focus-visible, .cta-btn:focus-visible, .cookie-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
::-webkit-input-placeholder { color: #bbb; }
::-moz-placeholder { color: #bbb; }
:-ms-input-placeholder { color: #bbb; }
::placeholder { color: #bbb; }

/* --- FORM ELEMENTS (Future extension) --- */
input[type="text"], input[type="email"], textarea {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e3e6ee;
  background: var(--white);
  font-size: 1rem;
  width: 100%;
  transition: border var(--transition);
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: var(--primary);
  background: #fcfcfc;
}

/* --- MICRO-ANIMATIONS --- */
.card, .testimonial-card, .cta-btn, .cookie-banner, .cookie-btn, .mobile-menu {
  transition: box-shadow var(--transition), background var(--transition), transform var(--transition), opacity var(--transition);
}

/* --- UTILITY SPACING/MARGIN HELPERS (optional, for future) --- */
.mb-24 { margin-bottom: 24px !important; }
.mb-32 { margin-bottom: 32px !important; }
.mt-32 { margin-top: 32px !important; }

