/* -------------------------
 0. 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,menu,nav,output,ruby,section,summary,time,mark,audio,video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  box-sizing: border-box;
  font-size: 16px;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: #F7F7F5;
  color: #212325;
  min-height:100vh;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
a {
  color: #123B5B;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #c2a341;
  outline: none;
}
ul, ol {
  list-style: none;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
}
:focus {
  outline: 2px solid #d4b141;
  outline-offset: 1px;
}

/* -------------------------
 1. BRAND VARIABLES
--------------------------*/
:root {
  --primary: #123B5B;
  --secondary: #36A098;
  --accent: #F7F7F5;
  --luxury-gold: #d4b141;
  --luxury-gold-dark: #c2a341;
  --text-dark: #212325;
  --text-light: #f9f9f8;
  --footer-bg: #10151d;
  --shadow: 0 4px 12px 0 rgba(18, 59, 91, 0.09);
}

/* -------------------------
 2. TYPOGRAPHY
--------------------------*/
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.15;
}
h1 {
  font-size: 2.6rem;
  letter-spacing: -1px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.25rem;
}
h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
}
p, li, ul, ol {
  font-size: 1rem;
  margin-bottom: 12px;
}
strong, b {
  font-weight: bold;
}
.text-section ul, .text-section ol {
  margin-bottom: 16px;
  margin-left: 22px;
  list-style: disc inside;
}
.text-section ul li, .text-section ol li {
  margin-bottom: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
table th, table td {
  padding: 14px 20px;
  text-align: left;
}
table th {
  background: var(--primary);
  color: var(--text-light);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
}
table tr:nth-child(odd) td {
  background: #f1f3f6;
}
table tr:nth-child(even) td {
  background: #fff;
}

/* -------------------------
 3. LAYOUT CONTAINERS (Flexbox Only)
--------------------------*/
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
}
.content-wrapper {
  margin: 0 auto;
  max-width: 780px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 8px 24px 0 rgba(212, 177, 65, 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: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
  justify-content: center;
  align-items: center;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  font-size: 0.97rem;
  margin-bottom: 15px;
}

/* -------------------------
 4. HEADER & NAVIGATION
--------------------------*/
header {
  background: #fff;
  border-bottom: 1px solid #ececec;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 8px 0 rgba(18, 59, 91, 0.04);
}
header > .container {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 16px 18px 14px 18px;
}
header img[alt="AutoVäli"] {
  height: 44px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--primary);
  font-weight: 500;
  font-size: 1.03rem;
  letter-spacing: 0.01em;
  padding: 4px 0;
  position: relative;
  transition: color 0.18s;
}
.main-nav a::after {
  content: '';
  display: block;
  height: 2px;
  width: 0%;
  background: var(--luxury-gold);
  border-radius: 2px;
  transition: width .25s;
  margin-top: 1px;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--luxury-gold-dark);
}
.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 60%;
}
.cta-primary {
  display: inline-block;
  padding: 10px 30px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.07rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(95deg, var(--luxury-gold), #edcc71 85%);
  background-color: var(--luxury-gold);
  border-radius: 32px;
  box-shadow: 0 2px 16px 0 rgba(212, 177, 65, 0.08);
  text-shadow: 0 2px 11px rgba(123,80,16,0.10);
  letter-spacing: 0.01em;
  border:none;
  cursor:pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  position: relative;
  z-index: 1;
}
.cta-primary:after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(220, 180, 65, 0.10);
  border-radius: 32px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.18s;
}
.cta-primary:hover,
.cta-primary:focus {
  background: linear-gradient(90deg, var(--luxury-gold-dark), #e8bf3f 85%);
  color: var(--text-dark);
  box-shadow: 0 6px 32px 0 rgba(212, 177, 65, 0.15);
}
.cta-primary:hover:after,
.cta-primary:focus:after {
  opacity: 1;
}

@media (max-width: 1024px) {
  .main-nav {
    gap: 14px;
  }
}
@media (max-width: 768px) {
  header > .container {
    padding: 10px 10px 8px 14px;
  }
  .main-nav {
    display: none;
  }
  .cta-primary {
    display: none;
  }
}

/* -------------------------
 5. MOBILE MENU
--------------------------*/
.mobile-menu-toggle {
  display: none;
  font-size: 2.2rem;
  background: var(--luxury-gold);
  color: var(--primary);
  border-radius: 6px;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 120;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: var(--luxury-gold-dark);
  color: #fff;
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    position: absolute;
    right: 18px;
    top: 17px;
  }
}
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(18, 59, 91, 0.93);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  will-change: transform;
  transition: transform 0.32s cubic-bezier(.59,.02,.32,1.04);
  pointer-events:none;
  opacity:0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: all;
  opacity:1;
}
.mobile-menu-close {
  position: absolute;
  right: 26px;
  top: 26px;
  font-size: 2.25rem;
  background: var(--luxury-gold);
  color: var(--primary);
  border: none;
  border-radius: 50px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2025;
  transition: background 0.16s, color 0.16s;
  box-shadow: 0 3px 14px 0 rgba(18,59,91, 0.13);
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: var(--luxury-gold-dark);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 110px 28px 42px 28px;
  align-items: flex-start;
}
.mobile-nav a {
  color: #fff;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 10px 10px 0;
  border-radius: 4px;
  transition: color 0.15s, background 0.13s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--luxury-gold);
  background: rgba(255,255,255,0.045);
}
@media (min-width: 769px) {
  .mobile-menu,
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* -------------------------
 6. HERO / CTA SECTIONS
--------------------------*/
.hero {
  background: linear-gradient(100deg, #f9f7ef 70%, #e8e3da 100%);
  border-bottom: 2.5px solid #dcd3b5;
  padding: 0;
  margin-bottom: 0;
}
.hero .container {
  display: flex;
  align-items: center;
  min-height: 320px;
  padding: 42px 20px 36px 20px;
}
.hero h1 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.13rem;
  color: #342f22;
  margin-bottom: 24px;
}
.hero .cta-primary {
  margin-top: 10px;
  font-size: 1.13rem;
}
.cta-section .container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px 20px;
}
.cta-section {
  background: #fffdee;
  border-radius: 18px;
  margin-bottom: 60px;
  box-shadow: 0 6px 18px 0 rgba(218,181,68,0.08);
  border: 1.5px solid #efe7d2;
}
.cta-section h2 {
  color: var(--luxury-gold-dark);
}
.cta-section .cta-primary {
  margin-top: 12px;
}

/* -------------------------
 7. FEATURE & GRID SECTIONS
--------------------------*/
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}
.feature-grid > div {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 330px;
  padding: 18px 18px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-bottom: 3px solid var(--luxury-gold);
  transition: box-shadow 0.15s, transform 0.14s;
}
.feature-grid > div img {
  height: 38px;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 7px rgba(215,186,63,0.18));
}
.feature-grid > div h3 {
  color: var(--luxury-gold-dark);
  font-size: 1.12rem;
}
.feature-grid > div:hover {
  box-shadow: 0 8px 25px 0 rgba(212,177,65,0.11);
  transform: translateY(-4px) scale(1.018);
}

/* -------------------------
 8. TESTIMONIALS
--------------------------*/
.testimonial-card {
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: stretch;
  border: 1.5px solid #e3e1e0;
  box-shadow: var(--shadow);
  border-radius: 22px;
  padding: 38px 28px 28px 28px;
  margin-bottom: 42px;
  color: #23241f;
}
.testimonial-card > div {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border-radius: 12px;
  font-size: 1.05rem;
  gap: 8px;
}
.testimonial-card strong {
  color: var(--primary);
  font-weight: 600;
  margin: 10px 0 0 0;
}
.testimonial-card [aria-label="Kliendi hinnang"] {
  margin-top: 3px;
}
.testimonial-card img[alt="Kliendi arvamus"] {
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
}
.testimonial-card [aria-label="Kliendi hinnang"] img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 1px;
}
@media (max-width: 800px) {
  .testimonial-card {
    flex-direction: column;
    gap: 22px;
    padding: 22px 12px 18px 12px;
  }
}

/* -------------------------
 9. BUTTONS & INTERACTIONS
--------------------------*/
button, .button, .cta-primary {
  cursor: pointer;
  user-select: none;
  outline: none;
}
buton:active, .cta-primary:active {
  transform: scale(0.98);
}

/* -------------------------
 10. FOOTER
--------------------------*/
footer {
  background: var(--footer-bg);
  color: var(--text-light);
  padding-top: 38px;
  padding-bottom: 16px;
  border-top: 4px solid var(--luxury-gold);
  margin-top: 60px;
}
footer a {
  color: var(--luxury-gold);
  font-weight: 500;
  transition: color 0.13s;
}
footer a:hover,footer a:focus {
  color: #fff;
  text-decoration: underline;
}
footer .footer-menu {
  margin-bottom: 20px;
}
footer .footer-contact img {
  vertical-align: middle;
  height: 20px;
  width: 20px;
  margin-right: 7px;
  filter: brightness(1.2) saturate(1.1) sepia(9%) hue-rotate(-16deg);
}
footer p {
  margin: 0;
  font-size: 0.96rem;
  color: #e0e0df;
  text-align: center;
}

/* -------------------------
 11. COOKIE CONSENT BANNER & MODAL
--------------------------*/
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: rgba(255,253,238, 0.98);
  color: #3f3f36;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3000;
  box-shadow: 0px -3px 22px 0 rgba(18,59,91,0.09);
  padding: 22px 14px 18px 14px;
  border-top: 2.5px solid var(--luxury-gold);
  gap: 16px;
  width: 100%;
  font-size: 1rem;
  animation: fadeInBanner 0.45s cubic-bezier(.46, .01, .36, 1.11);
}
@keyframes fadeInBanner {
  from { transform: translateY(48px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-buttons {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cookie-banner button {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  border-radius: 27px;
  padding: 7px 22px;
  border:none;
  margin: 0 3px;
  font-size: 1rem;
  transition: background 0.17s, color 0.15s;
}
.cookie-accept {
  background: linear-gradient(92deg, var(--luxury-gold), #e7c964);
  color: #fff;
}
.cookie-accept:hover, .cookie-accept:focus {
  background: var(--luxury-gold-dark);
  color: var(--primary);
}
.cookie-reject {
  background: #fff;
  color: var(--luxury-gold-dark);
  border: 1.2px solid var(--luxury-gold);
}
.cookie-reject:hover, .cookie-reject:focus {
  background: var(--luxury-gold-dark);
  color: #fff;
}
.cookie-settings {
  background: #fff;
  color: var(--primary);
  border: 1.2px solid var(--secondary);
}
.cookie-settings:hover,.cookie-settings:focus {
  background: var(--secondary);
  color: #fff;
}

.cookie-modal {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -120vh);
  background: #fffdf6;
  border-radius: 12px;
  box-shadow: 0 16px 48px 0 rgba(18,59,91,0.17);
  z-index: 5200;
  min-width: 90%;
  max-width: 440px;
  padding: 32px 22px 22px 22px;
  color: #23241C;
  transition: transform 0.36s cubic-bezier(.46, .01, .36, 1.11);
  opacity: 0;
  pointer-events: none;
}
.cookie-modal.open {
  transform: translate(-50%, 72px);
  opacity: 1;
  pointer-events: all;
}
.cookie-modal h3 {
  color: var(--primary);
  margin-bottom: 12px;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 20px;
}
.category {
  display: flex;
  align-items: center;
  gap: 13px;
}
.category label {
  flex: 1;
  color: var(--primary);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.07rem;
}
.category input[type="checkbox"] {
  appearance: none;
  background: #fff;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-content: center;
  transition: background 0.16s, border 0.18s;
}
.category input[type="checkbox"]:checked {
  background: var(--luxury-gold);
  border-color: var(--luxury-gold-dark);
}
.category input[type="checkbox"]:checked:after {
  content: '\2714';
  color: #fff;
  font-size: 1.1rem;
  position: relative;
  left: 2px;
  top: 1px;
}
.category input[type="checkbox"]:disabled {
  background: #eee;
  border-color: #bdbdbd;
  cursor: not-allowed;
}
.category input[type="checkbox"]:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
.cookie-modal .cookie-buttons {
  justify-content: flex-end;
  gap: 12px;
}
.cookie-modal-close {
  position: absolute;
  right: 17px;
  top: 17px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.17s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--luxury-gold-dark);
}

/* -------------------------
 12. GENERAL UTILITIES
--------------------------*/
.border-gold {
  border: 2.2px solid var(--luxury-gold)!important;
}
.text-gold {
  color: var(--luxury-gold-dark)!important;
}
.text-primary {
  color: var(--primary)!important;
}
.bg-light {
  background: #fffdf6!important;
}
.bg-accent {
  background: var(--accent)!important;
}
.hidden { display:none!important; }
.mt-8 { margin-top:8px!important; }
.mb-8 { margin-bottom:8px!important; }
.mt-24 { margin-top:24px!important; }

/* -------------------------
 13. TEXT SECTION, LISTS ETC
--------------------------*/
.text-section {
  margin-bottom: 24px;
}
.text-section ul,
.text-section ol {
  margin-top: 3px;
  margin-bottom: 11px;
  margin-left: 22px;
}
.text-section ul li::marker, .text-section ol li::marker {
  color: var(--luxury-gold-dark);
  font-size: 1em;
  font-weight: 600;
}
.text-section strong {
  color: var(--luxury-gold-dark);
}
.text-section a {
  color: var(--secondary); 
  text-decoration: underline;
}
.text-section a:hover {
  color: var(--luxury-gold-dark);
}

/* -------------------------
 14. RESPONSIVE BREAKPOINTS
--------------------------*/
@media (max-width: 1140px) {
  .container {
    max-width: 97vw;
    padding: 0 9px;
  }
}
@media (max-width: 900px) {
  .feature-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .feature-grid > div {
    max-width: none;
    min-width: 0;
    width: 100%;
  }
  .section {
    margin-bottom: 48px;
    padding: 30px 10px;
  }
  .cta-section {
    margin-bottom: 32px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .container, .content-wrapper {
    padding: 0 5px;
    max-width: 97vw;
  }
  .hero .container {
    min-height: 180px;
    padding: 28px 8px 19px 8px;
  }
  .feature-grid {
    gap: 13px;
  }
  .testimonial-card {
    padding: 13px 4px 14px 4px;
  }
  .footer-menu,.footer-contact {
    flex-direction: column;
    gap: 10px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .cookie-banner {
    font-size: 0.95rem;
    padding: 15px 5px 12px 5px;
  }
}

/* -------------------------
 15. MICRO-INTERACTIONS & TRANSITIONS
--------------------------*/
.card, .feature-grid > div, .cta-primary, .main-nav a, .mobile-menu-toggle,
.mobile-menu-close, .cookie-accept, .cookie-reject, .cookie-settings {
  transition: box-shadow 0.13s, background 0.18s, color 0.14s;
}
.card:active, .feature-grid > div:active {
  transform: scale(.99);
}
button:active, .cta-primary:active {
  transform: scale(.96);
  transition: transform 0.09s;
}

/* -------------------------
 16. ACCESSIBILITY
--------------------------*/
[tabindex], a, button, input[type=checkbox] {
  outline: none;
}
:focus-visible {
  outline: 2px dashed var(--secondary);
  outline-offset: 2px;
}

/* -------------------------
 17. SPACING BETWEEN ELEMENTS
--------------------------*/
.section {
  margin-bottom: 60px!important;
  padding: 40px 20px!important;
}
.card-container,
.content-grid {
  gap: 20px!important;
}
.card {
  margin-bottom: 20px!important;
}
.text-image-section {
  gap: 30px!important;
}
.testimonial-card {
  gap: 20px!important;
  padding: 20px!important;
}
.feature-item {
  gap: 15px!important;
}
.card, .feature-grid > div, .testimonial-card {
  margin-bottom: 20px;
}

/* -------------------------
 18. PRINT (OPTIONAL)
--------------------------*/
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  .section, .cta-section { box-shadow: none!important; border:none!important; }
}
