/* =====================
   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,
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: #f6f7fa;
  color: #19222b;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul, ol {
  list-style-position: inside;
}

input, button, textarea, select {
  font: inherit;
  outline: none;
  border-radius: 0;
}

a {
  background: none;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus { outline: 2px solid #FFC300; outline-offset: 2px; }

/* =====================
   CSS VARIABLES (FALLBACKS)
   ===================== */
:root {
  --color-primary: #174377;
  --color-secondary: #FFC300;
  --color-accent: #FFFFFF;
  --color-bg: #f6f7fa;
  --color-text: #19222b;
  --color-card-bg: #fff;
  --color-shadow: rgba(23,67,119,0.07);
  --color-hero-bg: #174377;
  --color-hero-text: #fff;
  --color-highlight: #FFE082;

  --font-display: 'Oswald', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;

  --radius-base: 14px;
  --shadow-base: 0 6px 24px var(--color-shadow);
  --shadow-soft: 0 2px 8px rgba(23,67,119,0.07);
}

/* =====================
   BASE TYPOGRAPHY
   ===================== */
body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  letter-spacing: 0.01em;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.5rem; line-height: 1.15; margin-bottom: 20px; color: var(--color-primary); }
h2 { font-size: 2rem; margin-bottom: 18px; color: var(--color-secondary); }
h3 { font-size: 1.375rem; margin-bottom: 16px; color: var(--color-primary); }
h4 { font-size: 1.1rem; margin-bottom: 10px; color: var(--color-secondary); }
p, li, span, a {
  font-size: 1rem;
  color: var(--color-text);
}
p { margin-bottom: 1.2em; }
ul, ol { margin: 0 0 1.2em 0; padding-left: 0; }

.text-section h2, .text-section h3 {
  color: var(--color-primary);
}

/* Artistic heading accents */
h1, h2, h3 {
  position: relative;
}
h2::before {
  content: '';
  display: block;
  position: absolute;
  left: -14px;
  top: -10px;
  width: 26px;
  height: 6px;
  background: var(--color-secondary);
  border-radius: 4px;
  opacity: 0.6;
}

/* =====================
   CONTAINER & SECTIONS
   ===================== */
.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-base);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  min-width: 280px;
  flex: 1 1 260px;
  transition: transform 0.14s cubic-bezier(.24,.95,.42,1.12),box-shadow 0.2s;
}
.card:hover, .card:focus {
  box-shadow: 0 14px 56px rgba(23,67,119,0.13);
  transform: translateY(-4px) scale(1.015) rotate(-1deg);
}

.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;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0 20px 0;
}
.team-list > div {
  flex: 1 1 320px;
  background: var(--color-card-bg);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.certifications, .years-experience {
  margin-bottom: 24px;
  background: #e9f4fa;
  border-radius: var(--radius-base);
  padding: 24px 18px;
}

/***** SECTION SPACING *****/
section { margin-bottom: 60px; padding: 40px 20px; }
.text-section { margin-bottom: 24px; }

/***** FEATURES GRID *****/
.features-grid, .benefits-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 24px;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--color-card-bg);
  padding: 24px 20px;
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-soft);
  min-width: 220px;
  flex: 1 1 220px;
  position: relative;
  transition: box-shadow 0.18s, transform 0.16s;
}
.feature:hover {
  box-shadow: 0 10px 32px rgba(252,185,23,0.09), 0 2px 14px rgba(23,67,119,0.05);
  transform: scale(1.03) rotate(1deg);
}
.feature img {
  width: 44px; height: 44px; margin-bottom: 8px;
}
.features-grid .feature h3 {
  margin-top: 6px;
}
.benefits-grid > div {
  display: flex;
  align-items: center;
  background: #fff6db;
  border-radius: 12px;
  gap: 12px;
  padding: 18px 22px;
  font-weight: 600;
  color: #56523d;
  font-size: 1.07rem;
  box-shadow: 0 0 8px #ead07532;
  flex: 1 1 180px;
}
.benefits-grid img {
  width: 32px; height: 32px;
}

/***** CTA SECTION *****/
.cta-section {
  background: var(--color-primary);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-base);
  margin-bottom: 0;
}
.cta-section h2 {
  color: var(--color-accent);
  margin-bottom: 16px;
}
.cta-section .cta-btn {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/***** CASE STUDY / CARD STYLE *****/
.case-study {
  background: var(--color-card-bg);
  border-left: 6px solid var(--color-primary);
  padding: 18px 22px;
  border-radius: var(--radius-base);
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: box-shadow 0.13s;
}
.case-study h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

/***** TESTIMONIALS *****/
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: #fdfdfb;
  border-radius: var(--radius-base);
  box-shadow: 0 2px 12px #bdbec140;
  margin-bottom: 20px;
  font-style: italic;
  position: relative;
  border-left: 5px solid var(--color-secondary);
  max-width: 600px;
}
.testimonial-card .stars {
  color: #FFD700;
  font-size: 1.25em;
}
.testimonial-card p {
  color: #19222b;
  font-weight: 600;
  font-size: 1.06rem;
}
.testimonial-card span {
  font-size: 0.98rem;
  color: #636360;
  font-style: normal;
  font-weight: 500;
}

/***** FAQ STYLES *****/
.faq-item {
  background: #e8f5ff;
  border-radius: 10px;
  box-shadow: 0 2px 8px #a3ccf222;
  margin-bottom: 24px;
  padding: 20px 18px;
  transition: box-shadow 0.14s;
}
.faq-item h3 {
  margin-bottom: 8px;
  color: var(--color-primary);
}
.faq-item:hover {
  box-shadow: 0 8px 36px #55a7d0cc;
  background: #f7fdff;
}

/***** FOOTER STYLES *****/
footer {
  width: 100%;
  background: #172132;
  color: #e3ecfa;
  padding: 32px 0 14px 0;
}
.footer-nav, .footer-contact{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
}
.footer-nav a {
  color: #ffc300;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.19s;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e3ecfa;
  font-size: .99em;
}
.footer-contact img {
  width: 18px; height: 18px; filter: invert(80%);
}
.footer-credits {
  text-align: center;
  color: #b6c1da;
  font-size: .92em;
  padding-top: 10px;
}

/* =====================
   HEADER/NAVIGATION STYLE
   ===================== */
header {
  background: #fff;
  box-shadow: 0 2px 18px #1743770D;
  padding: 0 0 2px 0;
  position: sticky;
  top: 0;
  z-index: 1020;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 72px;
}
header img[alt="AvtoFix Garage"] {
  height: 52px;
  margin-right: 16px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 1.14rem;
}
.main-nav a {
  color: var(--color-primary);
  position: relative;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 8px;
  transition: color 0.20s, background 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--color-accent);
  background: var(--color-secondary);
}

/***** CTA BUTTON STYLE *****/
.cta-btn, .cta-btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary);
  color: var(--color-primary);
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 12px 38px;
  font-size: 1.09rem;
  border: none;
  box-shadow: 0 3px 19px #17437723;
  transition: background 0.19s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-left: 24px;
  margin-bottom: 0;
  cursor: pointer;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--color-primary);
  color: var(--color-secondary);
  box-shadow: 0 7px 36px #17437740;
  transform: translateY(-3px) scale(1.04) rotate(-1deg);
}

/***** HERO SECTION *****/
.hero-section {
  background: linear-gradient(120deg,#174377 80%, #d7edff 100%);
  color: var(--color-hero-text);
  border-radius: var(--radius-base);
  box-shadow: 0 4px 44px #17437715;
  min-height: 300px;
  padding-top: 44px;
  padding-bottom: 64px;
  margin-bottom: 58px;
}
.hero-section h1 {
  color: #fff;
  text-shadow: 0 1px 12px #17437770;
  font-size: 2.66rem;
}
.hero-section p {
  color: #e8f2ff;
  font-size: 1.23rem;
  font-weight: 400;
}
.hero-section .cta-btn {
  background: var(--color-secondary);
  color: var(--color-primary);
  margin-top: 10px;
}

/***** PRIVACY / POLICY / STATIC PAGES *****/
.text-section {
  max-width: 800px;
}
.text-section h1 {
  font-size: 2.25rem;
}
.text-section ul, .text-section ol {
  margin-left: 14px;
  margin-bottom: 24px;
}
.text-section li {
  margin-bottom: 8px;
  padding-left: 6px;
}

/***** CASE STUDIES & MILESTONES *****/
.case-study, .milestone {
  border-left: 7px solid var(--color-secondary);
  background: #fffbe7;
  margin-bottom: 24px;
}
.milestone {
  background: #e7f7ff;
  border-left: 7px solid #174377;
  padding: 18px;
}

/* ================================
   MOBILE MENU
   ================================ */
.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  color: var(--color-primary);
  border: none;
  font-size: 2.15rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  margin: 0 10px 0 0;
  box-shadow: 0 2px 9px #17437722;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1105;
  transition: background 0.2s, color 0.18s;
  position: relative;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:hover {
  background: #ffd161;
  color: #fff;
}
.mobile-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: #174377;
  transform: translateX(100vw);
  transition: transform 0.4s cubic-bezier(.62,.25,.33,1.16);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 0 0 80px #17437760;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 18px 18px 0 0;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1220;
  transition: color .16s;
}
.mobile-menu-close:hover {
  color: #FFC300;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 34px;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: #ffc300;
  font-weight: 700;
  letter-spacing: .03em;
  background: transparent;
  padding: 6px 24px;
  border-radius: 10px;
  transition: background 0.2s, color 0.19s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: #fff;
  color: #174377;
  font-style: italic;
}

@media (max-width: 1024px) {
  .main-nav { gap: 18px; }
  .container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 900px) {
  .container { max-width: 98vw; }
  .main-nav a { font-size: 1.075rem; }
}

@media (max-width: 820px) {
  .main-nav { gap: 11px; }
  .cta-btn, .cta-btn.primary { margin-left: 10px; padding: 12px 22px; font-size: 1rem; }
}

@media (max-width: 768px) {
  header .container { min-height: 60px; }
  .main-nav,
  .cta-btn.primary { display: none; }
  .mobile-menu-toggle { display: flex; }
  .container { padding-left: 10px; padding-right: 10px; }
  .section { margin-bottom: 44px; padding: 26px 6px; }
  .content-wrapper { gap: 14px; }
  .features-grid, .benefits-grid, .card-container { gap: 12px; }
  .case-study, .testimonial-card, .feature, .team-list > div { padding: 15px 10px; }
  .card { padding: 18px 10px; min-width: 210px; }
  .cta-section, .hero-section { padding: 30px 6px; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.33rem; }
  h2 { font-size: 1.13rem; }
  .main-nav { display: none; }
  .mobile-nav a { font-size: 1.38rem; padding: 6px 10px; }
  .hero-section h1 { font-size: 1.27rem; }
  .hero-section p { font-size: .99rem; }
  .case-study,
  .testimonial-card,
  .feature,
  .team-list > div { font-size: .97rem; }
  .content-wrapper, .text-section { gap: 10px; }
  .features-grid, .benefits-grid { flex-direction: column; }
}

/***** FLEX DIRECTION FOR RESPONSIVENESS *****/
.text-image-section,
.content-grid,
.features-grid, .benefits-grid, .card-container, .team-list {
  flex-direction: row;
}
@media (max-width: 768px) {
  .text-image-section,
  .content-grid,
  .features-grid, .benefits-grid, .card-container, .team-list {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ================================
   INTERACTIONS AND EFFECTS
   ================================ */
.button, input[type=submit], .cta-btn, .cookie-banner button {
  transition: background .15s, color .14s, box-shadow .14s, transform .15s;
  cursor: pointer;
}
.button:active, input[type=submit]:active, .cta-btn:active {
  transform: scale(.98);
}

/***** LINKS AND BUTTONS *****/
a {
  color: var(--color-primary);
  text-decoration: underline dotted 1.2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover, a:focus {
  color: var(--color-secondary);
  text-decoration-color: var(--color-secondary);
}
[role="button"], button { cursor: pointer; }

/***** ICONS *****/
img[alt^="icon-"] {
  vertical-align: middle;
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

/***** BREADCRUMBS, MILESTONES, ETC *****/
/* Artistic, hand drawn underline for highlight */
h2.highlight {
  background: linear-gradient(90deg, #FFC300 40%,#FFD16140 100%);
  border-radius: 8px;
  padding: 2px 16px;
  display: inline-flex;
  color: var(--color-primary);
}
/* ================================
   COOKIE BANNER + PREFERENCES MODAL
   ================================ */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  width: 100vw;
  background: #fffbe7;
  color: #19222b;
  box-shadow: 0 -3px 24px #17437733;
  border-top: 3px solid var(--color-secondary);
  z-index: 1980;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  padding: 18px 30px 18px 18px;
  font-size: 1.09rem;
  animation: cookie-slidein .6s cubic-bezier(.46,.89,.55,1.27);
}
@keyframes cookie-slidein {
  from { transform: translateY(140%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p { flex: 1; margin: 0; }
.cookie-banner button {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display); font-weight: 500;
  border: none;
  border-radius: 999px;
  margin: 0 8px;
  padding: 9px 20px;
  font-size: 1.04em;
  box-shadow: 0 2px 9px #17437710;
}
.cookie-banner button.accept {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-banner button.accept:hover,
.cookie-banner button.accept:focus {
  background: #ffd161;
  color: #174377;
}
.cookie-banner button.settings {
  background: #fff;
  color: var(--color-primary);
  border: 1.2px solid var(--color-primary);
}
.cookie-banner button.settings:hover, .cookie-banner button.settings:focus {
  background: var(--color-primary);
  color: #fff;
}
.cookie-banner button.reject {
  background: #e23a30;
  color: #fff;
  box-shadow: 0 2px 8px #e23a3040;
}
.cookie-banner button.reject:hover {
  background: #aa251c;
}
@media (max-width: 740px){
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px 12px 8px;
    font-size: .97em;
  }
  .cookie-banner button { width: 100%; margin: 6px 0; }
}

/***** COOKIE MODAL *****/
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(23,67,119,0.75);
  z-index: 2999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 0.15s;
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-base);
  padding: 34px 26px 24px 26px;
  max-width: 440px;
  width: 95vw;
  box-shadow: 0 4px 44px #17437742;
  animation: modalin 0.25s cubic-bezier(.26,1.3,.38,.98);
  position: relative;
  z-index: 3000;
}
@keyframes modalin {
  from { transform: scale(.92) translateY(32px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal h2 {
  color: var(--color-primary);
  margin-bottom: 12px;
}
.cookie-modal .cookie-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 1.08em;
}
.cookie-modal .cookie-cat:last-child { border-bottom: 0; }
.cookie-modal .cookie-toggle {
  margin-left: 16px;
}
.cookie-toggle input[type=checkbox] {
  width: 36px; height: 18px;
  appearance: none;
  background: #dde3ee;
  border-radius: 16px;
  outline: none;
  position: relative;
  transition: background .13s;
  cursor: pointer;
}
.cookie-toggle input[type=checkbox]:checked {
  background: var(--color-secondary);
}
.cookie-toggle input[type=checkbox]::before {
  content: "";
  position: absolute;
  left: 0px; top: 1.5px;
  width: 18px; height: 15px;
  background: #fff;
  border-radius: 50px;
  transition: left .11s;
}
.cookie-toggle input[type=checkbox]:checked::before {
  left: 18px;
}
.cookie-modal .action-row {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 22px;
}
.cookie-modal button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 18px;
  font-weight: 600;
  margin-left: 8px;
}
.cookie-modal button.cancel {
  background: #dde3ee;
  color: #2b3c45;
}
.cookie-modal .close-modal {
  position: absolute; right: 14px; top: 14px;
  background: transparent; border: 0; color: #444;
  font-size: 1.6rem;
}
.cookie-modal .close-modal:hover {
  color: #e23a30;
}

/***** MQ for modal *****/
@media (max-width: 500px){
  .cookie-modal{padding: 20px 7px 15px 10px;}
}

/* ================================
   ARTISTIC EFFECTS
   ================================ */
.card, .feature, .testimonial-card, .team-list > div {
  box-shadow: 0 3px 28px #17437712, 0 1px 2px #ffc30035;
  border-radius: 17px 10px 22px 13px/20px 15px 14px 19px;
  border: 2.5px solid #FFD16125;
}
.card:before, .feature:after {
  content: '';
  display: block;
  position: absolute;
  left: -17px;
  top: -22px;
  width: 38px;
  height: 15px;
  background: #ffd16180;
  filter: blur(1.5px);
  z-index: 0;
  border-radius: 100px;
  opacity: .33;
}
.feature:after {
  left: unset; right: -14px; top: unset; bottom: -14px;
  width: 26px; height: 9px;
  opacity: .19;
  background: #17437730;
}

/***** SEPARATORS & LINES *****/
hr{
  border: none;
  border-top: 2px dashed var(--color-secondary);
  margin: 32px 0;
  opacity: .3;
}

/* =====================
   OVERRIDES FOR CLASSES
   ===================== */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/****** ENFORCE FLEXBOX FOR ALL LAYOUTS ******/
.features, .card-grid, .case-study-list, .content-row,
.milestones-list, .text-image-section, .footer-nav, .footer-contact,
.benefits-grid, .features-grid, .team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* =====================
   ACCESSIBILITY
   ===================== */
[tabindex]:focus { outline: 2px dashed var(--color-secondary); }

/* =====================
   PRINT OVERRIDES
   ===================== */
@media print {
  .mobile-menu, .cookie-banner, .cookie-modal-overlay, .cta-btn, .main-nav, .footer-nav {
    display: none !important;
  }
}
