/* =============================================
   MAMAD PAGE — mamad.html
   ============================================= */

.mamad-page body { scroll-behavior: smooth; }

/* ── Header tweaks ── */
.mamad-page .site-header { position: fixed; }
.header-back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .2s;
}
.header-back:hover { color: #fff; }

/* ══════════════════════════════════════════
   HERO SLIDESHOW
══════════════════════════════════════════ */
.mhero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 60px; /* header height */
}

/* Background slides */
.mhero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mhero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s cubic-bezier(.4,0,.2,1);
}
/* The <img> fills the slide and stays put; the Ken Burns plays on the wrapper */
.mhero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.08);   /* slight zoom; no translateZ — avoids 1× texture downsampling */
  transition: none;
  will-change: transform;   /* compositing hint without quality loss */
  image-rendering: auto;
}
/* Active slide: fade in + Ken Burns zoom-settle on the img */
.mhero-slide.active {
  opacity: 1;
}
.mhero-slide.active img {
  animation: mhero-punch 8s cubic-bezier(.15,.85,.3,1) forwards;
}
@keyframes mhero-punch {
  0%   { transform: scale(1.18); }
  100% { transform: scale(1.0);  }
}
/* Leaving slide: quick fade + slight zoom out */
.mhero-slide.leaving {
  opacity: 0;
  transition: opacity .85s ease;
}
.mhero-slide.leaving img {
  animation: mhero-leave .85s ease forwards;
}
@keyframes mhero-leave {
  0%   { transform: scale(1.0); }
  100% { transform: scale(0.94); }
}

/* Gradient overlay */
.mhero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(10, 8, 6, 0.82) 0%,
    rgba(20, 12, 8, 0.70) 50%,
    rgba(10, 8, 6, 0.60) 100%
  );
}

/* Slide dots */
.mhero-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}
.mhero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.mhero-dot.active {
  background: var(--red);
  transform: scale(1.3);
}

/* Content */
.mhero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 100px;
  max-width: 760px;
}
.mhero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(211,28,29,.18);
  border: 1px solid rgba(211,28,29,.4);
  color: #f87171;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.mhero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 20px;
}
.mhero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

/* Stats bar */
.mhero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
}
.mhero-stat {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 16px;
  border-left: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.mhero-stat:last-child { border-left: none; }
.mhero-stat-icon { font-size: 1.4rem; margin-bottom: 2px; }
.mhero-stat strong {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
}
.mhero-stat span {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
}

/* CTA buttons */
.mhero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Scroll arrow */
.mhero-scroll {
  position: absolute;
  bottom: 36px;
  right: 50%;
  transform: translateX(50%);
  z-index: 10;
  color: rgba(255,255,255,.4);
  animation: mhero-bounce 2s ease-in-out infinite;
  pointer-events: none;
}
/* hide when dots are present (they share bottom space) */
.mhero-dots:not(:empty) + .mhero-scroll { display: none; }
@keyframes mhero-bounce {
  0%,100% { transform: translateX(50%) translateY(0); }
  50%      { transform: translateX(50%) translateY(6px); }
}

/* ══════════════════════════════════════════
   SECTIONS COMMON
══════════════════════════════════════════ */
.msec {
  padding: 80px 0;
}
.msec--dark {
  background: var(--dark);
  color: var(--white);
}
.msec--dark .section-title { color: var(--white); }
.msec--dark .section-desc  { color: rgba(255,255,255,.55); }
/* Brighter red on dark bg → meets WCAG AA (4.5:1) for small text */
.msec--dark .section-eyebrow {
  color: #FF6B6B;
  background: rgba(255, 107, 107, .12);
}

.msec--light {
  background: var(--warm-bg);
}
/* Darker red on light bg → meets WCAG AA easily */
.msec--light .section-eyebrow { color: var(--red-dark); }

/* ══════════════════════════════════════════
   WHY MAMAD — FACTS GRID
══════════════════════════════════════════ */
.mfacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.mfact-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: background .2s, border-color .2s;
}
.mfact-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(211,28,29,.35);
}
.mfact-icon { font-size: 2rem; margin-bottom: 14px; }
.mfact-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.mfact-card p {
  font-size: .84rem;
  color: rgba(255,255,255,.58);
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   SPECS — SPLIT LAYOUT
══════════════════════════════════════════ */
.mspecs-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.mspecs-text .section-title { margin-bottom: 12px; }
.mspecs-text > p { color: var(--text-light); margin-bottom: 28px; }
.mspecs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mspecs-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .9rem;
  color: var(--text);
}
.mspecs-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--red);
}
.mspecs-img {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mspecs-img img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}
.mspecs-img-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mspecs-img-badge svg { color: var(--red); }
.mspecs-note {
  margin-top: 8px;
  font-size: .72rem;
  color: var(--text-light);
  text-align: center;
}

/* ══════════════════════════════════════════
   PROCESS TIMELINE
══════════════════════════════════════════ */
.mprocess {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 52px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.mprocess::before {
  content: '';
  position: absolute;
  right: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.12);
}
.mprocess-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 36px;
  position: relative;
}
.mprocess-step--last { padding-bottom: 0; }
.mprocess-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}
.mprocess-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.mprocess-body p {
  font-size: .88rem;
  color: rgba(255,255,255,.58);
  line-height: 1.65;
  margin-bottom: 8px;
}
.mprocess-time {
  display: inline-block;
  background: rgba(211,28,29,.2);
  border: 1px solid rgba(211,28,29,.35);
  color: #f87171;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 600;
}

/* ══════════════════════════════════════════
   GALLERY CTA
══════════════════════════════════════════ */
.msec--gallery-cta {
  background: var(--dark);
}
.mgallery-cta-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.mgallery-cta-text .section-title { color: var(--white); margin-bottom: 12px; }
.mgallery-cta-text .section-eyebrow { color: #FF6B6B; background: rgba(255,107,107,.12); }
.mgallery-cta-text > p { color: rgba(255,255,255,.58); margin-bottom: 28px; line-height: 1.7; }
.mgallery-cta-text .btn-lg { font-size: 1rem; padding: 14px 28px; }
.mgallery-cta-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mgallery-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  display: block;
  transition: transform .25s, opacity .2s;
  opacity: .85;
}
.mgallery-thumb:hover { transform: scale(1.04); opacity: 1; }

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
.msec--contact {
  background: linear-gradient(135deg, #1a0e0e 0%, var(--dark) 60%);
  text-align: center;
}
.mcontact-wrap { max-width: 600px; margin: 0 auto; }
.mcontact-wrap .section-eyebrow { color: #FF6B6B; background: rgba(255,107,107,.12); }
.mcontact-wrap .section-title { color: var(--white); margin-bottom: 16px; }
.mcontact-wrap > p { color: rgba(255,255,255,.6); margin-bottom: 36px; line-height: 1.7; }
.mcontact-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ══════════════════════════════════════════
   MAMAD GALLERY SECTION
══════════════════════════════════════════ */
#mamad-gallery .gcat-grid {
  /* inherit 4-col grid from style.css; just ensure items visible on dark bg */
}
#mamad-gallery .gallery-item {
  background: rgba(255,255,255,.04);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .mfacts-grid { grid-template-columns: repeat(2, 1fr); }
  .mspecs-wrap { grid-template-columns: 1fr; gap: 36px; }
  .mspecs-img  { order: -1; }
  .mspecs-img img { aspect-ratio: 16/9; }
  .mgallery-cta-wrap { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .mhero-content { padding: 60px 0 80px; }
  .mhero-title   { font-size: 2.2rem; }
  .mhero-stats   { gap: 0; }
  .mhero-stat    { flex: 1 1 50%; }
  .mhero-ctas    { flex-direction: column; }
  .mfacts-grid   { grid-template-columns: 1fr; }
  .mgallery-cta-imgs { grid-template-columns: repeat(2, 1fr); }
  .mprocess::before  { right: 23px; }
}
