/* ===== CONSTRUCTION PAGE ===== */

/* ---------- Hero ---------- */
.co-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 82vh;
  padding: calc(var(--header-h) + 4.5rem) 0 6rem;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* If the first image is missing, the second one shows instead */
.co-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url('images/econ-construction-hero-section-image3.webp') center / cover no-repeat,
    url('images/Structure-image1-econ-construction-karachi.jpg') center / cover no-repeat,
    var(--woody-dark);
  animation: co-zoom 16s ease-out forwards;
  will-change: transform;
}

@keyframes co-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

.co-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(30, 20, 12, 0.9) 0%, rgba(30, 20, 12, 0.64) 54%, rgba(30, 20, 12, 0.34) 100%);
}

.co-crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.co-crumbs a:hover { color: #fff; text-decoration: underline; }
.co-crumbs [aria-current] { color: #e6cdb0; }

.co-hero-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #e6cdb0;
  margin-bottom: 1.2rem;
}

.co-hero-title {
  max-width: 780px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.co-hero-title span { color: #e6cdb0; }

.co-hero-desc {
  max-width: 620px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 2.4rem;
}

.co-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.co-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.co-btn-glass:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #fff;
  transform: translateY(-2px);
}

.co-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
}

.co-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 4px;
  animation: co-wheel 1.8s ease-in-out infinite;
}

@keyframes co-wheel {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Shared headings ---------- */
.co-head {
  max-width: 700px;
  margin: 0 auto 3.4rem;
  text-align: center;
}

.co-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--woody-light);
  margin-bottom: 1rem;
}

.co-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1rem;
}

.co-title span { color: var(--woody); }

.co-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ---------- Intro ---------- */
.co-intro {
  padding: 6rem 0 5.5rem;
  background: #fff;
}

.co-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.co-point {
  padding: 2rem 1.8rem;
  background: #F8F4EE;
  border: 1px solid rgba(92, 64, 51, 0.1);
  border-radius: 24px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.co-point:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(62, 42, 34, 0.12);
}

.co-point-ico {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: #fff;
  background: var(--woody);
  border-radius: 16px;
}

.co-point h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.co-point p {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ---------- Jump bar ---------- */
.co-subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  background: rgba(241, 242, 237, 0.92);
  border-bottom: 1px solid rgba(92, 64, 51, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.co-subnav-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.co-subnav-inner::-webkit-scrollbar { display: none; }

.co-subnav-list {
  display: flex;
  gap: 0.4rem;
  margin: 0 auto;
  padding: 0.75rem 0;
}

.co-subnav-list a {
  display: block;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  color: #5b554f;
  border-radius: 50px;
  transition: background 0.3s ease, color 0.3s ease;
}

.co-subnav-list a:hover,
.co-subnav-list a.is-active {
  color: #fff;
  background: var(--woody);
}

.co-subnav-list a:focus-visible {
  outline: 3px solid var(--woody-light);
  outline-offset: 2px;
}

/* ---------- Sections ---------- */
.co-section {
  padding: 6.5rem 0 7rem;
  background: #F1F2ED;
  scroll-margin-top: calc(var(--header-h) + 56px);
}

.co-section--dark {
  background:
    radial-gradient(900px 460px at 90% 0%, rgba(139, 107, 74, 0.32), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(139, 107, 74, 0.2), transparent 60%),
    var(--woody-dark);
}

.co-section--dark .co-label { color: #e6cdb0; }
.co-section--dark .co-title { color: #fff; }
.co-section--dark .co-title span { color: #e6cdb0; }
.co-section--dark .co-desc { color: rgba(255, 255, 255, 0.75); }

/* ---------- Grid: last row is centered ---------- */
.co-grid {
  --gap: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}

.co-card {
  flex: 0 1 calc((100% - (var(--gap) * 2)) / 3);
  min-width: 0;
}

.co-grid--two .co-card {
  flex-basis: calc((100% - var(--gap)) / 2);
}

/* ---------- Card ---------- */
.co-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(92, 64, 51, 0.1);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(62, 42, 34, 0.09);
  scroll-margin-top: calc(var(--header-h) + 90px);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}

.co-card:hover {
  transform: translateY(-8px);
  border-color: rgba(92, 64, 51, 0.28);
  box-shadow: 0 32px 65px rgba(62, 42, 34, 0.2);
}

.co-card.co-flash { animation: co-flash 1.8s ease; }

@keyframes co-flash {
  0%   { box-shadow: 0 0 0 0 rgba(139, 107, 74, 0.75); }
  45%  { box-shadow: 0 0 0 12px rgba(139, 107, 74, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(139, 107, 74, 0); }
}

/* ---------- Carousel ---------- */
.co-carousel {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #2a1c15;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.co-carousel:focus-visible {
  outline: 3px solid var(--woody-light);
  outline-offset: -3px;
}

.co-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.co-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  cursor: zoom-in;
}

.co-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  -webkit-user-drag: none;
  user-select: none;
}

.co-card:hover .co-slide img { transform: scale(1.05); }

/* Soft shade so the number and controls stay readable */
.co-carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(30, 20, 12, 0.3) 0%, rgba(30, 20, 12, 0) 38%, rgba(30, 20, 12, 0.28) 100%);
  pointer-events: none;
}

/* Image not found */
.co-slide.is-missing {
  background: linear-gradient(135deg, var(--woody), var(--woody-dark));
  cursor: default;
}

.co-slide.is-missing img { display: none; }

.co-slide.is-missing::after {
  content: 'Image coming soon';
  margin: auto;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e6cdb0;
}

.co-num {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: var(--woody);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: transform 0.4s ease, background 0.3s ease;
}

.co-card:hover .co-num {
  transform: scale(1.08) rotate(-4deg);
  background: var(--woody-dark);
}

/* Controls created by JS */
.co-count {
  position: absolute;
  top: 20px;
  right: 14px;
  z-index: 3;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(30, 20, 12, 0.55);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.co-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--woody-dark);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.co-prev { left: 12px; }
.co-next { right: 12px; }

.co-nav:hover {
  background: var(--woody);
  color: #fff;
  transform: scale(1.08);
}

.co-nav:focus-visible,
.co-zoom:focus-visible,
.co-dots button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (hover: hover) {
  .co-nav { opacity: 0; }
  .co-carousel:hover .co-nav,
  .co-carousel:focus-within .co-nav { opacity: 1; }
}

.co-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(30, 20, 12, 0.55);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease, transform 0.3s ease;
}

.co-zoom:hover {
  background: var(--woody);
  transform: scale(1.08);
}

.co-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 7px 11px;
  transform: translateX(-50%);
  background: rgba(30, 20, 12, 0.5);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.co-dots[hidden] { display: none; }

.co-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.co-dots button.is-active {
  width: 20px;
  border-radius: 10px;
  background: #fff;
}

/* ---------- Card text ---------- */
.co-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.7rem 1.8rem 1.9rem;
}

.co-body h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 0.8rem;
}

.co-body > p {
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.co-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.co-tags li {
  padding: 0.32rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--woody-dark);
  background: #f0e3d2;
  border-radius: 50px;
}

.co-body > .co-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--woody-dark);
  background: #f6efe5;
  border: 1px dashed rgba(92, 64, 51, 0.35);
  border-radius: 14px;
}

.co-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--woody);
}

/* Numbered steps (Structure and Finishing) */
.co-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
  counter-reset: co-step;
}

.co-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem 0.4rem 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50px;
  counter-increment: co-step;
  transition: background 0.3s ease, transform 0.3s ease;
}

.co-steps li::before {
  content: counter(co-step);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--woody-dark);
  background: #e6cdb0;
  border-radius: 50%;
}

.co-steps li:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.co-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--woody);
  transition: gap 0.3s ease, color 0.3s ease;
}

.co-link:hover {
  gap: 14px;
  color: var(--woody-dark);
}

/* Dark section cards */
.co-section--dark .co-card {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.co-section--dark .co-card:hover {
  border-color: rgba(230, 205, 176, 0.5);
  box-shadow: 0 34px 75px rgba(0, 0, 0, 0.5);
}

.co-section--dark .co-body h3 { color: #fff; }
.co-section--dark .co-body > p { color: rgba(255, 255, 255, 0.78); }
.co-section--dark .co-link { color: #e6cdb0; }
.co-section--dark .co-link:hover { color: #fff; }

/* ---------- Image viewer ---------- */
.co-lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.co-lb[hidden] { display: none; }

.co-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 6, 0.92);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.co-lb-fig {
  position: relative;
  max-width: min(1100px, 84vw);
  margin: 0;
  animation: co-pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes co-pop {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.co-lb-fig img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  background: #2a1c15;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.co-lb-fig figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
}

.co-lb-close,
.co-lb-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.co-lb-close:hover,
.co-lb-nav:hover { background: rgba(255, 255, 255, 0.3); }

.co-lb-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
  line-height: 1;
}

.co-lb-nav {
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
}

.co-lb-nav[hidden] { display: none; }

.co-lb-prev { left: 18px; }
.co-lb-next { right: 18px; }

.co-lb-close:focus-visible,
.co-lb-nav:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ---------- Reveal on scroll ---------- */
.co-reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.co-reveal.co-in {
  opacity: 1;
  transform: none;
}

.co-card.co-reveal.co-in {
  transition:
    opacity 0.8s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.5s ease,
    border-color 0.4s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .co-card,
  .co-grid--two .co-card { flex-basis: calc((100% - var(--gap)) / 2); }

  .co-points { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 768px) {
  .co-hero {
    min-height: 74vh;
    padding: calc(var(--header-h) + 3rem) 0 5rem;
  }

  .co-intro { padding: 4.8rem 0 4.5rem; }
  .co-section { padding: 4.8rem 0 5.2rem; }
  .co-head { margin-bottom: 2.6rem; }
}

@media (max-width: 640px) {
  .co-grid { --gap: 1.6rem; }

  .co-card,
  .co-grid--two .co-card { flex-basis: 100%; }

  .co-hero-actions { flex-direction: column; }
  .co-hero-actions .btn,
  .co-btn-glass { width: 100%; }
  .co-scroll { display: none; }

  .co-subnav-list { margin: 0; }
  .co-body { padding: 1.5rem 1.4rem 1.7rem; }

  .co-lb-fig { max-width: 94vw; }
  .co-lb-fig img { max-height: 68vh; }
  .co-lb-nav { top: auto; bottom: 22px; margin-top: 0; }
  .co-lb-prev { left: calc(50% - 66px); }
  .co-lb-next { right: calc(50% - 66px); }
}

@media (prefers-reduced-motion: reduce) {
  .co-hero-bg { animation: none; }
  .co-scroll span { animation: none; opacity: 1; }
  .co-reveal { opacity: 1; transform: none; transition: none; }
  .co-track { transition: none; }
  .co-card, .co-card.co-flash, .co-slide img { animation: none; transition: none; }
  .co-lb-fig { animation: none; }
}