﻿/* =====================================================
   TYPES OF CONSTRUCTION — DETAIL PAGE
   Dark / gold aesthetic matching main site
===================================================== */

/* --- HERO --- */
.types-hero {
  position: relative;
  height:   500px;
  overflow: hidden;
}

.types-hero img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  filter:     grayscale(20%);
}

.types-hero::before {
  content:    "";
  position:   absolute;
  inset:      0;
  background: linear-gradient(135deg, rgba(0,0,0,0.78) 0%, rgba(5,5,5,0.62) 100%);
  z-index:    1;
}

.types-hero-content {
  position:       absolute;
  inset:          0;
  display:        flex;
  flex-direction: column;
  justify-content: center;
  align-items:    center;
  text-align:     center;
  z-index:        2;
  padding:        0 20px;
  color:          #fff;
  animation:      heroContentIn 0.9s ease 0.3s both;
}

@keyframes heroContentIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.types-hero-content .eyebrow {
  color:         var(--color-gold);
  margin-bottom: 18px;
}

.types-hero-content .eyebrow::before { background: var(--color-gold); }

.types-hero-content h1 {
  font-size:      56px;
  font-weight:    700;
  letter-spacing: -1px;
  color:          #fff;
  margin:         0 0 18px;
  line-height:    1.1;
  max-width:      900px;
}

.types-hero-content h1 strong {
  color:       var(--color-gold);
  font-weight: 700;
}

.types-hero-content p {
  font-size:   18px;
  max-width:   640px;
  margin:      0;
  opacity:     0.82;
  line-height: 1.65;
  font-weight: 300;
}

/* --- STICKY QUICK NAV --- */
.types-nav {
  background:    #fff;
  border-bottom: 1px solid var(--color-border);
  border-top:    2px solid var(--color-gold);
  position:      sticky;
  top:           102px;
  z-index:       50;
  overflow-x:    auto;
  scrollbar-width: none;
  /* Promote to own paint layer so repaints don't cascade to the rest of the page */
  will-change: contents;
}

.types-nav::-webkit-scrollbar { display: none; }

.types-nav-inner {
  display:         flex;
  align-items:     stretch;
  justify-content: center;
  padding:         0 40px;
  min-width:       max-content;
  margin:          0 auto;
}

.types-nav a {
  position:        relative;
  display:         flex;
  align-items:     center;
  gap:             8px;
  padding:         16px 22px;
  font-size:       12px;
  font-weight:     600;
  text-transform:  uppercase;
  letter-spacing:  1px;
  color:           var(--color-mid);
  text-decoration: none;
  white-space:     nowrap;
  transition:      color 0.25s ease;
}

.types-nav a i {
  font-size:  13px;
  transition: color 0.25s ease;
}

.types-nav a::after {
  content:          '';
  position:         absolute;
  bottom:           0;
  left:             0;
  width:            100%;
  height:           2px;
  background:       var(--color-gold);
  transform:        scaleX(0);
  transform-origin: left center;
  transition:       transform 0.25s ease;
}

.types-nav a:hover,
.types-nav a.is-active {
  color:           var(--color-gold);
  text-decoration: none;
}

.types-nav a:hover i,
.types-nav a.is-active i { color: var(--color-gold); }

.types-nav a:hover::after,
.types-nav a.is-active::after { transform: scaleX(1); }

/* --- ALTERNATING TYPE BLOCKS --- */
.types-list { background: #fff; }

.type-block {
  padding:           90px 40px;
  max-width:         1300px;
  margin:            0 auto;
  /* Offset anchor scroll for fixed header + sticky nav (~102px header + ~50px nav) */
  scroll-margin-top: 160px;
}

.type-block:nth-child(even) {
  background: var(--color-light);
  max-width:  100%;
  padding:    90px 120px;
}

.type-block-inner {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   80px;
  align-items:           center;
  max-width:             1200px;
  margin:                0 auto;
}

.type-block:nth-child(even) .type-block-inner {
  grid-template-areas: "media content";
}
.type-block:nth-child(odd) .type-block-inner {
  grid-template-areas: "content media";
}

.type-content { grid-area: content; }
.type-media   { grid-area: media; position: relative; }

/* Big section number */
.type-number {
  font-size:      110px;
  font-weight:    700;
  color:          var(--color-gold);
  opacity:        0.14;
  line-height:    0.85;
  margin-bottom:  12px;
  letter-spacing: -4px;
}

.type-content .eyebrow { margin-bottom: 14px; }

.type-content h2 {
  font-size:      38px;
  font-weight:    700;
  color:          var(--color-primary);
  margin-bottom:  20px;
  letter-spacing: -0.5px;
  line-height:    1.15;
}

.type-content h2 strong { color: var(--color-gold); }

.type-content > p {
  font-size:     16px;
  color:         var(--color-mid);
  line-height:   1.8;
  margin-bottom: 28px;
  font-weight:   400;
}

.type-content ul {
  list-style: none;
  padding:    0;
  margin:     0 0 30px 0;
  display:    grid;
  grid-template-columns: 1fr 1fr;
  gap:        0 24px;
}

.type-content ul li {
  position:      relative;
  padding:       11px 0 11px 24px;
  font-size:     14px;
  font-weight:   500;
  color:         var(--color-gray);
  border-bottom: 1px solid var(--color-border);
  line-height:   1.5;
  transition:    color 0.2s ease, padding-left 0.2s ease;
}

.type-content ul li:hover {
  color:        var(--color-primary);
  padding-left: 28px;
}

.type-content ul li::before {
  content:    "";
  position:   absolute;
  left:       0;
  top:        19px;
  width:      12px;
  height:     2px;
  background: var(--color-gold);
  transition: width 0.2s ease;
}

.type-content ul li:hover::before { width: 16px; }

/* Image side */
.type-media   { overflow: hidden; }

.type-media-img {
  position:     relative;
  overflow:     hidden;
  aspect-ratio: 4 / 3;
}

.type-media-img img {
  width:               100%;
  height:              100%;
  object-fit:          cover;
  transition:          transform 0.6s var(--ease-out), filter 0.6s ease;
  display:             block;
  filter:              grayscale(15%);
  user-select:         none;
  -webkit-user-select: none;
  -webkit-user-drag:   none;
  pointer-events:      none;
}

.type-block:hover .type-media-img img {
  transform: scale(1.05);
  filter:    grayscale(0%);
}

/* Gold corner accent */
.type-media-img::after {
  content:    "";
  position:   absolute;
  bottom:     0;
  left:       0;
  width:      60px;
  height:     4px;
  background: var(--color-gold);
  z-index:    2;
}

/* Floating icon badge */
.type-icon-badge {
  position:        absolute;
  top:             -24px;
  right:           -24px;
  width:           84px;
  height:          84px;
  background:      var(--color-charcoal);
  border:          2px solid var(--color-gold);
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         3;
  box-shadow:      0 12px 30px rgba(0, 0, 0, 0.25);
  transition:      transform 0.4s var(--ease-out), background 0.3s ease;
}

.type-block:hover .type-icon-badge {
  transform:  rotate(-6deg);
  background: var(--color-gold);
}

.type-icon-badge i {
  font-size: 32px;
  color:     var(--color-gold);
  transition: color 0.3s ease;
}

.type-block:hover .type-icon-badge i { color: #fff; }

/* --- CTA --- */
.types-cta {
  background:
    linear-gradient(135deg, rgba(15,15,15,0.97) 0%, rgba(5,5,5,0.97) 100%),
    url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1600');
  background-size:     cover;
  background-position: center;
  padding:             100px 40px;
  text-align:          center;
  color:               #fff;
  position:            relative;
  overflow:            hidden;
}

.types-cta::before {
  content:    '';
  position:   absolute;
  top:        0;
  left:       0;
  right:      0;
  height:     2px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
}

.types-cta .eyebrow { color: var(--color-gold) !important; }
.types-cta .eyebrow::before { background: var(--color-gold) !important; }

.types-cta h2 {
  font-size:      42px;
  font-weight:    700;
  color:          #fff !important;
  margin-bottom:  16px;
}

.types-cta h2::after  { display: none !important; }
.types-cta h2 strong  { color: var(--color-gold); }

.types-cta p {
  font-size:   17px;
  max-width:   640px;
  margin:      0 auto 36px;
  opacity:     0.75;
  line-height: 1.7;
  font-weight: 300;
}

.types-cta .btn-action {
  background:  var(--color-gold);
  color:       #fff !important;
  border:      2px solid transparent;
}

.types-cta .btn-action:hover {
  background:  transparent;
  color:       var(--color-gold) !important;
  border:      2px solid var(--color-gold);
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .types-hero             { height: 360px; }
  .types-hero-content h1  { font-size: 36px; }
  .types-hero-content p   { font-size: 15px; }

  /* Suppress CSS-only hero animation on mobile */
  .types-hero-content     { animation: none; }

  /* Nav visible on mobile — icons only, no highlight */
  .types-nav              { top: 72px; overflow-x: auto; scrollbar-width: none; }
  .types-nav::-webkit-scrollbar { display: none; }
  .types-nav-inner        { justify-content: space-around; padding: 0 8px; min-width: max-content; }
  .types-nav a            { padding: 12px 10px; font-size: 16px; gap: 0; }
  .types-nav a span       { display: none; }
  .types-nav a.is-active,
  .types-nav a:hover,
  .types-nav a.is-active i,
  .types-nav a:hover i    { color: var(--color-mid); }
  .types-nav a.is-active::after,
  .types-nav a:hover::after { transform: scaleX(0); }

  .type-block             { scroll-margin-top: 130px; } /* header(72) + nav(~50) + buffer */

  .type-block,
  .type-block:nth-child(even) { padding: 60px 20px; }

  .type-block-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "content" !important;
    gap: 32px;
  }

  .type-content h2    { font-size: 28px; }
  .type-number        { font-size: 80px; }
  .type-content ul    { grid-template-columns: 1fr; }

  /* Move icon badge inside image bounds — prevent overflow */
  .type-icon-badge    { width: 58px; height: 58px; top: 12px; right: 12px; }
  .type-icon-badge i  { font-size: 24px; }

  .types-cta          { padding: 70px 20px; }
  .types-cta .btn-action { align-self: center; }
  .types-cta h2       { font-size: 30px; }
}

@media (max-width: 576px) {
  .types-hero             { height: 280px; }
  .types-hero-content h1  { font-size: 24px; }
  .types-hero-content p   { font-size: 14px; }
  .type-number            { font-size: 60px; }
  .type-content h2        { font-size: 24px; }
  .types-cta h2           { font-size: 24px; }
  .types-cta p            { font-size: 15px; }
}




