:root {
  --hdp-green: #2f7d32;
  --hdp-green-dark: #1f5f37;
  --hdp-green-deep: #12442b;
  --hdp-green-soft: #edf6ee;
  --hdp-gold: #b99355;
  --ink: #1f2937;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Cairo", Arial, sans-serif;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.text-hdp-dark {
  color: var(--hdp-green-deep);
}

.text-hdp-green {
  color: var(--hdp-green);
}

.bg-hdp-dark {
  background-color: var(--hdp-green-deep);
}

.border-hdp-green {
  border-color: var(--hdp-green);
}

.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  top: -6rem;
  z-index: 100;
  background: var(--hdp-green-deep);
  color: white;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  backdrop-filter: saturate(140%) blur(8px);
}

.logo-mark {
  display: grid;
  min-width: 4.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid rgba(18, 68, 43, 0.18);
  border-inline-start: 5px solid var(--hdp-green);
  background: white;
  color: var(--hdp-green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid #d9dfd8;
  background: white;
  padding: 0.55rem 0.8rem;
}

.badge-emblem {
  width: 1.1rem;
  height: 1.1rem;
  border: 3px solid var(--hdp-gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px white;
  background: var(--hdp-green);
}

.mobile-menu-btn {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  border: 1px solid #d1d5db;
  background: white;
}

.mobile-menu-btn span:not(.sr-only) {
  width: 1.25rem;
  height: 2px;
  background: var(--hdp-green-deep);
}

.nav-link {
  display: block;
  padding: 0.95rem 0;
  color: #5f6670;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.is-active {
  color: var(--hdp-green-deep);
}

.nav-link.is-active {
  border-bottom: 3px solid var(--hdp-green);
}

.nav-panel {
  display: none;
}

.nav-panel.is-open {
  display: block;
}

@media (min-width: 1280px) {
  .nav-panel {
    display: block;
  }

  .mobile-menu-btn {
    display: none;
  }

  .nav-link {
    padding: 1.1rem 0;
  }
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--hdp-green-deep);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  display: block;
  object-fit: cover;
  object-position: center 36%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(18, 68, 43, 0.42), rgba(18, 68, 43, 0.74) 52%, rgba(18, 68, 43, 0.9)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.08));
}

.btn-primary,
.btn-secondary,
.form-submit {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 0.85rem 1.4rem;
  font-weight: 800;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary,
.form-submit {
  background: var(--hdp-green);
  color: white;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.btn-primary:hover,
.btn-secondary:hover,
.form-submit:hover {
  transform: translateY(-1px);
}

.btn-primary:hover,
.form-submit:hover {
  background: var(--hdp-green-dark);
}

.whatsapp-contact {
  display: flex;
  width: fit-content;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.4rem;
  border: 1px solid #1f8f4c;
  background: #1f8f4c;
  padding: 0.7rem 1.05rem;
  color: white;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.section-heading+.whatsapp-contact {
  margin-inline: auto;
}

.whatsapp-contact:hover,
.whatsapp-contact:focus {
  background: #16713b;
  transform: translateY(-1px);
}

.whatsapp-contact__icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-section .whatsapp-contact,
.payment-card .whatsapp-contact {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(31, 143, 76, 0.9);
}

.hero-highlight {
  display: flex;
  min-height: 3rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.75rem 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(7px);
}

.section-white,
.section-gray {
  padding: 4.5rem 0;
}

.section-gray {
  background: #f5f7f6;
}

.section-heading {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.section-kicker {
  color: var(--hdp-green);
  font-size: 0.92rem;
  font-weight: 800;
}

.section-title {
  margin-top: 0.5rem;
  color: var(--hdp-green-deep);
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.35;
}

.fact-card,
.feature-card,
.unit-card,
.service-card,
.location-card,
.developer-card {
  border: 1px solid #dfe5df;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.fact-card {
  min-height: 9rem;
  padding: 1.4rem;
}

.fact-card strong {
  display: block;
  color: var(--hdp-green);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.fact-card span {
  margin-top: 0.75rem;
  display: block;
  color: #4b5563;
  font-weight: 700;
}

.feature-card {
  min-height: 9rem;
  padding: 1.2rem;
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--hdp-gold);
  font-weight: 800;
}

.feature-card p,
.service-card p,
.developer-card p {
  color: #374151;
  font-weight: 700;
  line-height: 1.8;
}

.unit-card {
  position: relative;
  min-height: 11rem;
  overflow: hidden;
  padding: 1.5rem;
}

.unit-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: var(--hdp-green);
}

.unit-card h3 {
  color: var(--hdp-green-deep);
  font-size: 1.25rem;
  font-weight: 800;
}

.unit-card p {
  margin-top: 1.6rem;
  color: var(--hdp-green);
  font-size: 1.8rem;
  font-weight: 800;
}

.floor-chip {
  min-width: 5rem;
  border: 1px solid #cfd8cf;
  background: #f8faf8;
  padding: 0.65rem 1.25rem;
  text-align: center;
  color: var(--hdp-green-deep);
  font-weight: 800;
}

.service-card {
  min-height: 8rem;
  padding: 1.25rem;
}

.service-card span {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid #d3ddcf;
  background: var(--hdp-green-soft);
  color: var(--hdp-green-deep);
  font-size: 1.05rem;
  font-weight: 800;
}

.location-card {
  padding: 1.2rem;
}

.location-map-link {
  display: inline-flex;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  border: 1px solid var(--hdp-green);
  background: var(--hdp-green);
  padding: 0.8rem 1.3rem;
  color: white;
  font-weight: 800;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.location-map-link:hover,
.location-map-link:focus {
  background: var(--hdp-green-dark);
  transform: translateY(-1px);
}

.location-card strong {
  display: block;
  color: var(--hdp-green);
  font-size: 1.5rem;
  font-weight: 800;
}

.location-card span {
  margin-top: 0.45rem;
  display: block;
  color: #4b5563;
  font-weight: 700;
}

.developer-card {
  min-height: 12rem;
  padding: 1.5rem;
}

.developer-card h3 {
  margin-bottom: 1rem;
  color: var(--hdp-green);
  font-weight: 800;
}

.payment-card {
  border: 1px solid rgba(185, 147, 85, 0.6);
  background:
    linear-gradient(135deg, rgba(18, 68, 43, 0.96), rgba(31, 95, 55, 0.96)),
    url("../img/hero-image.png") center/cover;
  padding: clamp(2rem, 7vw, 4rem);
  text-align: center;
  color: white;
}

.payment-card h2 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
}

.payment-card p {
  margin-top: 1rem;
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  font-weight: 800;
}

.payment-card span {
  margin-top: 1.4rem;
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.8rem 1.2rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  display: block;
  min-height: 14rem;
  overflow: hidden;
  border: 1px solid #dfe5df;
  background: white;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item::after {
  content: "عرض الصورة";
  position: absolute;
  inset-inline: 1rem;
  bottom: 1rem;
  background: rgba(18, 68, 43, 0.86);
  color: white;
  padding: 0.6rem 0.9rem;
  text-align: center;
  font-weight: 800;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.04);
  filter: saturate(1.04);
}

.gallery-item:hover::after,
.gallery-item:focus::after {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.registration-form {
  border: 1px solid #dfe5df;
  background: #f8faf9;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.registration-form label {
  display: block;
}

.registration-form .honeypot-field {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.registration-form span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--hdp-green-deep);
  font-weight: 800;
}

.registration-form input,
.registration-form select,
.registration-form textarea {
  width: 100%;
  border: 1px solid #cfd8cf;
  background: white;
  padding: 0.85rem 1rem;
  color: var(--ink);
  outline: none;
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus {
  border-color: var(--hdp-green);
  box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.14);
}

.registration-form small {
  min-height: 1.35rem;
  display: block;
  padding-top: 0.25rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.registration-form .is-invalid input,
.registration-form .is-invalid select,
.registration-form .is-invalid textarea {
  border-color: #b91c1c;
}

.registration-form .is-invalid small {
  color: #b91c1c;
}

.form-submit {
  margin-top: 1rem;
  width: 100%;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.form-message {
  min-height: 1.5rem;
  margin-top: 1rem;
  color: var(--hdp-green-deep);
  font-weight: 800;
  text-align: center;
}

.form-message[data-state="error"] {
  color: #b91c1c;
}

.form-message[data-state="loading"] {
  color: #475569;
}

.form-message[data-state="success"] {
  color: var(--hdp-green-deep);
}

.fixed-action {
  position: fixed;
  bottom: 1rem;
  z-index: 45;
}

.fixed-action a {
  display: inline-flex;
  min-width: 8.25rem;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.8rem 1rem;
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
}

.fixed-action-whatsapp {
  left: 1rem;
}

.fixed-action-whatsapp a {
  background: #1f8f4c;
  gap: 0.35rem;
}

.fixed-action-book {
  right: 1rem;
}

.fixed-action-book a {
  background: var(--hdp-green-deep);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 18, 12, 0.88);
  padding: 1rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-height: 86vh;
  width: min(100%, 70rem);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: white;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 2rem;
  line-height: 1;
}

@media (max-width: 639px) {

  .hero-section,
  .hero-content {
    min-height: 760px;
  }

  .hero-image {
    object-position: center center;
  }

  .hero-content {
    padding-bottom: 6rem;
  }

  .section-white,
  .section-gray {
    padding: 3.5rem 0;
  }

  .fixed-action {
    bottom: 0.75rem;
  }

  .fixed-action a {
    min-width: calc(50vw - 1.25rem);
    min-height: 3.05rem;
    padding-inline: 0.7rem;
    font-size: 0.84rem;
  }

  .fixed-action-whatsapp {
    left: 0.75rem;
  }

  .fixed-action-book {
    right: 0.75rem;
  }
}
