/* ==========================================================================
   CarVice Express (كارفيس إكسبريس) - Services Page Stylesheet
   Designed strictly from "كارفيس خدماتنا.pdf" & Figma reference
   ========================================================================== */

/* Page Canvas */
body.services-page {
  background-color: #0B0E11;
  color: var(--color-text-dark, #0B0E11);
  font-family: var(--font-family-base, 'Cairo', sans-serif);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1. Services Hero Section — full-width image display with wave bottom
   -------------------------------------------------------------------------- */
.services-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0B0E11;
  overflow: hidden;
  margin-top: var(--services-hero-margin, 80px);
}

/* Hero image shown in full, no cropping */
.services-hero-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* "خدماتنا" title overlay on top of the image */
.services-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.services-hero-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 90px;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0;
  opacity: 1;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.85), 0 0 35px rgba(243, 168, 5, 0.35);
}

@media (max-width: 768px) {
  .services-hero {
    margin-top: var(--services-hero-margin, 74px);
  }
  .services-hero-title {
    font-size: 52px;
    line-height: 62px;
  }
}

@media (max-width: 480px) {
  .services-hero {
    margin-top: var(--services-hero-margin, 74px);
  }
  .services-hero-title {
    font-size: 38px;
    line-height: 48px;
  }
}

/* --------------------------------------------------------------------------
   2. Services Main Content Section
   -------------------------------------------------------------------------- */
.services-page-main {
  background-color: #FFFAEC;
  padding: 50px 24px 120px;
  position: relative;
}

@media (min-width: 1200px) {
  .services-page-main {
    padding: 60px 40px 140px;
  }
}

/* Section Header: « خدماتنا » */
.services-page-header {
  text-align: center;
  margin-bottom: 50px;
}

.services-page-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  color: #F3A805;
  margin: 0;
  letter-spacing: -0.5px;
}

.services-title-chevron {
  height: clamp(28px, 3.2vw, 42px);
  width: auto;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(243, 168, 5, 0.45));
  transition: transform 0.25s ease;
}

.services-page-title:hover .services-title-chevron:first-child {
  transform: translateX(4px);
}

.services-page-title:hover .services-title-chevron:last-child {
  transform: translateX(-4px);
}

/* --------------------------------------------------------------------------
   3. Services Cards Grid
   -------------------------------------------------------------------------- */
.services-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 420px;
  margin: 0 auto;
}

/* Tablet (2 columns) */
@media (min-width: 680px) and (max-width: 1079px) {
  .services-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 820px;
  }
  
  /* Last 11th card centered on tablet */
  .service-card:nth-child(11) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Desktop (6-column system for 3 cards per row + 2 centered cards in row 4) */
@media (min-width: 1080px) {
  .services-cards-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 36px;
    max-width: 1240px;
  }

  /* Regular 3-card rows (Cards 1 to 9): each spans 2 columns */
  .service-card:nth-child(-n+9) {
    grid-column: span 2;
  }

  /* Row 4: 2 cards centered (Card 10 in cols 2-3, Card 11 in cols 4-5) */
  .service-card:nth-child(10) {
    grid-column: 2 / span 2;
  }

  .service-card:nth-child(11) {
    grid-column: 4 / span 2;
  }
}

/* --------------------------------------------------------------------------
   4. Service Card Item (Direct Base Image with Front & Hover Content)
   -------------------------------------------------------------------------- */
.services-page .service-card,
.services-cards-grid .service-card,
.service-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  cursor: pointer;
  display: block;
  background-color: transparent !important;
  border: none !important;
  aspect-ratio: 700 / 840 !important;
  max-width: none !important;
  flex: initial !important;
}

.services-page .service-card:hover,
.services-cards-grid .service-card:hover,
.services-page .service-card.is-active,
.services-cards-grid .service-card.is-active,
.service-card:hover,
.service-card.is-active {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: none !important;
}

/* Base Image from 'services assets/' */
.services-page .service-card-img,
.services-cards-grid .service-card-img,
.service-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Front Face: Title & Yellow Button Overlay */
.services-page .service-card-front-content,
.services-cards-grid .service-card-front-content,
.service-card-front-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 24px 14px 18px;
  box-sizing: border-box;
  z-index: 2;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.services-page .service-card-front-title,
.services-cards-grid .service-card-front-title,
.service-card-front-title {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF !important;
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  letter-spacing: -0.3px;
}

/* Buttons System */
.services-page .service-card-btn,
.services-cards-grid .service-card-btn,
.service-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96%;
  max-width: 460px;
  height: 42px;
  border-radius: 0px 0px 16px 16px;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
  transition: all 0.3s ease;
  user-select: none;
  border: none !important;
  background-image: none !important;
  color: #FFFFFF !important;
}

.services-page .service-card-btn-front,
.services-cards-grid .service-card-btn-front,
.service-card-btn-front {
  background-color: #F3A805 !important;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
  box-shadow: 0 4px 15px rgba(243, 168, 5, 0.3) !important;
}

.services-page .service-card:hover .service-card-btn-front,
.services-cards-grid .service-card:hover .service-card-btn-front,
.service-card:hover .service-card-btn-front {
  background-color: #F3A805 !important;
  color: #FFFFFF !important;
}

/* Hover Face: Shadow Overlay, Title, Detailed List, Charcoal Button */
.service-card-hover-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.45) 0%, 
    rgba(0, 0, 0, 0.65) 28%, 
    rgba(0, 0, 0, 0.78) 50%, 
    rgba(0, 0, 0, 0.86) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34% 14px 18px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  border-radius: 28px;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.35s;
  z-index: 3;
  text-align: center;
}

.service-card-hover-header {
  margin-top: 0;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card-hover-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: 0%;
  text-align: center;
  vertical-align: middle;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8);
  margin: 0 auto;
  max-width: 436px;
}

/* Segmented divider after each heading */
.service-card-hover-liner {
  display: block;
  width: 65%;
  max-width: 250px;
  height: auto;
  margin: 6px auto 0;
  object-fit: contain;
}

.service-card-hover-line {
  display: none;
}

/* Items list */
.service-card-hover-list {
  list-style: none;
  padding: 0;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  direction: rtl;
}

/* Max 2 columns and 4 points in each column */
.service-card-hover-list.is-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
}

.service-card-hover-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 15px;
  line-height: 18px;
  letter-spacing: 0%;
  text-align: right;
  vertical-align: bottom;
  text-transform: uppercase;
  color: #FFFFFF;
}

.service-card-hover-list.is-2col li {
  font-size: 13.5px;
  line-height: 16.5px;
}

.service-bullet-shape {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
  display: inline-block;
}

/* Charcoal / Dark Button at Bottom of Back Card */
.service-card-btn-hover {
  background: #3F3F3F;
  color: #FFFFFF;
  width: 96%;
  max-width: 460px;
  height: 42px;
  border-radius: 0px 0px 16px 16px;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  margin: 8px auto 0;
}

.service-card:hover .service-card-btn-hover {
  background: #4A4A4A;
}

/* Hover & Active Reveal */
.service-card:hover .service-card-front-content,
.service-card.is-active .service-card-front-content {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.service-card:hover .service-card-hover-content,
.service-card.is-active .service-card-hover-content {
  opacity: 1;
  visibility: visible;
}

/* Full card clickable link */
.service-card-full-link {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
}

@media (max-width: 680px) {
  .service-card-front-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  .service-card-btn {
    height: 44px;
    font-size: 0.95rem;
  }
  .service-card-hover-content {
    padding: 18px 14px 14px;
  }
  .service-card-hover-title {
    font-size: 24px;
    line-height: 32px;
  }
  .service-card-hover-list li {
    font-size: 15px;
    line-height: 16px;
  }
  .service-card-hover-list.is-2col li {
    font-size: 13px;
    line-height: 15px;
  }
  .service-bullet-shape {
    width: 12px;
    height: 12px;
  }
}


