/* Generated from the original Next.js CSS Modules. */

/* ===== src/app/branches/BranchesPage.module.css ===== */
/* ========================================
   Branches grid
======================================== */

.branches-branchesGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 80px 40px;
  padding: 72px 0 120px;
}

.branches-branchCard {
  min-width: 0;
}

.branches-branchLink {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ========================================
   Elegant branch house
======================================== */

.branches-house {
  position: relative;
  width: 100%;
  padding-top: 82px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* سقف أصغر وأكثر شبهًا بالبيت */
.branches-roof {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 4;

  width: 82%;
  height: 105px;

  background: var(--color-pink, #e9869c);

  clip-path: polygon(
    50% 0,
    100% 80%,
    95% 100%,
    5% 100%,
    0 80%
  );

  transform: translateX(-50%);

  filter: drop-shadow(0 9px 8px rgba(66, 31, 20, 0.12));

  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s ease;
}

/* خط بسيط أسفل السقف */
.branches-roof::after {
  content: "";
  position: absolute;
  right: 5%;
  bottom: 0;
  left: 5%;

  height: 10px;

  background: #f8ede4;
}

/* جسم البيت */
.branches-houseBody {
  position: relative;

  width: 76%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  margin: 0 auto;

  overflow: hidden;

  background: #2d1b13;

  border: 9px solid #f8ede4;
  border-top-width: 12px;
  border-radius: 24px 24px 8px 8px;

  box-shadow:
    0 24px 50px rgba(58, 31, 20, 0.13),
    0 5px 14px rgba(58, 31, 20, 0.08);

  transition:
    box-shadow 0.5s ease,
    border-color 0.4s ease;
}

.branches-branchImage {
  object-fit: cover;
  object-position: center;

  transition:
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s ease;
}

.branches-imageOverlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(
      180deg,
      rgba(32, 17, 10, 0.01) 40%,
      rgba(32, 17, 10, 0.72) 100%
    );

  transition: background 0.5s ease;
}

.branches-imageContent {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 2;

  display: flex;
  justify-content: flex-end;
}

.branches-viewText {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding-bottom: 5px;

  color: #fff8f1;
  font-size: 14px;
  line-height: 1;

  border-bottom: 1px solid rgba(255, 248, 241, 0.8);
}

.branches-viewText span {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* ========================================
   Branch information
======================================== */

.branches-branchInformation {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;

  width: 76%;
  margin: 0 auto;
  padding-top: 24px;
}

.branches-branchLabel {
  display: block;

  margin-bottom: 8px;

  color: var(--color-pink, #e9869c);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.branches-branchInformation h2 {
  margin: 0;

  color: var(--color-brown, #2d180f);

  font-family: var(--font-serif), Georgia, serif;
  font-size: clamp(32px, 3.2vw, 52px);
  font-weight: 400;
  line-height: 0.95;
}

.branches-branchDetails {
  max-width: 210px;
  text-align: right;
}

.branches-branchDetails p {
  margin: 0;

  color: rgba(45, 24, 15, 0.7);
  font-size: 13px;
  line-height: 1.55;
}

.branches-branchDetails p + p {
  margin-top: 4px;
}

/* ========================================
   Hover
======================================== */

.branches-branchLink:hover .branches-house {
  transform: translateY(-8px);
}

.branches-branchLink:hover .branches-roof {
  transform: translateX(-50%) translateY(-5px);

  filter: drop-shadow(0 14px 10px rgba(66, 31, 20, 0.16));
}

.branches-branchLink:hover .branches-houseBody {
  border-color: #fff8f1;

  box-shadow:
    0 32px 65px rgba(58, 31, 20, 0.17),
    0 8px 18px rgba(58, 31, 20, 0.1);
}

.branches-branchLink:hover .branches-branchImage {
  transform: scale(1.055);
  filter: brightness(1.05);
}

.branches-branchLink:hover .branches-imageOverlay {
  background:
    linear-gradient(
      180deg,
      rgba(32, 17, 10, 0) 45%,
      rgba(32, 17, 10, 0.62) 100%
    );
}

.branches-branchLink:hover .branches-viewText span {
  transform: translate(4px, -4px);
}
/* ========================================
   Hover
======================================== */

.branches-branchLink:hover .branches-house {
  transform: translateY(-10px);
}

.branches-branchLink:hover .branches-roof {
  transform: translateY(-5px);
}

.branches-branchLink:hover .branches-branchImage {
  transform: scale(1.07);
}

.branches-branchLink:hover .branches-viewText span {
  transform: translate(4px, -4px);
}

.branches-branchLink:focus-visible {
  outline: 2px solid var(--color-pink, #e5879c);
  outline-offset: 10px;
}

@media (max-width: 900px) {
  .branches-branchesGrid {
    grid-template-columns: 1fr;
    gap: 70px;
    padding-top: 55px;
  }

  .branches-house {
    padding-top: 92px;
  }

  .branches-roof {
    width: 76%;
    height: 115px;
  }

  .branches-houseBody,
  .branches-branchInformation {
    width: 70%;
  }
}

@media (max-width: 650px) {
  .branches-branchesGrid {
    gap: 58px;
    padding-bottom: 80px;
  }

  .branches-house {
    padding-top: 63px;
  }

  .branches-roof {
    width: 92%;
    height: 82px;
  }

  .branches-roof::after {
    height: 7px;
  }

  .branches-houseBody {
    width: 86%;
    border-width: 6px;
    border-top-width: 9px;
    border-radius: 18px 18px 6px 6px;
  }

  .branches-branchInformation {
    display: block;

    width: 86%;
    padding-top: 20px;
  }

  .branches-branchDetails {
    max-width: none;
    margin-top: 13px;
    text-align: left;
  }

  .branches-imageContent {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .branches-branchInformation h2 {
    font-size: 37px;
  }
}
