/* --- CSS RESET & BASE --- */
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;
  scroll-behavior: smooth;
  font-size: 16px;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  color: #183450;
  background: #F6FAFF;
  font-size: 1rem;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
}
a {
  color: #22416A;
  text-decoration: none;
  transition: color 0.25s;
}
a:hover, a:focus {
  color: #183450;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #22416A;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  font-weight: 700;
}
h1 { font-size: 2.25rem; margin-bottom: 24px; }
h2 { font-size: 1.5rem; margin-bottom: 20px; }
h3 { font-size: 1.125rem; margin-bottom: 16px; }
h4 { font-size: 1rem; margin-bottom: 12px; }
p, li, table, th, td {
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
  color: #22324B;
}
strong { font-weight: 700; }

@media (min-width: 600px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }
}
/* --- BUTTONS --- */
.cta-btn, button, .cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1.125rem;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  background: #22416A;
  color: #fff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px 0 rgba(34,65,106,0.07);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, color 0.18s, transform 0.15s;
  margin-top: 18px;
}
.cta-btn:hover, .cta-btn:focus, button:hover, button:focus, .cookie-btn:hover, .cookie-btn:focus {
  background: #183450;
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(34,65,106,0.15);
  outline: none;
  transform: translateY(-2px) scale(1.02);
}
button {
  min-width: 44px;
}

/* --- STRUCTURE & LAYOUT --- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 16px 0 rgba(34, 65, 106, 0.05);
}
.content-wrapper, .text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section:last-child {
  margin-bottom: 0;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px 0 rgba(34, 65, 106, 0.07);
  padding: 24px 20px;
  min-width: 240px;
  transition: box-shadow 0.22s;
}
.card:hover {
  box-shadow: 0 6px 20px 0 rgba(34, 65, 106, 0.14);
}
.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: #F6FAFF;
  border-radius: 10px;
  box-shadow: 0 1px 4px 0 rgba(34,65,106,0.08);
  margin-bottom: 20px;
  font-style: normal;
  color: #22416A;
}
.testimonial-card p {
  font-size: 1.125rem;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #202E44;
}
.testimonial-card strong {
  font-size: 0.98rem;
  color: #22416A;
  margin-left: 10px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* --- SPECIAL FLEX LAYOUTS from MANDATORY PATTERNS --- */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin-top: 10px;
  margin-bottom: 12px;
}
.feature-grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F6FAFF;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px 0 rgba(34,65,106,0.06);
  font-weight: 500;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #22416A;
  min-width: 220px;
  flex: 1 1 230px;
}
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin-bottom: 20px;
}
.service-cards li {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1.5px 6px 0 rgba(34, 65, 106, 0.08);
  padding: 24px 20px;
  flex: 1 1 240px;
  min-width: 200px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.22s;
}
.service-cards li:hover {
  box-shadow: 0 8px 26px 0 rgba(34, 65, 106, 0.13);
}
.window-types {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin-bottom: 22px;
}
.window-types li {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px 0 rgba(34,65,106,0.09);
  flex: 1 1 230px;
  min-width: 200px;
  padding: 18px 18px 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}
.window-features {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin-bottom: 10px;
}
.window-features li {
  background: #F6FAFF;
  color: #22416A;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  border-radius: 8px;
  box-shadow: 0 1px 4px 0 rgba(34,65,106,0.07);
  padding: 10px 17px
}
.faq-highlight {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F6FAFF;
  border-left: 4px solid #22416A;
  padding: 16px 22px;
  border-radius: 8px;
  color: #22324B;
  margin-bottom: 18px;
}
.quick-contact-prompt {
  margin-top: 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px 0 rgba(34,65,106,0.07);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}

.faq-accordion h2 {
  font-size: 1.12rem;
  font-weight: 600;
  color: #22416A;
  margin-bottom: 6px;
}
.faq-accordion p {
  margin-bottom: 16px;
}

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px 0 rgba(34,65,106,0.06);
  overflow: hidden;
}
table th, table td {
  padding: 12px 14px;
  border-bottom: 1px solid #A9B8C8;
  font-weight: 500;
  text-align: left;
}
table th {
  background: #22416A;
  color: #fff;
}
table tr:last-child td {
  border-bottom: none;
}

/* --- MAP EMBED (Contact page) ---*/
.map-embed {
  margin-top: 18px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 8px 0 rgba(34,65,106,0.09);
  display: flex;
  align-items: center; 
  justify-content: center;
}

/* --- HEADER --- */
header {
  background: #22416A;
  color: #fff;
  box-shadow: 0 2px 10px rgba(34,65,106,0.08);
  position: sticky;
  top: 0;
  z-index: 110;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
header nav a {
  color: #F6FAFF;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.19s, color 0.19s;
}
header nav a:hover, header nav a:focus {
  background: #A9B8C8;
  color: #22416A;
}
header nav .cta-btn {
  background: #fff;
  color: #22416A;
  box-shadow: 0 1px 4px 0 rgba(34,65,106,0.07);
  font-weight: 700;
  padding: 10px 18px;
  letter-spacing: 0.01em;
  margin-left: 10px;
  border-radius: 6px;
  transition: background 0.19s, color 0.18s, box-shadow 0.15s;
}
header nav .cta-btn:hover, header nav .cta-btn:focus {
  background: #A9B8C8;
  color: #183450;
  box-shadow: 0 3px 12px 0 rgba(34,65,106,0.11);
}
header img[alt="AblakMester"] {
  max-height: 44px;
  height: 44px;
  width: auto;
}

.mobile-menu-toggle {
  display: none;
  background: #fff;
  color: #22416A;
  font-size: 2rem;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  margin-left: 10px;
  cursor: pointer;
  transition: background 0.13s, color 0.14s, box-shadow 0.13s;
  z-index: 121;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #A9B8C8;
  color: #22416A;
  box-shadow: 0 2px 8px 0 rgba(34,65,106,0.08);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(24,39,64,0.97);
  z-index: 200;
  transform: translateX(-105%);
  transition: transform 0.35s cubic-bezier(.36,1.55,.6,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 16px 24px 0 0;
  border: none;
  background: #fff;
  color: #22416A;
  font-size: 2rem;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  z-index: 201;
  transition: background 0.13s, color 0.14s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #A9B8C8;
  color: #22416A;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  align-items: flex-start;
  margin-top: 36px;
  padding: 0 32px;
}
.mobile-nav a {
  color: #fff;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 0px;
  border-radius: 0;
  width: 100%;
  transition: background 0.17s, color 0.15s;
  text-align: left;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #A9B8C8;
  color: #22416A;
}

/* --- MAIN & SECTIONS --- */
main {
  padding-top: 18px;
  padding-bottom: 36px;
}
section {
  padding: 0;
  margin-bottom: 60px;
}
section:last-child {
  margin-bottom: 0;
}

/* --- FOOTER --- */
footer {
  background: #22416A;
  color: #fff;
  padding-top: 30px;
  padding-bottom: 30px;
  margin-top: 24px;
}
footer section {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
footer .container {
  padding-left: 16px;
  padding-right: 16px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
footer nav a {
  color: #F6FAFF;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 7px;
  border-radius: 4px;
  transition: background 0.14s, color 0.16s;
}
footer nav a:hover, footer nav a:focus {
  background: #A9B8C8;
  color: #22416A;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.92rem;
}
.footer-links a {
  color: #A9B8C8;
  font-weight: 500;
  transition: color 0.17s;
}
.footer-links a:hover, .footer-links a:focus {
  color: #fff;
}
.contact-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
}
.contact-summary img {
  height: 20px;
  width: auto;
  vertical-align: middle;
}
.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}
.social-links img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1); /* white icons on dark */
  transition: filter 0.15s;
  cursor: pointer;
}
.social-links img:hover, .social-links img:focus {
  filter: brightness(0.85) sepia(1) hue-rotate(180deg);
}
footer > section > .container > .content-wrapper > div:last-child {
  margin-top: 14px;
  font-size: 0.94rem;
  color: #A9B8C8;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
  .feature-grid, .window-types, .service-cards {
    flex-direction: column;
    gap: 16px;
  }
  .content-grid, .card-container {
    flex-direction: column;
    gap: 14px;
  }
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  header nav {
    display: none;
  }
  .feature-grid, .window-types, .window-features, .service-cards {
    flex-direction: column;
    gap: 14px;
  }
  .text-image-section, .content-grid, .card-container, .footer-links, .content-wrapper, .text-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  main {
    padding-top: 6px;
    padding-bottom: 16px;
  }
  h1 {
    font-size: 1.55rem;
    margin-bottom: 16px;
  }
  h2 {
    font-size: 1.22rem;
    margin-bottom: 12px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .section, section {
    padding: 18px 6px;
    margin-bottom: 35px;
    border-radius: 0;
  }
}
@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}

/* --- COOKIES CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  width: 100vw;
  background: #22416A;
  color: #fff;
  padding: 22px 16px;
  box-shadow: 0 -2px 16px 0 rgba(34,65,106,0.10);
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  transition: transform 0.38s cubic-bezier(.41,1.59,.58,1), opacity 0.28s;
}
.cookie-banner.hide {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner__msg {
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
  color: #F6FAFF;
  flex: 1 1 auto;
  margin-right: 14px;
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-left: 10px;
}
.cookie-btn {
  background: #fff;
  color: #22416A;
  border: none;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.17s, color 0.13s, box-shadow 0.14s;
}
.cookie-btn:hover,.cookie-btn:focus {
  background: #A9B8C8;
  color: #fff;
}

/* COOKIES MODAL POPUP */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(24, 39, 64, 0.65);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cookie-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal__content {
  background: #fff;
  color: #22416A;
  border-radius: 14px;
  padding: 32px 26px 26px 26px;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 96vw;
  box-shadow: 0 10px 32px 0 rgba(34,65,106,0.20);
  font-family: 'Roboto', Arial, sans-serif;
  gap: 22px;
  animation: fadeInPop 0.43s cubic-bezier(.43,1.05,.53,1.05);
}
@keyframes fadeInPop {
  0% { opacity: 0; transform: scale(0.92); }
  70% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
.cookie-modal__title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #22416A;
  margin-bottom: 4px;
}
.cookie-modal__close {
  position: absolute;
  top: 14px; right: 18px;
  border: none;
  background: #F6FAFF;
  color: #22416A;
  border-radius: 50%;
  font-size: 1.45rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 2;
}
.cookie-modal__close:hover, .cookie-modal__close:focus {
  background: #A9B8C8;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cookie-category label {
  font-weight: 600;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  color: #22416A;
  font-size: 1rem;
}
.cookie-category input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: #22416A;
  margin-top: 2px;
}
.cookie-category .category-desc {
  color: #22324B;
  font-size: 0.96rem;
  font-weight: 400;
  padding-left: 2px;
}
.cookie-category.essential label {
  opacity: 0.7;
}
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 7px;
}
.cookie-modal__actions .cookie-btn {
  min-width: 120px;
}

/* --- ANIMATIONS & MICRO-INTERACTIONS --- */
.cta-btn, .card, .service-cards li, .testimonial-card, .feature-grid li, .window-types li, .window-features li {
  transition: box-shadow 0.21s, transform 0.19s;
}
.cta-btn:active {
  transform: scale(0.97);
}
.card:active, .service-cards li:active, .testimonial-card:active, .feature-grid li:active, .window-types li:active {
  transform: scale(0.99);
}

/* --- SCROLLBAR (for aesthetic smoothness, not required for critical path) --- */
::-webkit-scrollbar {
  width: 10px;
  background: #F6FAFF;
}
::-webkit-scrollbar-thumb {
  background: #A9B8C8;
  border-radius: 8px;
}

/* --- MISCELLANEOUS --- */
ul, ol {
  margin: 0 0 20px 22px;
}
ul li, ol li {
  margin-bottom: 8px;
}
ul li:last-child, ol li:last-child { margin-bottom: 0; }

/* --- Hide outline for mouse users, preserve for keyboard --- */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Z-INDEX layering --- */
header, .mobile-menu, .cookie-banner, .cookie-modal { z-index: 100; }
section, main, .footer, .cookie-modal__content { z-index: 1; }

/* --- Accessibility: Reduce motion option --- */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    transition: none !important;
    animation: none !important;
  }
}
