/*
  Crimson Quarter – Gradient Modern Theme
  Author: Senior CSS Developer
  Brand: Crimson Quarter (Modern, gradient_modern, functional minimalism)
  CRITICAL: Mobile-first, FLEXBOX-ONLY, NO CSS GRID/COLUMNS
  FONTS: Montserrat (display), Roboto (body)
*/

/* === CSS RESET & BASE NORMALIZATION === */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; padding: 0; }
body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border: 0; }
button { font: inherit; outline: none; border: none; cursor: pointer; background: none; }

/* === COLOR PALETTE CSS VARIABLES (WITH FALLBACKS) === */
:root {
  --cq-primary: #B11226;
  --cq-secondary: #282828;
  --cq-accent: #F5F5F5;
  --cq-bg-gradient-top: #B11226;
  --cq-bg-gradient-bottom: #F5F5F5;
  --cq-gradient-main: linear-gradient(120deg, #B11226 0%, #ea476a 100%);
  --cq-gradient-light: linear-gradient(120deg, #F5F5F5 50%, #EFEFEF 100%);
  --cq-gray: #757575;
  --cq-white: #fff;
  --cq-black: #222;
  --cq-shadow: 0 6px 24px rgba(40,40,40,0.12);
  --cq-radius: 18px;
  --cq-radius-sm: 9px;
  --cq-nav-bg: #F5F5F5;
  --cq-nav-link: #282828;
  --cq-hero-gradient: linear-gradient(120deg, #B11226 0%, #ea476a 100%);
  --cq-hero-overlay: rgba(255,255,255,0.91);
}

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto:wght@400;500;700&display=swap');

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--cq-gradient-light, #F5F5F5);
  color: var(--cq-black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 900;
  color: var(--cq-primary);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 18px;
}
h1 { font-size: 2.15rem; margin-bottom: 20px; }
h2 { font-size: 1.45rem; margin-bottom: 18px; }
h3 { font-size: 1.2rem; margin-bottom: 14px; }
h4 { font-size: 1rem; }

p { color: var(--cq-secondary); margin-bottom: 8px; }

/* --- Responsive Type --- */
@media (min-width:600px) { h1{font-size:2.7rem;} h2{font-size:2rem;} h3{font-size:1.25rem;} }
@media (min-width:1000px) { h1{font-size:3.2rem;} h2{font-size:2.3rem;} }

/* === GLOBAL LAYOUT HELPERS === */
.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0;
  display: flex;
  flex-direction: column;
}

/* === HEADER & NAVIGATION === */
header {
  background: var(--cq-white);
  box-shadow: 0 1px 8px rgba(40,40,40,0.06);
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 14px 0;
}
.logo { display: flex; align-items: center; }
.logo img {max-height:38px;}

.main-nav {
  display: none;
}
header .cta.primary {
  display: none;
}
.mobile-menu-toggle {
  font-size: 2rem;
  color: var(--cq-primary);
  background: none;
  border: none;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  border-radius:100px;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  color: var(--cq-secondary);
  background: var(--cq-accent);
}

/* --- Desktop Nav --- */
@media (min-width: 900px) {
  .main-nav {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
  }
  .main-nav a {
    color: var(--cq-nav-link);
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    padding: 9px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
  }
  .main-nav a:hover, .main-nav a:focus {
    background: var(--cq-primary);
    color: var(--cq-white);
  }
  header .cta.primary {
    display: flex;
    margin-left: 24px;
  }
  .mobile-menu-toggle {
    display: none;
  }
}

/* === MOBILE MENU === */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right:0; bottom: 0;
  background: var(--cq-white);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 32px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  box-shadow: 0 2px 32px rgba(40,40,40,0.09);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
}
.mobile-menu-close {
  padding: 8px 20px 12px 24px;
  font-size: 2rem;
  color: var(--cq-primary);
  background: none;
  align-self: flex-end;
  border: none;
  transition: color 0.2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus { color: var(--cq-secondary); }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  width: 100%;
  margin-top: 14px;
  padding-left:32px;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cq-secondary);
  letter-spacing: 0.01em;
  background: transparent;
  border-radius: 7px;
  padding: 8px 12px;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:hover, .mobile-nav a:focus { 
  background: var(--cq-primary); 
  color: var(--cq-white);
}
@media (min-width:900px) {
  .mobile-menu { display: none !important; }
}

/* === HERO SECTION === */
.hero {
  background: var(--cq-hero-gradient, #B11226);
  color: var(--cq-white);
  position: relative;
  padding: 0;
  min-height: 42vh;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}
.hero:before {
  content: '';
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: linear-gradient(120deg, rgba(254,254,254,0.84) 0%,rgba(255,255,255,0.90) 70%,rgba(242,226,230,0.97) 100%);
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
  min-height: 320px;
  justify-content: center;
  align-items: center;
}
.hero .content-wrapper {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 50px 0 38px 0;
}
.hero h1 {
  color: var(--cq-primary);
  background: transparent;
  font-size: 2.1rem;
}
.hero p {
  color: var(--cq-secondary);
}

/* === SECTIONS === */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  border-radius: var(--cq-radius);
}
.section-bg {
  background: var(--cq-accent);
  border-radius: var(--cq-radius);
  box-shadow: 0 1px 16px rgba(171, 44, 70, 0.10);
}

/* === FLEXBOX LAYOUTS === */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
}
@media(min-width:900px) {
  .content-wrapper { gap:38px; }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}
.card {
  background: var(--cq-white);
  box-shadow: var(--cq-shadow);
  border-radius: var(--cq-radius);
  padding: 28px 24px 24px 24px;
  margin-bottom: 20px !important;
  display: flex;
  flex-direction: column;
  position: relative;
  gap:14px;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  width: 100%;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media(max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: var(--cq-accent);
  border-radius: var(--cq-radius-sm);
  box-shadow: 0 3px 16px rgba(40,40,40,0.12);
  min-width:280px; max-width: 600px;
  margin-bottom: 20px;
  position: relative;
}
.testimonial-card p {
  color: var(--cq-black);
  font-size: 1.06rem;
  font-style: italic;
}
.testimonial-meta {
  color: var(--cq-secondary);
  font-size: 0.97rem;
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 0.01em;
  margin-top: -10px;
  font-weight: 600;
}
@media (min-width: 700px) {
  .testimonials .content-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
  }
}

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

/* === FEATURING LISTS === */
.features ul,
.about ul {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  margin: 0;
}
.features ul li, .about ul li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 1rem;
  color: var(--cq-secondary);
  background: var(--cq-white);
  border-radius: var(--cq-radius-sm);
  box-shadow: 0 1px 8px rgba(40,40,40,.03);
  padding: 14px 18px 14px 14px;
  min-width: 220px;
}
.features ul li img,
.about ul li img {
  width: 32px; height: 32px;
  flex-shrink: 0;
  margin-right: 4px;
}
.features ul li span { color: var(--cq-secondary); }

@media (min-width: 600px) {
  .features ul, .about ul { flex-direction: row; flex-wrap: wrap; gap: 24px; }
  .features ul li, .about ul li {min-width: 258px;flex: 1 1 0;}
}

/* === SERVICE LISTS === */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.service-item {
  background: var(--cq-white);
  border-radius: var(--cq-radius);
  box-shadow: var(--cq-shadow);
  flex: 1 1 240px;
  min-width: 230px;
  max-width: 320px;
  padding: 24px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  transition: transform .17s cubic-bezier(.4,0,.2,1), box-shadow .16s;
}
.service-item img {
  width: 38px; height: 38px;
  margin-bottom:5px;
}
.service-item h3 { font-size: 1.14rem; color: var(--cq-primary); }
.service-item .price {
  font-weight: 700;
  color: var(--cq-secondary);
  margin-top: 3px;
  font-size: 1.04rem;
}
.service-item:hover, .service-item:focus {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 36px rgba(177,18,38,0.12);
}

/* === BUTTONS/CTAS === */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border-radius: 100px;
  font-family: 'Montserrat',Arial,sans-serif;
  font-size: 1.09rem;
  font-weight: 700;
  background: var(--cq-primary);
  color: var(--cq-white);
  box-shadow: 0 2px 18px rgba(177,18,38,0.13);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: background 0.17s cubic-bezier(.2,1,.34,1), color 0.14s;
  margin-top: 12px;
  gap: 7px;
  outline:none;
}
.cta.primary { background: var(--cq-primary); color: var(--cq-white); }
.cta:not(.primary) {
  background: var(--cq-white);
  color: var(--cq-primary);
  border: 1px solid var(--cq-primary);
}
.cta:hover, .cta:focus {
  background: #871427;
  color: #FFF;
}
.cta:not(.primary):hover, .cta:not(.primary):focus {
  background: var(--cq-primary);
  color: #fff;
}

/* LINKS IN TEXT */
.text-section a { color: var(--cq-primary); text-decoration: underline; transition: color .14s; }
.text-section a:hover { color: #871427; }

/* === ABOUT/TEXT SECTIONS === */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--cq-secondary);
  width: 100%;
}
.text-section ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.text-section ul li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cq-secondary);
  font-size: 1rem;
}
.text-section ul li img {
  width: 23px; height: 23px;
}

/* === CONTACT SECTIONS === */
.contact-section .content-wrapper {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.contact-section .text-section {
  gap: 24px;
}
.contact-section ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.contact-section ul li {
  font-size: 1.08rem;
  color: var(--cq-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-section ul li img { width: 21px; height: 21px; margin-right: 2px;}

/* === FOOTER === */
footer {
  background: var(--cq-accent);
  font-size: 1rem;
  color: var(--cq-secondary);
  margin-top: 60px;
  border-radius: var(--cq-radius) var(--cq-radius) 0 0;
  box-shadow: 0 -1px 10px rgba(40,40,40,0.06);
}
footer .container {
  padding: 30px 0 16px 0;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 21px;
  margin-bottom: 8px;
}
.footer-menu a {
  color: var(--cq-secondary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  transition: color .18s;
}
.footer-menu a:hover { color: var(--cq-primary); }
.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom:8px;
}
.contact-details span { display: flex; align-items: center; gap: 7px; }
.contact-details img { width: 19px; height: 19px;}
.social-links {
  display: flex;
  gap: 17px;
  align-items: center;
  margin-bottom: 8px;
}
.social-links a:hover img,
.social-links a:focus img {
  filter: brightness(0) saturate(100%) invert(13%) sepia(68%) saturate(4474%) hue-rotate(336deg) brightness(94%) contrast(96%);
}
.legal-links {
  font-size: .93rem;
  color: #777;
  margin-top: 7px;
}

/* === PAGE HELPERS & GENERAL SPACING === */
main > section {
  margin-bottom: 60px;
  padding: 40px 20px;
  border-radius: var(--cq-radius);
}
main > section:last-child { margin-bottom: 0;}
@media (min-width:900px) {
  main>section { padding: 38px 0 55px 0; }
}
@media (max-width:450px) {
  main>section { padding: 32px 0; }
}

/* === CARD SPACING & ALIGNMENT === */
.card-container, .service-list, .features ul, .about ul {
  gap: 24px;
}
.card, .service-item, .testimonial-card {
  margin-bottom: 20px;
}
.content-grid {
  gap: 20px;
}
.text-image-section,
.feature-item {
  gap: 15px;
}

/* === UTILITIES === */
.hide-mobile { display: none; }
@media(min-width:900px){ .hide-mobile { display: block; } }

/* === RESPONSIVE DESIGN === */
@media (max-width: 900px) {
  header .container { flex-direction: row; }
  .main-nav { display: none; }
  header .cta.primary { display: none; }
}
@media (max-width:768px) {
  .card-container, .service-list, .features ul, .about ul, .content-grid {
    flex-direction: column;
  }
  .card, .service-item, .testimonial-card {
    width: 100%;
    min-width: 0;
  }
  .hero .container { min-height: 220px; }
}

/* === ANIMATION & MICRO-INTERACTIONS === */
.cta, .service-item, .testimonial-card, .card {
  transition: box-shadow 0.15s, transform 0.13s, background 0.18s;
}
.cta:active { transform: scale(.98); }

/* === FOCUS VISIBLE === */
a:focus-visible,.cta:focus-visible,button:focus-visible{
  box-shadow: 0 0 0 2px var(--cq-primary);
  outline: none;
}

/* === COOKIE CONSENT BANNER & MODAL === */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 4000;
  background: var(--cq-white);
  color: var(--cq-secondary);
  box-shadow: 0 -2px 44px rgba(40,40,40,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 5vw 17px 5vw;
  font-size: 1rem;
  border-radius: var(--cq-radius) var(--cq-radius) 0 0;
  transition: transform .2s,opacity .2s;
  opacity: 1;
}
.cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}
.cookie-banner .cookie-text {
  max-width: 520px;
  color: var(--cq-secondary);
  font-size: 1rem;
  margin-right: 16px;
}
.cookie-banner .cookie-actions {
  display: flex; flex-direction: row; gap: 15px;
  flex-shrink: 0;
}
.cookie-banner .cookie-btn {
  padding: 8px 24px;
  border-radius: 44px;
  font-weight: 700;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 0.97rem;
  background: var(--cq-primary);
  color: var(--cq-white);
  border: none;
  margin-left: 2px;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(40,40,40,0.07);
  transition: background 0.13s, color 0.17s;
  outline: none;
}
.cookie-banner .cookie-btn.secondary {
  background: var(--cq-accent);
  color: var(--cq-primary);
  border: 1px solid var(--cq-primary);
}
.cookie-banner .cookie-btn:hover,.cookie-banner .cookie-btn:focus {
  background: #871427;
  color: #fff;
}
.cookie-banner .cookie-btn.secondary:hover,.cookie-banner .cookie-btn.secondary:focus {
  background: var(--cq-primary);
  color: #fff;
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed; left:0; right:0; top:0; bottom:0;
  background: rgba(40,40,40,0.39);
  z-index: 4100;
  display: flex; justify-content: center; align-items: center;
  opacity: 1;
  pointer-events: all;
  transition: opacity .22s;
}
.cookie-modal-overlay.hidden { opacity: 0; pointer-events: none; }
.cookie-modal {
  background: var(--cq-white);
  border-radius: var(--cq-radius);
  padding: 40px 34px 30px 34px;
  max-width: 410px; width: 94vw;
  box-shadow: 0 10px 45px rgba(40,40,40,0.18);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 4200;
  animation: modalpop .29s cubic-bezier(.49,1.29,.62,1.02);
}
@keyframes modalpop { from { transform: scale(.65); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cookie-modal h2 { color: var(--cq-primary); font-size: 1.25rem; margin-bottom: 14px; }
.cookie-modal .cookie-category {
  padding: 12px 10px 14px 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cookie-modal .cookie-category:last-child {
  border-bottom: none;
}
.cookie-modal label {
  font-size: 1rem;
  color: var(--cq-secondary);
  font-family: 'Roboto',Arial,sans-serif;
  font-weight: 400;
}
.cookie-modal .toggle-switch {
  width: 44px; height: 24px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  margin-left: 7px;
}
.toggle-switch input[type=checkbox] {
  display: none;
}
.toggle-switch .slider {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  background: #e8e8e8;
  border-radius: 18px;
  transition: background 0.15s;
}
.toggle-switch input[type=checkbox]:checked + .slider {
  background: var(--cq-primary);
}
.toggle-switch .slider:after {
  content: '';
  display: block;
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left .17s;
  box-shadow: 0 2px 8px rgba(177,18,38,0.05);
}
.toggle-switch input[type=checkbox]:checked + .slider:after {
  left: 23px;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 22px;
  justify-content: flex-end;
}
.cookie-modal .cookie-modal-close {
  position: absolute; top: 18px; right: 14px;
  background: none;
  font-size: 1.7rem;
  color: var(--cq-primary);
  border: none;
  cursor: pointer;
  outline:none;
}
.cookie-modal .cookie-modal-close:hover {
  color: var(--cq-secondary);
}

/* === CUSTOM SCROLLBARS === */
body, .mobile-menu, .cookie-modal { scrollbar-width: thin; scrollbar-color: #B11226 #eee; }
body::-webkit-scrollbar { width: 8px; background: #eee; }
body::-webkit-scrollbar-thumb { background: #B11226; border-radius: 24px; }

/* === ADAPTIVE COLORS FOR TESTIMONIALS === */
.testimonial-card {
  color: #222; background: var(--cq-accent);
}
.testimonial-card p { color: #222; }
.testimonial-meta { color:#282828; }

/* === FIXED: NO OVERLAPPING, SPACING BETWEEN COMPONENTS === */
section, .card, .testimonial-card, .service-item {
  margin-bottom: 20px;
}
.features ul, .about ul, .service-list, .content-grid, .card-container {
  gap: 24px;
}

/* === PRINT SUPPORT (for legal/policy pages) === */
@media print {
  header,footer,.cookie-banner,.mobile-menu { display: none !important; }
  body { background: #fff; color: #222; }
  section, main { background: #fff !important; }
}
