/* ============================================================================
   TMSI — EXTERIOR PROJECTS · SECTION VARIANTS (v2 — restrained)
   ============================================================================
   Philosophy:
     - Keep the page's overall look: same beige/white alternating backgrounds,
       same centered title+kicker header, same yellow+dark brand colors.
     - Only the CARD SHAPES, IMAGE LAYOUTS and ANIMATIONS change per section.
     - Each section gets a distinct "shape personality":
         1) ETFE Foil      → tall PORTRAIT cards that gently float
         2) PTFE Tensile   → alternating LEFT/RIGHT editorial strips
         3) PVDF Tensile   → SQUARE tiles with hover accent
         4) PVC Tensile    → RHYTHMIC rectangles at staggered heights
         5) Cars Parking   → CIRCLE portraits with floating popover cards
         6) Tensile Tents  → TILTED cards that straighten on hover
   Loading:  after etfe-enhance.css
   ============================================================================ */



/* ============================================================================
   2)  PTFE TENSILE  —  Alternating LEFT / RIGHT editorial strips
   ----------------------------------------------------------------------------
   The section already uses .ex-project-card-wide (image | body).
   Flip the even card so we get a zig-zag rhythm.
   ============================================================================ */

#ptfe-tensile .ex-project-grid.ex-grid-1col {
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Every other wide card flips direction — image right, body left */
#ptfe-tensile .ex-project-card-wide:nth-child(even) {
  flex-direction: row-reverse;
}

/* Smooth image zoom on hover */
#ptfe-tensile .ex-project-card-wide .ex-project-media {
  position: relative;
  overflow: hidden;
}
#ptfe-tensile .ex-project-card-wide .ex-project-media img {
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#ptfe-tensile .ex-project-card-wide:hover .ex-project-media img {
  transform: scale(1.08);
}

/* A yellow stripe grows along the image edge facing the body */
#ptfe-tensile .ex-project-card-wide .ex-project-media::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;           /* odd cards: image on left → stripe on inner (right) edge */
  width: 0;
  background: #fdc30e;
  z-index: 3;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#ptfe-tensile .ex-project-card-wide:nth-child(even) .ex-project-media::before {
  right: auto;
  left: 0;            /* even cards flipped → stripe on inner (left) edge */
}
#ptfe-tensile .ex-project-card-wide:hover .ex-project-media::before {
  width: 5px;
}


/* ============================================================================
   3)  PVDF TENSILE  —  Image with an OVERLAPPING floating info card   ← NEW
   ----------------------------------------------------------------------------
   Visual:  large landscape image  +  smaller white info card that overlaps
   the image by ~35px and sits centred below it. Creates a layered / magazine
   feel that is completely different from every other section.
   ============================================================================ */

#pvdf-tensile .ex-project-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 10px;
}

/* Transparent host — the visible "card" is actually the floating body */
#pvdf-tensile .ex-project-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;          /* let the body escape */
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#pvdf-tensile .ex-project-card:hover { transform: translateY(-8px); }

/* Image: landscape, rounded, carries its own shadow */
#pvdf-tensile .ex-project-media {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  position: relative;
}
#pvdf-tensile .ex-project-media img {
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#pvdf-tensile .ex-project-card:hover .ex-project-media img {
  transform: scale(1.06);
}

/* Floating white body — overlaps the image by 40px */
#pvdf-tensile .ex-project-body {
  position: relative;
  z-index: 2;
  margin: -40px 18px 0;
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
  border-top: 3px solid #fdc30e;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
#pvdf-tensile .ex-project-card:hover .ex-project-body {
  box-shadow: 0 18px 40px rgba(253, 195, 14, 0.18);
}

#pvdf-tensile .ex-project-title {
  font-size: 17px;
  margin-bottom: 12px;
}
#pvdf-tensile .ex-project-meta { margin: 10px 0 14px; }
#pvdf-tensile .ex-project-meta li {
  font-size: 13px;
  padding: 3px 0;
}

/* ============================================================================
   4)  PVC TENSILE  —  Rhythmic rectangles at staggered heights
   ============================================================================ */

#pvc-tensile .ex-project-grid {
  align-items: start;
}

/* Middle card sits lower — creates a gentle up-down-up rhythm */
#pvc-tensile .ex-project-card:nth-child(1) { margin-top: 0; }
#pvc-tensile .ex-project-card:nth-child(2) { margin-top: 48px; }
#pvc-tensile .ex-project-card:nth-child(3) { margin-top: 0; }

/* Varying aspect ratios reinforce the rhythm */
#pvc-tensile .ex-project-card:nth-child(1) .ex-project-media { aspect-ratio: 4 / 5; }
#pvc-tensile .ex-project-card:nth-child(2) .ex-project-media { aspect-ratio: 4 / 3; }
#pvc-tensile .ex-project-card:nth-child(3) .ex-project-media { aspect-ratio: 4 / 5; }

/* Each card bobs out of phase */
#pvc-tensile .ex-project-card {
  animation: pvc-bob 5.5s ease-in-out infinite;
}
#pvc-tensile .ex-project-card:nth-child(1) { animation-delay: 0s; }
#pvc-tensile .ex-project-card:nth-child(2) { animation-delay: -1.8s; }
#pvc-tensile .ex-project-card:nth-child(3) { animation-delay: -3.6s; }

@keyframes pvc-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

#pvc-tensile .ex-project-card:hover {
  animation-play-state: paused;
  transform: translateY(-12px);
}

/* A little yellow corner folds in from the top-left of the image on hover */
#pvc-tensile .ex-project-media {
  position: relative;
}
#pvc-tensile .ex-project-media::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 40px solid #fdc30e;
  border-right: 40px solid transparent;
  z-index: 3;
  opacity: 0;
  transform: translate(-8px, -8px);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#pvc-tensile .ex-project-card:hover .ex-project-media::before {
  opacity: 1;
  transform: translate(0, 0);
}


/* ============================================================================
   5)  CARS PARKING  —  Square carousel, info ALWAYS visible below image
   ----------------------------------------------------------------------------
   No hover tricks. The info sits permanently below the image so it reads
   identically on desktop and mobile. Requires jQuery + slick (already
   loaded in the page) and slick.min.css in <head>.
   ============================================================================ */

/* container → slick block */
#cars-parking .ex-project-grid.ex-grid-parking {
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding: 10px 50px 0;
  position: relative;
}

/* card = slide */
#cars-parking .ex-project-card-compact {
  background: #fff;
  border: 1px solid rgba(82, 86, 94, 0.08);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin: 10px;
  padding: 0;
  position: relative;
  min-height: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
#cars-parking .ex-project-card-compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(253, 195, 14, 0.35);
}

/* square image (reset ALL old circle / overlay rules) */
#cars-parking .ex-project-card-compact .ex-project-media {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
  overflow: hidden;
  animation: none !important;
  transform: none !important;
  position: relative;
}
#cars-parking .ex-project-card-compact .ex-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#cars-parking .ex-project-card-compact:hover .ex-project-media img {
  transform: scale(1.06);
}

/* body sits NORMALLY below image — visible on every device */
#cars-parking .ex-project-card-compact .ex-project-body {
  position: static;
  inset: auto;
  width: auto;
  max-width: none;
  background: #fff;
  color: #1a1a1a;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 0;
  box-shadow: none;
  opacity: 1 !important;
  pointer-events: auto;
  transform: none !important;
  transition: none;
  z-index: auto;
  text-align: left;
  margin: 0;
}
#cars-parking .ex-project-card-compact .ex-project-body::after { display: none; }

#cars-parking .ex-project-card-compact .ex-project-title {
  position: static;
  top: auto; left: auto; right: auto;
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
  text-align: left;
}
#cars-parking .ex-project-card-compact:hover .ex-project-title { color: #fdc30e; }

#cars-parking .ex-project-card-compact .ex-project-meta-compact {
  margin: 0;
  padding: 0;
  list-style: none;
}
#cars-parking .ex-project-card-compact .ex-project-meta-compact li {
  color: #52565e;
  font-size: 12px;
  padding: 3px 0;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
#cars-parking .ex-project-card-compact .ex-project-meta-compact li i {
  color: #fdc30e;
  margin-top: 3px;
  flex-shrink: 0;
  font-size: 13px;
}

/* slick arrows */
#cars-parking .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  color: #1a1a1a;
  font-size: 0;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
#cars-parking .slick-arrow:hover {
  background: #fdc30e;
  color: #1a1a1a;
  box-shadow: 0 8px 22px rgba(253, 195, 14, 0.45);
}
#cars-parking .slick-arrow::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
}
#cars-parking .slick-prev { left: 0; }
#cars-parking .slick-next { right: 0; }
#cars-parking .slick-prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
#cars-parking .slick-next::before { transform: translate(-65%, -50%) rotate(45deg); }

/* slick dots */
#cars-parking .slick-dots {
  display: flex !important;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  gap: 10px;
}
#cars-parking .slick-dots li { line-height: 0; }
#cars-parking .slick-dots li button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(26, 26, 26, 0.2);
  font-size: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}
#cars-parking .slick-dots li.slick-active button {
  background: #fdc30e;
  width: 28px;
  border-radius: 5px;
}


/* ============================================================================
   6)  TENSILE TENTS  —  2 cards on top + 1 full-width featured below
   ============================================================================ */

/* 2-column grid */
#tensile-tents .ex-project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 28px;
  align-items: stretch;
}

#tensile-tents .ex-project-card:nth-child(1) { grid-column: 1; grid-row: 1; }
#tensile-tents .ex-project-card:nth-child(3) { grid-column: 2; grid-row: 1; }
#tensile-tents .ex-project-card-featured,
#tensile-tents .ex-project-card:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Horizontal layout — image left, body right */
#tensile-tents .ex-project-card {
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  height: 220px;                 /* ← ثبّت الطول هون */
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
#tensile-tents .ex-project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.10);
  border-color: rgba(253, 195, 14, 0.3);
}

#tensile-tents .ex-project-media {
  flex: 0 0 45%;
  aspect-ratio: auto;
  height: 100%;
  overflow: hidden;
}
#tensile-tents .ex-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#tensile-tents .ex-project-card:hover .ex-project-media img {
  transform: scale(1.05);
}

#tensile-tents .ex-project-body {
  flex: 1 1 auto;
  padding: 16px 24px;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
#tensile-tents .ex-project-title {
  font-size: 16px;
  margin-bottom: 6px;
}
#tensile-tents .ex-project-meta {
  margin: 4px 0 10px;
}
#tensile-tents .ex-project-meta li {
  padding: 2px 0;
  font-size: 12.5px;
}
#tensile-tents .ex-readmore {
  padding: 6px 14px;
  font-size: 13px;
  margin-top: 4px;
}

/* Featured full-width card — a bit taller because it holds more content */
#tensile-tents .ex-project-card-featured {
  height: 240px;                 /* ← طول ثابت أطول شوي */
  border-color: rgba(253, 195, 14, 0.35);
  box-shadow: 0 10px 30px rgba(253, 195, 14, 0.15);
  position: relative;
}
#tensile-tents .ex-project-card-featured .ex-project-media {
  flex: 0 0 42%;
}
#tensile-tents .ex-project-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 42%;
  width: 4px;
  background: #fdc30e;
  z-index: 3;
}
#tensile-tents .ex-project-card-featured .ex-project-body {
  padding: 22px 32px;
}
#tensile-tents .ex-project-card-featured .ex-project-tag {
  background: #fdc30e;
  color: #1a1a1a;
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 12px;
  align-self: flex-start;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
#tensile-tents .ex-project-card-featured .ex-project-title {
  font-size: 20px;
  margin-bottom: 4px;
}
/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 991px) {
  /* ETFE → 1 col */
  #etfe-foil .ex-project-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  /* PTFE → stacked cards, no flip */
  #ptfe-tensile .ex-project-card-wide,
  #ptfe-tensile .ex-project-card-wide:nth-child(even) {
    flex-direction: column;
  }
  #ptfe-tensile .ex-project-card-wide .ex-project-media::before { display: none; }

  /* PVDF → 2 cols */
  #pvdf-tensile .ex-project-grid { grid-template-columns: repeat(2, 1fr); }

  /* PVC → drop the stagger */
  #pvc-tensile .ex-project-card:nth-child(1),
  #pvc-tensile .ex-project-card:nth-child(2),
  #pvc-tensile .ex-project-card:nth-child(3) {
    margin-top: 0;
  }

  /* Tents → stack all cards vertically (image on top, body below) */
  #tensile-tents .ex-project-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  #tensile-tents .ex-project-card:nth-child(1),
  #tensile-tents .ex-project-card:nth-child(2),
  #tensile-tents .ex-project-card:nth-child(3),
  #tensile-tents .ex-project-card-featured {
    grid-column: 1;
    grid-row: auto;
    flex-direction: column;
  }
  #tensile-tents .ex-project-media,
  #tensile-tents .ex-project-card-featured .ex-project-media {
    flex: 0 0 auto;
    min-height: auto;
    aspect-ratio: 16 / 10;
  }
  /* Featured stripe → horizontal top line (stacked layout) */
  #tensile-tents .ex-project-card-featured::before {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 4px;
  }
}

@media (max-width: 767px) {
  /* Turn off background floats on mobile — feels busy on small screens */
  #etfe-foil .ex-project-card,
  #pvc-tensile .ex-project-card {
    animation: none;
  }

  /* Cars Parking: tighten the slick padding */
  #cars-parking .ex-project-grid.ex-grid-parking {
    padding: 10px 40px 0;
  }
}

@media (max-width: 575px) {
  /* PVDF → 1 col, smaller overlap */
  #pvdf-tensile .ex-project-grid { grid-template-columns: 1fr; }
  #pvdf-tensile .ex-project-body { margin: -30px 14px 0; }
}


/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  #etfe-foil .ex-project-card,
  #pvc-tensile .ex-project-card {
    animation: none !important;
  }
}