/* =========================
   ABOUT PAGE LAYOUT STYLES
   File: assets/css/pages/about.css
   ========================= */

/* Main Container */
.page-about {
  min-height: 100vh;
  padding-top: var(--space-2xl-lg); /* 120px */
  padding-bottom: var(--section-padding-lg); /* 80px */
  background: var(--color-ivory);
}

/* =========================
   HERO SECTION
   ========================= */
.hero-about {
  width: 100%;
  padding: var(--section-padding-tablet) 1.25rem var(--space-lg-xl); /* 60px 20px 40px */
  text-align: center;
  position: relative;
}

.hero-about::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: calc(100% - 6rem); /* Match content padding (1.75rem each side) */
  max-width: calc(100% - 15rem); /* Never wider than content max-width */
  height: 0.0625rem; /* 1px */
  background: rgba(201, 169, 97, 0.55);
  transform: translateX(-50%);
}

.hero-about__content {
  max-width: var(--max-width-wide); /* 1200px */
  margin: 0 auto;
}

.hero-about__title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: var(--fw-regular);
  color: var(--color-deep-navy);
  letter-spacing: 0.0625rem; /* 1px */
  margin-bottom: var(--space-sm-lg);
  animation: fadeInUp 1s ease forwards;
}

.hero-about__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-charcoal);
  max-width: 90%;
  margin: 0 auto;
  animation: fadeInUp 1.2s ease forwards;
}

/* =========================
   ABOUT CONTENT SECTION
   ========================= */
.section-about {
  padding: 0 1.25rem;
  margin: 2rem auto;
}

/* ---------- Fix: robust grid that preserves your 2-up desktop → 1-up mobile behavior ---------- */
.about__grid {
  max-width: 75rem; /* keep your original width cap */
  margin: 0 auto;
  width: 100%;

  display: grid;

  /* 2 columns that shrink responsively with window size */
  grid-template-columns: repeat(2, 1fr);

  /* responsive gap that scales with window */
  gap: clamp(1rem, 2vw, 2rem);

  /* center cards inside their grid cells */
  justify-items: stretch;
  align-items: stretch;
}

/* ---------- Make cards consistent, centered and equal-height ---------- */
.about__block {
  width: 100%;
  height: 100%;
  box-sizing: border-box;

  background: rgba(255, 255, 255, 0.9);
  border: var(--border-width-xs) solid rgba(201, 169, 97, 0.18);
  border-radius: var(--radius-lg);

  padding: clamp(1rem, 3vw, 1.8rem);

  box-shadow: 0 var(--space-2xs) 25px rgba(0, 0, 0, 0.05);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.about__block:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 169, 97, 0.45);
  box-shadow: var(--shadow-lg);
}

.about__block h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  color: var(--color-deep-navy);
  margin-bottom: var(--space-sm); /* 16px */
  letter-spacing: 0.5px;
}

.about__block p {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: clamp(1.4, 2.5vw, 1.9);
  color: var(--color-charcoal);
  margin: 0;
}

/* =========================
   LISTS (VALUES + DIVISIONS)
   ========================= */
.about__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about__list li {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-charcoal);
  padding: var(--space-2xs) 0 var(--space-2xs) 1.625rem; /* 10px 0 10px 26px */
  position: relative;
}

.about__list li::before {
  content: "";
  width: var(--space-xs); /* 8px */
  height: var(--space-xs); /* 8px */
  border-radius: 50%;
  background: var(--color-gold-accent);
  position: absolute;
  left: 0;
  top: var(--space-sm-lg); /* 18px */
  opacity: 0.95;
}

/* ================================
   Mobile Menu (Hidden by Default)
   ================================ */

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(248, 246, 242, 0.98);
  backdrop-filter: blur(var(--space-2xs));
  border-bottom: 1px solid rgba(155, 147, 136, 0.15);
  padding: var(--space-lg) var(--space-xl);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.mobile-menu[aria-hidden="false"] {
  display: block;
  max-height: var(--max-width-card);
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mobile-menu__item {
  margin: 0;
  padding: 0;
}

.mobile-menu__link {
  display: block;
  padding: var(--space-xs) 0;
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition-smooth);
  width: 100%;
  text-align: left;
}

.mobile-menu__link:hover {
  color: var(--color-gold-accent);
  transform: translateX(var(--space-xs));
}

.mobile-menu__link--services {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu__arrow {
  display: inline-block;
  width: var(--space-xs);
  height: var(--space-xs);
  border: solid var(--color-charcoal);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: var(--transition-timing-transform);
  margin-left: auto;
}

.mobile-menu__link--services[aria-expanded="true"] .mobile-menu__arrow {
  transform: rotate(45deg);
}

/* Services Submenu */
.mobile-menu__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu__submenu.active {
  display: flex;
  max-height: var(--max-width-input);
}

.mobile-menu__link--submenu {
  font-size: var(--fs-sm);
  text-transform: capitalize;
  transform: none !important;
}

.mobile-menu__link--submenu:hover {
  transform: translateX(4px) !important;
}

/* =========================
   RTL SUPPORT (Arabic)
   ========================= */

html[dir="rtl"] .hero-about__title,
html[dir="rtl"] .hero-about__subtitle,
html[dir="rtl"] .about__block h2,
html[dir="rtl"] .about__block p {
  text-align: center;
}

html[dir="rtl"] .about__list li {
  padding-left: 0;
  padding-right: 1.625rem;
}

html[dir="rtl"] .about__list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .mobile-menu__link--services {
  flex-direction: row-reverse;
}

html[dir="rtl"] .mobile-menu__link--submenu:hover {
  transform: translateX(-4px) !important;
}

/* ================================
   RESPONSIVE: Largest (70rem / 1120px)
   ================================ */
@media (max-width: 70rem) {
  .about__block {
    padding: 1rem 0.7rem;
  }
}

/* ================================
   RESPONSIVE: Large (62rem / 992px)
   ================================ */
@media (max-width: 62rem) {
  .page-about {
    padding-top: var(--space-2xl); /* 64px */
    padding-bottom: var(--section-padding-tablet); /* 60px */
  }

  .hero-about {
    padding: var(--section-padding-tablet) 1.25rem var(--space-lg); /* 60px 20px 32px */
  }

  .hero-about::after {
    width: calc(100% - 6rem);
  }

  .hero-about__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: var(--space-md);
  }

  .hero-about__subtitle {
    max-width: 100%;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  }

  .section-about {
    padding: 0 1.25rem;
  }

  .about__grid {
    max-width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg); /* 32px */
  }

  .about__block {
    padding: var(--card-padding) var(--space-md); /* 48px 24px */
  }

  .about__block h2 {
    font-size: var(--fs-md);
    margin-bottom: var(--space-xs);
  }

  .mobile-menu {
    padding: var(--space-lg) var(--space-lg);
  }
}

/* ================================
   RESPONSIVE: Medium (59.375rem / 950px)
   ================================ */
/* ================================
   RESPONSIVE: Tablet (62rem / 992px)
   ================================ */
@media (max-width: 62rem) {
  .section-about {
    padding: 0 1rem;
  }

  .about__grid {
    max-width: 56rem;
    gap: 1.25rem;
  }

  .about__block {
    padding: 1rem 0.75rem;
  }

  .about__block h2 {
    font-size: var(--fs-md);
    margin-bottom: 0.5rem;
  }
}

/* ================================
   RESPONSIVE: Tablet (56.25rem / 900px) - Footer Centering
   ================================ */
@media (max-width: 56.25rem) {
  .footer__content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: normal;
    overflow-x: visible;
    grid-template-columns: unset;
    gap: var(--space-xl);
  }

  .footer__bottom {
    white-space: normal;
    overflow-x: visible;
  }

  .footer-section {
    flex: 0 1 auto;
    flex-shrink: 0;
    white-space: normal;
    text-align: center;
    width: 100%;
  }

  .footer__social-list {
    justify-content: center;
  }
}

/* ================================
   RESPONSIVE: Small (48.125rem / 770px)
   ================================ */
@media (max-width: 48.125rem) {
  .section-about {
    padding: 0 1rem;
  }

  .about__grid {
    max-width: 45rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .about__block {
    padding: 0.875rem 0.625rem;
  }

  .about__block h2 {
    font-size: var(--fs-sm-lg);
    margin-bottom: 0.375rem;
  }
}

/* ================================
   RESPONSIVE: Mobile (37.5rem / 600px)
   ================================ */
@media (max-width: 37.5rem) {
  .page-about {
    padding-top: var(--space-xl); /* 48px */
    padding-bottom: var(--section-padding-mobile); /* 40px */
  }

  .hero-about::after {
    width: calc(100% - 6rem);
  }

  .hero-about {
    padding: var(--space-lg) 1rem var(--space-lg); /* 32px 16px 32px */
  }

  .hero-about__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-sm);
  }

  .hero-about__subtitle {
    font-size: 0.95rem;
  }

  .section-about {
    padding: 0 1rem var(--space-sm);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg); /* 32px */
  }

  .about__block {
    padding: var(--card-padding-tablet) var(--space-md); /* 36px 24px */
  }

  .about__block h2 {
    font-size: var(--fs-sm-lg);
    margin-bottom: var(--space-2xs);
  }

  .about__block p {
    font-size: 0.9rem;
  }

  .about__list li {
    padding: var(--space-xs) 0 var(--space-xs) 1.25rem;
    font-size: 0.9rem;
  }

  .about__list li::before {
    width: 0.375rem; /* 6px */
    height: 0.375rem; /* 6px */
    top: 0.875rem; /* 14px */
  }

  .mobile-menu {
    padding: var(--space-md) var(--space-lg);
  }

  .mobile-menu__link {
    padding: var(--space-2xs) 0;
    font-size: 0.9rem;
  }
}
