/* ============================
   Goldan Prestige — Final Layout Fix v4
   إصلاح الكمبيوتر + الموبايل + قسم التواصل
   ============================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  position: relative;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* منع أي عنصر يكسر العرض */
.container,
.nav-container,
.stb-inner,
.contact-grid,
.services-grid,
.why-grid,
.testimonials-grid,
.projects-grid,
.footer-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ——— إصلاح حرج: عناصر الـ Grid ما توسّعش الصفحة ——— */
.contact-grid > *,
.services-grid > *,
.why-grid > *,
.testimonials-grid > *,
.projects-grid > *,
.footer-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* ——— AOS: ممنوع التحريك الأفقي (بيبوّظ الشاشة خاصة في قسم التواصل) ——— */
[data-aos],
[data-aos="fade-left"],
[data-aos="fade-right"],
[data-aos="fade-up"],
[data-aos="fade-down"],
[data-aos="zoom-in"] {
  opacity: 0;
  transform: translateY(24px) !important;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: none !important;
}

/* ——— Honeypot آمن بدون إزاحة سالبة ——— */
.gp-hp-wrap {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

/* ——— كروت متساوية ——— */
.services-grid,
.why-grid,
.testimonials-grid {
  align-items: stretch;
  gap: 20px;
}

.service-card,
.why-card,
.testi-card,
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 18px;
}

.service-card {
  padding: 28px 24px;
  text-align: right;
}

.service-list {
  flex: 1;
}

.service-cta {
  margin-top: auto;
  align-self: flex-start;
}

.why-card {
  align-items: center;
  text-align: center;
  padding: 28px 20px;
}

.why-card p {
  max-width: 240px;
}

.testi-card {
  padding: 24px 22px;
}

.testi-text {
  flex: 1;
}

.testi-author {
  margin-top: auto;
  padding-top: 12px;
}

.project-info {
  text-align: center;
  padding: 14px;
}

.section-header {
  text-align: center;
  margin-inline: auto;
  max-width: 640px;
}

/* ——— قسم التواصل (اللي كان بيتبوّظ على الكمبيوتر) ——— */
.contact {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.contact .container {
  overflow: visible;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
  width: 100%;
}

.contact-info {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.contact-info .section-title {
  text-align: right;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  line-height: 1.35;
}

.contact-form-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: visible !important;
  position: relative;
  padding: 36px 32px;
  border-radius: 20px;
  background: var(--dark-700, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-form {
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: visible !important;
}

.contact-form .form-group,
.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form .btn-submit {
  width: 100%;
  max-width: 100%;
}

.contact-direct-btns {
  width: 100%;
}

.contact-big-call,
.contact-big-wa {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* إلغاء النبض العنيف اللي يوسّع الظل برا الشاشة */
  animation: none !important;
}

.contact-big-call:hover,
.contact-big-wa:hover {
  transform: translateY(-2px);
}

.cbc-number {
  letter-spacing: 0.5px;
  word-break: keep-all;
  overflow-wrap: normal;
}

.form-title {
  text-align: right;
}

.gp-captcha-box {
  margin-bottom: 16px;
}

.gp-captcha-box input[type="number"] {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  background: var(--dark-600, #222);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

.gp-secure-msg {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #fca5a5;
}

/* ——— Hero متوازن على الديسكتوب ——— */
@media (min-width: 769px) {
  .hero {
    min-height: 90vh;
    padding: 140px 24px 150px !important;
  }

  .hero-title {
    font-size: clamp(2.1rem, 4vw, 3.4rem);
  }

  .navbar {
    top: 52px !important;
  }
}

/* ——— تابلت ——— */
@media (max-width: 1024px) and (min-width: 769px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  .services-grid,
  .why-grid,
  .testimonials-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .project-card.wide {
    grid-column: span 2;
  }

  .contact-form-wrap {
    padding: 28px 22px;
  }
}

/* ——— موبايل ——— */
@media (max-width: 768px) {
  :root {
    --section-py: 48px;
  }

  .sticky-top-bar {
    display: none !important;
  }

  .navbar {
    top: 0 !important;
    padding: 8px 0 !important;
    background: rgba(10, 10, 10, 0.96) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  }

  .nav-links,
  .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
    min-width: 40px;
    min-height: 40px;
  }

  .nav-container {
    padding: 0 14px;
  }

  .logo-img {
    width: 38px;
    height: 38px;
  }

  .nav-brand-ar {
    display: none;
  }

  .nav-brand-en {
    font-size: 0.78rem;
  }

  .container {
    padding: 0 14px;
  }

  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.35rem !important;
    line-height: 1.4;
  }

  .section-desc {
    font-size: 0.88rem;
  }

  .hero {
    min-height: auto !important;
    padding: 88px 14px 24px !important;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 5px 12px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: 1.5rem !important;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 0.85rem !important;
    margin-bottom: 16px;
  }

  .hero-cta-block {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }

  .hero-call-btn,
  .hero-wa-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    min-height: 46px;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .hcb-icon { width: 34px; height: 34px; }
  .hcb-number { font-size: 1.05rem; }
  .hcb-label { font-size: 0.7rem; }

  .hero-trust {
    gap: 8px 12px;
  }

  .trust-item {
    font-size: 0.72rem;
  }

  .hero-stats {
    position: relative !important;
    margin-top: 18px;
    padding: 12px 6px !important;
    border-radius: 12px;
    border: 1px solid rgba(201, 168, 76, 0.12);
  }

  .stat-divider { display: none; }

  .stat-item {
    flex: 1 1 25%;
    min-width: 0;
    max-width: none;
  }

  .stat-number { font-size: 1.1rem !important; }
  .stat-plus { font-size: 0.8rem; }
  .stat-label { font-size: 0.62rem; }

  .services-grid,
  .testimonials-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .project-card.wide {
    grid-column: auto !important;
  }

  .service-card,
  .testi-card {
    padding: 18px 16px !important;
    text-align: center;
  }

  .service-icon-wrap { justify-content: center; }
  .service-icon { width: 48px; height: 48px; font-size: 1.35rem; }
  .service-title, .service-desc { text-align: center; }
  .service-list { text-align: right; }
  .service-cta { align-self: center; }

  .why-card {
    padding: 14px 10px !important;
  }

  .why-icon { font-size: 1.5rem; margin-bottom: 6px; }
  .why-card h3 { font-size: 0.9rem; }
  .why-card p { font-size: 0.74rem; max-width: none; }

  .project-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .project-img-wrap {
    aspect-ratio: 16 / 10;
  }

  .projects-filter {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .section-cta {
    padding: 16px 14px;
  }

  .section-cta-btns {
    flex-direction: column;
    gap: 8px;
  }

  .section-cta-btns .btn-primary,
  .section-cta-btns .btn-wa {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* تواصل موبايل */
  .contact-info {
    text-align: center;
    align-items: center;
  }

  .contact-info .section-title {
    text-align: center !important;
    font-size: 1.3rem !important;
  }

  .contact-intro {
    text-align: center;
    font-size: 0.88rem;
  }

  .contact-meta {
    align-items: center;
  }

  .cm-item {
    justify-content: center;
  }

  .contact-form-wrap {
    padding: 20px 14px !important;
  }

  .form-title,
  .form-subtitle {
    text-align: center;
  }

  .contact-big-call,
  .contact-big-wa {
    padding: 12px 14px;
    min-height: 48px;
    justify-content: center;
  }

  .cbc-number {
    font-size: 1.1rem !important;
  }

  .mobile-menu {
    z-index: 2500;
    width: min(300px, 85vw);
    padding: 70px 20px 24px;
  }

  .mobile-bottom-bar {
    display: flex !important;
    padding: 8px 12px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    gap: 8px;
  }

  .mbb-call,
  .mbb-wa {
    min-height: 42px;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  .back-top {
    bottom: calc(68px + env(safe-area-inset-bottom)) !important;
    width: 40px;
    height: 40px;
  }

  .footer-brand,
  .footer-links-col,
  .footer-contact-col {
    text-align: center;
  }

  .footer-logo {
    margin-inline: auto;
    display: block;
  }

  .footer-links-col ul,
  .footer-hashtags,
  .footer-contact-item {
    justify-content: center;
    align-items: center;
  }

  .floating-cta {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.35rem !important;
  }

  .stat-item {
    flex: 1 1 50%;
  }

  .nav-brand-text {
    display: none;
  }
}
