/* /assets/css/style.css */

/* ----- Backgrounds ----- */
.hero-bg { background-image: url('/media/images/pexels-photo-3184292.webp'); background-size: cover; background-position: center; }
.process-bg { background-image: url('/media/images/pexels-photo-3184467.webp'); background-size: cover; background-position: center; }
.why-us-bg { background-image: url('/media/images/pexels-photo-3184419.jpeg'); background-size: cover; background-position: center; }

/* ----- Base utilities ----- */
.spacer { height: 30px; background-color: #f3f4f6; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.smooth-scroll { scroll-behavior: smooth; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
.hover-scale { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-scale:hover { transform: scale(1.03); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); }

/* ----- Overlay (вернули базовый стиль) ----- */
.overlay { background-color: rgba(0, 0, 0, 0.5); padding: 2rem; border-radius: 8px; }

/* ----- Modals & floating buttons ----- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 50; }
.modal-content { background-color: white; margin: 5% auto; padding: 20px; border-radius: 8px; width: 90%; max-width: 500px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }

.whatsapp-btn { position: fixed; bottom: 20px; right: 70px; width:50px; height:50px; background-color: #25D366; color: white; border-radius: 50%; z-index: 40; display:flex;justify-content:center;align-items:center; font-size:24px; line-height:1; box-shadow:0 4px 12px rgba(0,0,0,.15); transition:.25s;}
.whatsapp-btn:hover { background-color: #1DA851; transform:translateY(-2px);}

.back-to-top { position: fixed; bottom: 20px; right: 20px; background-color: rgba(107, 114, 128, 0.7); color: white; padding: 10px 15px; border-radius: 50%; z-index: 40; opacity: 0; transition: opacity 0.3s; }
.back-to-top.visible { opacity: 1; }

/* ----- Typography ----- */
.text-urdu { font-family: 'Amiri', serif; direction: rtl; }

/* ----- Header (sticky hide/show) ----- */
.header-sticky { position: sticky; top: 0; z-index: 1000; transition: transform 0.5s ease-in-out; }
.header-hidden { transform: translateY(-100%); }
.header-visible { transform: translateY(0); }

/* ----- Cookies ----- */
.cookie-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 49; }
.cookie-banner { position: fixed; bottom: 20px; left: 20px; width: 100%; max-width: 500px; background-color: #1f2937; color: white; padding: 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); z-index: 50; }
.disabled-action { cursor: not-allowed; opacity: 0.5; }
.grecaptcha-badge { visibility: hidden !important; }

/* ----- Layout helpers ----- */
footer .container a + a { margin-left: 1rem; }
.map-container { height: 300px; }

/* ----- Language switcher ----- */
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-switcher select { background-color: #111827; color: white; padding: 5px 10px; border-radius: 5px; border: none; cursor: pointer; }
/* выпадающие пункты: тёмный текст на светлом фоне, чтобы были видны в списке */
.lang-switcher select option { color:#111827; background:#fff; }
/* в тёмной теме у некоторых браузеров — инвертируем */
[data-theme="dark"] .lang-switcher select option { color:#fff; background:#111827; }

/* убираем стандартные стрелки у select */
.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  background-image: none;
  border: none;
  outline: none;
  padding-right: 0.25rem;
  cursor: pointer;
}
.lang-switcher select::-ms-expand { display: none; }

/* контролируем видимость текст/флаг через классы */
.lang-text { display: block; background-color: #111827; }
.lang-flag { display: none; font-size: 22px; }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .modal-content { margin: 10% auto; }
  .whatsapp-btn { bottom: 10px; right: 60px; }
  .back-to-top { bottom: 10px; right: 10px; padding: 9px 15px; }
  .nav-menu { display: none; flex-direction: column; width: 100%; position: absolute; top: 100%; left: 0; background-color: #1f2937; padding: 1rem; }
  .nav-menu.active { display: flex; }
  .menu-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .guarantees-grid { grid-template-columns: 1fr; }
  .cookie-banner { max-width: 345px; padding: 12px; }
  footer .container a + a { margin-left: 0; }
  .lang-text { display: none; }
  .lang-flag { display: block; }
  header .container { flex-direction: row; justify-content: space-between; }
  .lang-switcher { order: 0; margin-left: auto; margin-right: 10px !important; }
  .menu-toggle { order: 1; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .guarantees-grid { grid-template-columns: 1fr 1fr; }
  .nav-menu { justify-content: space-between; }
  .cookie-banner { max-width: 462px; padding: 14px; }
}
@media (min-width: 1025px) {
  .nav-menu { display: flex; justify-content: space-between; padding: 0 2rem; }
  .menu-toggle { display: none; }
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .guarantees-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Theme tokens ----- */
:root {
  --bg-primary: #ffffff;
  --text-primary: #1f2937;
  --bg-secondary: #f3f4f6;
  --bg-accent: #f3f4f6;
  --text-secondary: #4b5563;
  --shadow: rgba(0, 0, 0, 0.1);
  --bg-box: #ffffff;
  --bg-gray: #f9fafb;
  --bg-faq-button: #ffffff;
  --text-faq: #1f2937;
  --hover-faq: #fef3c7;
  --focus-faq: #fde68a;
  --accent: #fde047; /* yellow-300 */
}

[data-theme="dark"] {
  --bg-primary: #000000;
  --text-primary: #ffffff;
  --bg-secondary: #1f2937;
  --bg-accent: #111827;
  --text-secondary: #d1d5db;
  --shadow: rgba(255, 255, 255, 0.1);
  --bg-box: #000;
  --bg-gray: #111827;
  --bg-faq-button: #1f2937;
  --text-faq: #ffffff;
  --hover-faq: #374151;
  --focus-faq: #4b5563;
}

/* ----- Themed surfaces ----- */
body { background-color: var(--bg-primary); color: var(--text-primary); }
.bg-gray-100 { background-color: var(--bg-secondary); }
.bg-white { background-color: var(--bg-box); }
.text-gray-800 { color: var(--text-primary); }
.bg-gray-50 { background-color: var(--bg-gray); }
.text-gray-700 { color: var(--text-secondary); }
header { background-color: var(--bg-secondary); }
footer { background-color: var(--bg-secondary); }
.modal-content { background-color: var(--bg-box); }

/* ----- FAQ (details) ----- */
#faqAccordion details {
  background-color: var(--bg-box);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 5px var(--shadow);
  overflow: hidden;
  transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

/* hover-подсветка только на устройствах с мышью — на мобилках её нет */
@media (hover:hover) and (pointer:fine) {
  #faqAccordion details:hover { background-color: var(--hover-faq); border-color: #fcd34d; }
}

/* убираем системные маркеры и tap-подсветку */
#faqAccordion summary::-webkit-details-marker,
#faqAccordion summary::marker { display: none !important; content: "" !important; }

#faqAccordion summary {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  cursor: pointer;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-faq);
  background-color: var(--bg-faq-button);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.25s ease, color 0.25s ease;
  border-bottom: 1px solid transparent;
}

/* полностью убираем фокус-рамку */
#faqAccordion summary:focus { outline: none !important; box-shadow: none !important; }

/* при раскрытии — тонкая граница сверху блока ответа */
#faqAccordion details[open] summary {
  background-color: var(--bg-faq-button);
  border-bottom: 1px solid #e5e7eb;
}

/* тело ответа */
#faqAccordion details > div {
  padding: 1rem 1.5rem 1.25rem;
  color: var(--text-secondary);
  background-color: var(--bg-box);
  font-size: 1rem;
  line-height: 1.6;
}

/* стрелка */
#faqAccordion summary i {
  color: #9ca3af;
  transition: transform 0.3s ease, color 0.25s ease;
}
#faqAccordion details[open] summary i { transform: rotate(180deg); color: #9ca3af; }

/* ---- DARK THEME FIX ---- */
[data-theme="dark"] #faqAccordion details {
  border-color: #374151;
  background-color: var(--bg-faq-button);
  box-shadow: 0 1px 4px rgba(255,255,255,0.08);
}
@media (hover:hover) and (pointer:fine) {
  [data-theme="dark"] #faqAccordion details:hover { background-color: var(--hover-faq); border-color: #d97706; }
}
[data-theme="dark"] #faqAccordion summary { background-color: var(--bg-faq-button); color: var(--text-faq); }
[data-theme="dark"] #faqAccordion details[open] summary { background-color: var(--bg-faq-button); border-color: #4b5563; }
[data-theme="dark"] #faqAccordion details > div { background-color: var(--bg-box); color: var(--text-secondary); }
[data-theme="dark"] #faqAccordion summary i { color: #d1d5db; }
[data-theme="dark"] #faqAccordion details[open] summary i { color: #d1d5db; }

/* ----- Theme switcher (hidden for now) ----- */
.theme-segmented { display: none; border: 1px solid var(--accent); border-radius: 9999px; overflow: hidden; width: fit-content; margin: 1rem auto; }
.theme-option { padding: 4px 12px; background: transparent; border: none; cursor: pointer; transition: background 0.3s, color 0.3s; font-size: 0.875rem; color: var(--text-secondary); }
.theme-option[aria-pressed="true"] { background: var(--accent); color: #1f2937; font-weight: bold; }
.theme-option:hover { background: rgba(253, 224, 71, 0.2); }
[data-theme="dark"] .theme-option { color: #d1d5db; }
[data-theme="dark"] .theme-option[aria-pressed="true"] { background: var(--accent); color: #1f2937; }
[data-theme="dark"] .theme-option:hover { background: rgba(253, 224, 71, 0.3); }

/* ----- SEO details blocks ----- */
.seo-details { background: var(--bg-box); border: 1px solid #e5e7eb; border-radius: 8px; }
.seo-summary { cursor: pointer; padding: .75rem 1rem; font-weight: 600; }
.seo-details-body { padding: .75rem 1rem 1rem; color: var(--text-secondary); }
[data-theme="dark"] .seo-details { border-color: #374151; }

/* ----- HERO mobile tweaks ----- */
@media (max-width: 768px) {
  #home.hero-bg {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  #home .overlay { padding: 0 !important; border-radius: 0 !important; }
  #home h1 { font-size: 1.75rem; line-height: 1.3; }
  #home h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
  #home p { font-size: 1rem; margin-top: 0.75rem; }
}

/* ----- Video popup styles ----- */
.video-modal-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}
.video-modal-window {
  position: relative;
  width: 90%;
  max-width: 860px;
  aspect-ratio: 3/2;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.video-close {
  position: absolute;
  top: 10px;
  right: 14px;
  color: #fff;
  font-size: 2rem;
  font-weight: 400;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 5;
  transition: color 0.2s ease;
}
.video-close:hover { color: #fbbf24; }
.video-modal-window iframe { width: 100%; height: 100%; border: 0; }

/* ----- Play button (hero) + ссылка (вернули .video-link) ----- */
.play-btn-pulse {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background-color: #fbbf24;
  color: #1f2937;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  z-index: 1;
  transition: transform 0.25s ease, background-color 0.25s ease;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}
.play-btn-pulse:hover { background-color: #eab308; transform: scale(1.05); }
.play-btn-pulse::before,
.play-btn-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.35);
  z-index: -1;
  animation: pulseGlow 2.4s ease-out infinite;
}
.play-btn-pulse::after { animation-delay: .2s; }
@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}
.play-btn-pulse i { margin-left: 3px; }

.video-link {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: #fde047;
  text-decoration: underline;
  transition: color 0.25s ease;
}
.video-link:hover { color: #fff; }
@media (max-width: 768px) {
  .play-btn-pulse { width: 60px; height: 60px; font-size: 16px; }
  .video-link { font-size: 1.1rem; }
}
