/* ───────────────────────────────────────────────────────────
   COMMERCIAL REAL ESTATE CSS
   ─────────────────────────────────────────────────────────── */

/* ───────────────────────────────────────────────────────────
   1. HERO SECTION
   ─────────────────────────────────────────────────────────── */
.cre-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-deep-navy);
}

.cre-hero__bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 120%; /* for parallax */
  z-index: 1;
}

.cre-hero__bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  /* Subtle slow scale animation */
  animation: heroScale 20s ease-out forwards;
}

@keyframes heroScale {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.cre-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 128, 0.7) 0%, rgba(22, 22, 22, 0.8) 100%);
}

.cre-hero__content {
  position: relative; z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cre-hero__headline {
  font-size: clamp(3rem, 5.5vw, 6rem);
  font-weight: var(--font-black);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.cre-hero__subtext {
  font-size: var(--body-lg);
  max-width: 650px;
  line-height: 1.6;
  opacity: 0.9;
}

/* Line Reveal Animation Hook */
.line-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.line-reveal__inner {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.cre-hero.is-revealed .line-reveal__inner {
  transform: translateY(0);
}

/* ───────────────────────────────────────────────────────────
   2. COMMERCIAL BROKERAGE INFRASTRUCTURE (SPLIT)
   ─────────────────────────────────────────────────────────── */
.cre-split__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.cre-split__content h2 { margin-bottom: 2rem; }

.cre-split__visual {
  position: relative;
  width: 100%;
}

.cre-split__img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}

.cre-split__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}

.cre-split__img-wrapper:hover .cre-split__img {
  transform: scale(1.05);
}

.cre-split__accent-line {
  position: absolute;
  top: 0; left: -20px;
  width: 4px; height: 0;
  background: var(--color-enterprise-blue);
  transition: height 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.cre-split.is-revealed .cre-split__accent-line {
  height: 50%;
}

/* ───────────────────────────────────────────────────────────
   3. INSTITUTIONAL TRANSACTION INFRASTRUCTURE
   ─────────────────────────────────────────────────────────── */
.cre-institutional__grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 4rem;
}

.cre-institutional__number {
  font-size: var(--text-6xl);
  font-weight: var(--font-black);
  color: var(--color-enterprise-blue);
  line-height: 1;
  margin-bottom: 1rem;
}

.cre-institutional__rule {
  width: 100%; height: 1px;
  background: rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.cre-institutional.is-revealed .cre-institutional__rule {
  transform: scaleX(1);
}

.cre-institutional__content p {
  margin-bottom: 3rem;
  max-width: 800px;
}

.cre-institutional__img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cre-institutional__img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ───────────────────────────────────────────────────────────
   4. CAPITAL & LENDING INFRASTRUCTURE
   ─────────────────────────────────────────────────────────── */
.cre-capital__header {
  margin-bottom: 4rem;
  max-width: 800px;
}

.cre-capital__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cre-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  min-height: 400px;
  border: var(--border-thin);
  background: var(--color-white);
  color: var(--color-black);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.cre-card__bg {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.cre-card__bg img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Dark overlay on hover */
.cre-card__bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,128,0.8);
}

.cre-card__number {
  position: relative; z-index: 2;
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  color: var(--color-enterprise-blue);
  transition: color 0.4s ease;
}

.cre-card__content {
  position: relative; z-index: 2;
  margin-top: auto;
}

.cre-card__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: 0.5rem;
  transition: color 0.4s ease;
}

.cre-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-gray);
  transition: color 0.4s ease;
}

.cre-card__icon {
  position: absolute; right: 3rem; bottom: 3rem; z-index: 2;
  font-size: var(--text-2xl);
  color: var(--color-enterprise-blue);
  transition: transform 0.4s ease, color 0.4s ease;
}

.cre-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.cre-card:hover .cre-card__bg {
  opacity: 1; transform: scale(1.05);
}

.cre-card:hover .cre-card__number,
.cre-card:hover .cre-card__title,
.cre-card:hover .cre-card__desc,
.cre-card:hover .cre-card__icon {
  color: var(--color-white);
}

.cre-card:hover .cre-card__icon {
  transform: translateX(10px);
}

/* ───────────────────────────────────────────────────────────
   5. ASSET CLASSES & USE CASES
   ─────────────────────────────────────────────────────────── */
.cre-assets__grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 4rem;
}

.cre-assets__list {
  display: flex;
  flex-direction: column;
}

.cre-assets__item {
  position: relative;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.cre-assets__item-line {
  position: absolute; left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--color-enterprise-blue);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cre-assets__item-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-charcoal);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
}

.cre-assets__item:hover .cre-assets__item-line { width: 100%; }
.cre-assets__item:hover .cre-assets__item-title {
  transform: translateX(20px);
  color: var(--color-enterprise-blue);
}

/* ───────────────────────────────────────────────────────────
   6. FAQ SECTION
   ─────────────────────────────────────────────────────────── */
.cre-faq__list {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.cre-faq__item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.cre-faq__question {
  width: 100%;
  text-align: left;
  background: none; border: none;
  padding: 2rem 0;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-charcoal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cre-faq__icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-enterprise-blue);
  transition: transform 0.4s ease;
}

.cre-faq__item.is-open .cre-faq__question { color: var(--color-enterprise-blue); }
.cre-faq__item.is-open .cre-faq__icon { transform: rotate(45deg); }

.cre-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cre-faq__answer-inner {
  padding-bottom: 2rem;
  font-size: var(--text-base);
  color: var(--color-text-gray);
  line-height: 1.6;
}

/* ───────────────────────────────────────────────────────────
   7. FINAL CTA
   ─────────────────────────────────────────────────────────── */
.cre-cta {
  position: relative;
  padding: 8rem 0;
  background: var(--color-deep-navy);
  color: var(--color-white);
  overflow: hidden;
}

.cre-cta__bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 120%; z-index: 1;
  background-image: url('/images/business/business-meeting-01.jpg');
  background-size: cover;
  background-position: center;
  /* Optional slight slow movement handled by parallax JS */
}

.cre-cta__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 128, 0.8) 0%, rgba(22, 22, 22, 0.9) 100%);
}

.cre-cta__content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
}

.cre-cta__subtext { margin: 2rem 0 4rem; max-width: 600px; opacity: 0.9; }

.cre-cta__links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
}

/* ───────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cre-split__grid, .cre-institutional__grid, .cre-assets__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .cre-split__visual { order: -1; } /* Image on top on tablet */
  .cre-institutional__header { margin-bottom: 1rem; }
  .cre-hero__headline { font-size: 4rem; }
}

@media (max-width: 768px) {
  .cre-hero { min-height: 600px; }
  .cre-hero__headline { font-size: 3rem; }
  .cre-capital__cards { grid-template-columns: 1fr; }
  .cre-cta__links { flex-direction: column; width: 100%; align-items: center; }
  .cre-cta__links .btn { width: 100%; max-width: 400px; text-align: center; }
}
