/* ==============================
   RESET / BASE
https://www.bluehost.com/my-account/home
Login: vsheludchenko81@gmail.com
Password: 1105Misha2005!
Security PIN: 260912   
============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1f2933;
  background-color: #e0c4f4; /* Neutral filler behind the boxed layout */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* ==============================
   VARIABLES
============================== */
:root {
  --color-primary: #250082;   /* Deep Blue */
  --color-primary-dark: #1b0066;
  --color-accent: #DE3E00;    /* Orange/Red */
  --color-accent-dark: #c63600;
  --color-dark: #0f172a;      /* Almost Black */
  --color-light: #ffffff;
  --color-text-main: #1f2933;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --container-width: 1000px;
  --radius: 8px;
}

/* ==============================
   TYPOGRAPHY
============================== */
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--color-text-main);
  line-height: 1.2;
  margin: 0 0 16px 0;
}

h1 { font-size: 42px; }
h2 { font-size: 36px; text-align: center; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }

/* ==============================
   LAYOUT
============================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #e0c4f4;
  overflow-x: hidden;
}

/* ==============================
   HEADER
============================== */
.header {
  position: relative; /* Not sticky */
  top: 20px;            /* Отступ от верхнего края */
  left: 50%;            /* Двигаем центр к середине экрана */
  transform: translateX(-50%); /* Идеальное центрирование по горизонтали */
  width: 100%;
  background: radial-gradient(circle, #ffffff 0%, #e3e8a8 100%);
  border-radius: 15px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); 
  
  /* 5. Убираем border-bottom, он мешает тени создавать объем */
  border: none; 
  
  /* 6. Слой: самый высокий */
  z-index: 9999; 
  
  /* Убедимся, что padding не раздувает блок */
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
}

.logo {
  height: 100px; /* Original logo size */
  width: auto;
  display: block;
}

/* Desktop Navigation */
.nav {
  display: grid;
  /* 3 колонки слева, логотип (auto), 3 колонки справа */
  /* 1fr гарантирует, что левая и правая стороны будут одинаковой ширины */
  grid-template-columns: repeat(3, 1fr) auto repeat(3, 1fr);
  align-items: center;
  gap: 20px; /* Уменьшил gap, так как grid сам распределит пространство */
  width: 100%;
  font-family: 'Poppins', sans-serif;
}

/* Центрируем содержимое внутри колонок */
.nav a {
  display: flex;
  justify-content: center;
  white-space: nowrap; /* Чтобы текст не переносился */
}

/* Стили для ссылок (оставляем твои) */
.nav a:not(.btn) {
  font-weight: 600;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
  color: inherit;
  text-decoration: none;
}

/* Убираем border-bottom у ссылки с логотипом при ховере */
.nav a:has(.logo):hover {
  border-bottom-color: transparent;
}

.nav a:not(.btn):hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Mobile Menu Button (Hamburger) */
.menu-toggle {
  display: none; /* Hidden by default on desktop */
  width: 40px;
  height: 40px;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001; /* Must be above nav */
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 3px;
  width: 24px;
  background: var(--color-primary);
  border-radius: 9px;
  opacity: 1;
  left: 8px;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 18px; }
.menu-toggle span:nth-child(3) { top: 26px; }

/* Hamburger to 'X' animation */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==============================
   BUTTONS
============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-light);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-accent {
  background: var(--color-accent);
  color: var(--color-light);
}
.btn-accent:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-light);
  border-color: var(--color-light);
}
.btn-outline:hover {
  background: var(--color-light);
  color: var(--color-primary);
}

/* ==============================
   HERO SECTION
============================== */
.hero {
  position: relative;
  padding: 80px 0 350px;
  color: var(--color-light);
  overflow: hidden;
  display: block;
}

.hero--home {
  background-image: url('../assets/Fasad__.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 270px; 

}

.hero--windows {
  background-image: url('../assets/window_.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 180px; 

}

.hero--doors {
  background-image: url('../assets/door_.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 140px; 

}

.hero--energy {
  background-image: url('../assets/energy_.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 140px;
}
.hero--glass {
  background-image: url('../assets/glass_.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 150px; 

}
.hero--glass .hero-subcopy {
  margin-top: 160px; /* controls distance below the heading */
}

.hero--gallery {
  background-image: url('../assets/gallery_.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 120px; 
}

.hero--reviews {
  background-image: url('../assets/reviews.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: right center;
  padding: 64px 0 120px; 
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px; /* Pinned to the bottom */
  width: 100%;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,80 C240,40 480,120 720,80 C960,40 1200,120 1440,80 L1440,101 L0,101 Z' fill='%23250082'/%3E%3C/svg%3E") no-repeat center bottom / cover;
  z-index: 5;
}

.hero .container {
  text-align: left;            /* or center, etc. */
}
.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 42px;
  color: #fff;
  margin-bottom: 16px;
}
.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
}

.hero--home h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 30px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);

}

.hero--home p {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  width: 50%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: var(--color-primary-dark);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--home .container {
  text-align: center;
  transform: translateY(-40px); /* move upward */
}

.hero--windows h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 75%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
 
}

.hero--windows p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 50%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.windows-intro {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-border);
}

.hero--windows .container {
  text-align: center;
  transform: translateY(-40px); /* move upward */
}

.hero--doors h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 75%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--doors p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 60%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.hero--glass h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 75%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--glass p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 60%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.hero--energy h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 85%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--energy p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 70%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.hero--gallery h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 60%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--gallery p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 60%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.hero--reviews h1 {
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 500;
  width: 75%;
  color: #165e02;
  margin: 0 auto;        /* centers the block */
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  backdrop-filter: blur(8px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero--reviews p {
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 10px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  width: 70%;
  margin: 10px auto 0;
  text-align: center;    /* optional: centers text when white-space: nowrap is set */
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.hero--doors .container {
  text-align: center;
  transform: translateY(-40px); /* move upward */
}

.hero--glass .container {
  text-align: center;
  transform: translateY(-40px); /* move upward */
}

.hero--gallery .container {
  text-align: center;
  transform: translateY(80px); /* move upward */
}

.hero--reviews .container {
  text-align: center;
  transform: translateY(80px); /* move upward */
}

.hero--home,
.hero--windows,
.hero--glass,
.hero--energy,
.hero--gallery,
.hero--reviews,
.hero--doors {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Trust Grid - Repositioned */
.trust-grid {
  position: absolute;
  bottom: 40px; /* Raised slightly */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  z-index: 10; /* High z-index to ensure visibility */
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.trust-grid div {
  background: rgba(0, 0, 0, 0.45);
  padding: 12px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  .trust-grid {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 40px;
  }
}

/* ==============================
   SERVICES SECTION
============================== */
.services {
  position: relative;
  padding: 50px 0 80px;
  /* Restored gradient */
  background: linear-gradient(to bottom, #250082 0%, #250082 50px, #1b0066 100%);
}

.services h2 {
  color: var(--color-light);
  margin-bottom: 60px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.service-icon img {
  width: 100px;
  height: 100px;
}

.service-card p {
  color: var(--color-text-muted);
}

.service-link {
  margin-top: auto; /* Push to bottom */
  font-weight: 600;
  color: var(--color-primary);
}
.service-link:hover { color: var(--color-accent); }

/* Services Extra (Why Us, Reviews) */
.services-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 60px;
}

/* Glassmorphism style for both boxes */
.why-us, .reviews-box {
  background: rgba(30, 41, 59, 0.5); /* Dark blueish transparent */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 30px;
  color: var(--color-light);
  backdrop-filter: blur(8px);
}

.why-us h3, .reviews-box h3, .why-us li, .reviews-box blockquote, .review-author {
  color: var(--color-light) !important;
}

.why-us ul {
  padding-left: 20px;
  margin: 0;
  list-style-type: '✔ ';
}
.why-us li {
  padding-left: 10px;
  margin-bottom: 10px;
}

.stars {
  color: #f5b301;
  font-size: 20px;
  margin-bottom: 12px;
}

blockquote {
  margin: 0 0 12px 0;
  font-style: italic;
  opacity: 0.9;
}

.review-author {
  font-weight: 600;
}

/* Services CTA */
.services-cta {
  margin-top: 60px;
  text-align: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
}

.services-cta h3, .services-cta p {
  color: var(--color-light);
}
.services-cta h3 { font-size: 24px; }
.services-cta p { margin: 10px 0 20px; opacity: 0.9; }

/* ==============================
   FOOTER
============================== */
.footer {
  background: #1b0066;
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer p {
  margin: 0;
  font-size: 14px;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
}
.footer a:hover {
  color: var(--color-light);
}

/* ===== MODAL ===== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;

  /* 🔥 ВОТ ОНО */
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.modal-header {
  position: relative;
  display: flex;
  justify-content: center;   /* 🔥 центр */
  align-items: center;
  cursor: move;
  margin-bottom: 12px;
  background: var(--color-primary);
}

.modal-header h2 {
  margin: 0;
  text-align: center;
  color: var(--color-light);
}

.modal-content {
  padding: 32px;
  position: relative; /* 🔥 ВАЖНО */
  width: 420px;
  max-width: 95vw;

  max-height: 90vh;          /* 🔥 ВАЖНО */
  display: flex;
  flex-direction: column;

  background: #fff;
  border-radius: 12px;
  z-index: 2; 
}

/* Заголовок компактнее */
.modal-content h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.modal-content p {
  font-size: 14px;
  margin-bottom: 12px;
}
.modal[hidden] {
  display: none;
}

#estimate-form {
  display: flex;
  flex-direction: column;
  gap: 16px; 
}

#estimate-form button {
  align-self: flex-end;
  width: auto;
  padding: 10px 24px;
  margin-top: 4px;
}

#estimate-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* FORM */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px 10px;
  font-size: 14px;
  width: 100%;            /* full width of the form group */
  max-width: 360px;       /* optional: cap width */
  align-self: stretch;    /* keeps everything aligned */
}

.form-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 12px;
}

.form-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.form-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 12px;
}

.captcha-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.captcha-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

#captcha-question {
  font-weight: 600;
}

#captcha-input {
  width: 56px;
  padding: 6px 8px;
  text-align: center;
}

.btn-captcha {
  padding: 6px 10px;
  font-size: 12px;
}

textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 140px;
}

/* FILTER BUTTONS */
.gallery-filters {
  text-align: center;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 10px 20px;
  margin: 5px;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #fff;
  color: var(--color-primary);
}

/* GALLERY GRID */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.reviews .gallery-item img,
.reviews-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-loading,
.gallery-empty,
.gallery-error {
  grid-column: 1 / -1;
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
}

.gallery-error {
  color: var(--color-accent);
  font-style: normal;
  font-weight: 600;
}

/* ==============================
   RESPONSIVE & MOBILE MENU
============================== */
@media (max-width: 992px) {
  .menu-toggle { display: block; }

  .nav {
    position: fixed;
    top: 80px;
    right: 0;
    width: 100%;
    max-width: 280px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 24px 20px 40px;
    background: rgba(30, 10, 80, 0.7);
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .nav.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav a:not(.btn) {
    color: var(--color-light);
    font-size: 18px; /* Slightly smaller font */
    padding: 12px 20px;
    width: 90%;
    text-align: center;
    border: none; /* Remove the bottom border */
    border-radius: 12px; /* Rounded corners for card effect */
    background: rgba(255, 255, 255, 0.08); /* Subtle card background */
    transition: background 0.2s ease, transform 0.2s ease;
  }
  
   .nav a:not(.btn):hover {
    color: var(--color-light);
    background: rgba(255, 255, 255, 0.15); /* Highlight on hover */
    transform: scale(1.03);
    border-bottom-color: transparent; /* Ensure no border appears */
  }

  .nav .btn {
    margin-top: 20px;
    width: 90%;
    font-size: 18px;
  }

}

@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }

  .services-extra {
    grid-template-columns: 1fr;
  }

  /* Hero Section Mobile Overrides */
  .hero {
    padding: 60px 0 150px; /* Reduced padding for mobile */
  }

  .hero h1 {
    font-size: 1.8rem; /* Responsive font size */
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero--home .container,
  .hero--windows .container,
  .hero--glass .container,
  .hero--energy .container,
  .hero--gallery .container {
    transform: none; /* Reset vertical shift */
  }

  .hero--gallery .container,
  .hero--reviews .container {
  transform:  translateY(80px); /* Reset vertical shift */
  }


  .hero--home h1,
  .hero--home p,
  .hero--windows h1,
  .hero--windows p,
  .hero--glass h1,
  .hero--glass p,
  .hero--energy h1,
  .hero--energy p,
  .hero--gallery h1,
  .hero--gallery p,
  .hero--reviews h1,
  .hero--reviews p,
  .hero--doors h1,
  .hero--doors p {
    width: auto; /* Let it fit the container */
    max-width: 100%;
    white-space: normal; /* Allow text to wrap */
    padding: 10px 20px;
    margin-left: 0;
    margin-right: 0;
  }

  .hero--home h1,
  .hero--windows h1,
  .hero--glass h1,
  .hero--energy h1,
  .hero--gallery h1,
  .hero--reviews h1,
  .hero--doors h1 {
    font-size: 1.5rem; /* Larger font size for headings */
  }

  .hero--home p,
  .hero--windows p,
  .hero-glass p,
  .hero--energy p,
  .hero--gallery p,
  .hero--reviews p,
  .hero--doors p {
    font-size: 1rem;
  }

  .trust-grid div {
    white-space: normal; /* Allow text to wrap */
    text-align: center;
  }

  .form-group label {
    font-size: 12px;
  }
  
}

@media (max-width: 992px) and (max-height: 500px) {
  .nav {
    gap: 8px;
    padding: 18px 16px 28px;
  }

  .nav a:not(.btn) {
    padding: 10px 16px;
  }

  .nav .btn {
    margin-top: 12px;
  }
}
