/* =============================================================
   NEXTONE CONSTRUCTIONS — Component / Page CSS
   (depends on styles.css tokens)
   ============================================================= */

/* =============================================================
   HERO SLIDER
   ============================================================= */
.hero { position: relative; min-height: clamp(520px, 80vh, 760px); display: flex; align-items: center; overflow: hidden; background: var(--blue-900); }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease, transform 6s ease;
}
.hero__slide.is-active { opacity: 1; transform: scale(1.06); }

/* Collage image slide (first slide) — fill the hero width (cover), crops top/bottom slightly */
.hero__slide--contain {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--blue-900);
}
.hero__slide--contain.is-active { transform: none; }

/* Showcase mode: when the collage slide is active, lighten overlay and hide the headline
   so the labelled collage image reads clearly; keep the CTA buttons. */
.hero--showcase .hero__overlay {
  background: linear-gradient(180deg, rgba(15,32,56,0.14) 0%, rgba(15,32,56,0.05) 50%, rgba(15,32,56,0.30) 100%);
}
.hero--showcase .hero__text { display: none !important; }
.hero--showcase .hero__actions { display: none !important; }

@media (prefers-reduced-motion: reduce) { .hero__slide { transition: opacity 1s ease; } }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,32,56,0.92) 0%, rgba(15,32,56,0.72) 45%, rgba(15,32,56,0.35) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__caption { max-width: 680px; color: #fff; }
.hero__text { display: none; }
.hero__text.is-active { display: block; animation: heroFade 0.8s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__eyebrow {
  display: inline-block; color: var(--orange); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.82rem; margin-bottom: 14px;
}
.hero__title { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
.hero__title span { color: var(--orange); }
.hero__lead { margin-top: 18px; font-size: 1.1rem; color: #d7e0ec; max-width: 560px; }
.hero__slogan { margin-top: 10px; font-style: italic; color: #aebfd4; font-weight: 600; }
.hero__actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.hero__dots .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: var(--transition); }
.hero__dots .dot.is-active { background: var(--orange); width: 30px; border-radius: 6px; }

/* Page banner (inner pages) */
.pagehero { position: relative; background: var(--blue); color: #fff; padding: 64px 0; text-align: center; overflow: hidden; }
.pagehero::before { content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.22; }
.pagehero[data-bg]::before { background-image: var(--bg); }
.pagehero__inner { position: relative; z-index: 2; }
.pagehero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.pagehero .crumbs { margin-top: 12px; color: #c7d2e2; font-size: 0.9rem; }
.pagehero .crumbs a:hover { color: var(--orange); }

/* =============================================================
   CTA STRIP
   ============================================================= */
.ctastrip { background: var(--orange); color: #fff; }
.ctastrip__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 20px; flex-wrap: wrap; }
.ctastrip h2 { color: #fff; font-size: clamp(1.2rem, 2.6vw, 1.7rem); margin: 0; }
.ctastrip .btn--primary { background: #fff; color: var(--orange); }
.ctastrip .btn--primary:hover { background: var(--blue-900); color: #fff; }

/* =============================================================
   QUICK STATS
   ============================================================= */
.stats { background: var(--blue); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat__num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--orange); display: block; line-height: 1; }
.stat__label { color: #c7d2e2; font-size: 0.95rem; margin-top: 8px; display: block; }

/* =============================================================
   VALUE CARDS
   ============================================================= */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px; transition: var(--transition); }
.value:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.value__ic { width: 52px; height: 52px; border-radius: 12px; background: rgba(221,107,32,0.12); color: var(--orange); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px; }
.value h3 { font-size: 1.15rem; margin-bottom: 8px; }
.value p { color: var(--muted); font-size: 0.95rem; }

/* =============================================================
   SERVICES GRID
   ============================================================= */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--gray-200); transition: var(--transition);
  display: flex; flex-direction: column;
}
.service:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: transparent; }
.service__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--gray-100); }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.service:hover .service__media img { transform: scale(1.08); }
.service__ic {
  position: absolute; left: 18px; bottom: -22px;
  width: 52px; height: 52px; border-radius: 12px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: var(--shadow);
}
.service__body { padding: 32px 22px 24px; }
.service h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 0.95rem; }
.service__link { margin-top: 14px; display: inline-flex; gap: 6px; color: var(--orange); font-weight: 700; font-size: 0.9rem; }
.service__link:hover { gap: 10px; }

/* =============================================================
   PROJECTS — carousel + filterable grid + lightbox
   ============================================================= */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.carousel__track::-webkit-scrollbar { height: 8px; }
.carousel__track::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.carousel__item { flex: 0 0 clamp(280px, 32%, 380px); scroll-snap-align: start; }
.carousel__nav { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.carousel__btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--gray-300); color: var(--blue); font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.carousel__btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.project {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--gray-200); transition: var(--transition); height: 100%;
}
.project:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: transparent; }
.project__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); cursor: zoom-in; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project:hover .project__media img { transform: scale(1.08); }
.project__tag { position: absolute; top: 12px; left: 12px; background: var(--orange); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 5px 11px; border-radius: 30px; letter-spacing: 0.03em; }
.project__body { padding: 18px 18px 22px; }
.project h3 { font-size: 1.08rem; margin-bottom: 6px; }
.project__loc { color: var(--orange); font-size: 0.82rem; font-weight: 600; display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: 0.9rem; }

.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.filter {
  padding: 9px 20px; border-radius: 30px; font-weight: 600; font-size: 0.9rem;
  background: #fff; border: 1px solid var(--gray-300); color: var(--charcoal); transition: var(--transition);
}
.filter:hover { border-color: var(--blue); color: var(--blue); }
.filter.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.grid-projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-projects .project.is-hidden { display: none; }

/* =============================================================
   GALLERY (Events / Portfolio) + lightbox
   ============================================================= */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery__item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; cursor: zoom-in; background: var(--gray-100); }
.gallery__item--wide { grid-column: span 2; aspect-ratio: 2/1; }
.gallery__item--tall { grid-row: span 2; aspect-ratio: 1/2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after { content: "\002B"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; background: rgba(26,54,93,0.0); opacity: 0; transition: var(--transition); }
.gallery__item:hover::after { background: rgba(26,54,93,0.45); opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,18,30,0.92); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); padding: 20px; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; color: #fff; font-size: 2rem; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255,255,255,0.1); transition: var(--transition);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: var(--orange); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #e2e8f0; font-size: 0.9rem; }

/* =============================================================
   ABOUT — history / media split
   ============================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split__badge { position: absolute; right: 18px; bottom: 18px; background: var(--orange); color: #fff; border-radius: 12px; padding: 14px 18px; text-align: center; box-shadow: var(--shadow); }
.split__badge strong { display: block; font-size: 1.6rem; color: #fff; line-height: 1; }
.split__badge span { font-size: 0.75rem; }
.split__body h2 { margin-bottom: 16px; }
.split__body p { color: var(--muted); margin-bottom: 14px; }
.points { margin-top: 18px; display: grid; gap: 12px; }
.points li { display: flex; gap: 10px; align-items: flex-start; color: var(--charcoal); font-weight: 500; }
.points .tick { color: var(--orange); font-weight: 800; }

/* =============================================================
   TEAM / LEADERSHIP
   ============================================================= */
.team__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.member { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 28px 22px; text-align: center; transition: var(--transition); }
.member:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.member__avatar { width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 16px; background: linear-gradient(135deg, var(--blue), var(--orange)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; }
.member h3 { font-size: 1.1rem; margin-bottom: 2px; }
.member__role { color: var(--orange); font-weight: 700; font-size: 0.85rem; display: block; margin-bottom: 10px; }
.member p { color: var(--muted); font-size: 0.88rem; }

/* =============================================================
   CLIENTS
   ============================================================= */
.clients__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.clients__list li { background: #fff; border: 1px solid var(--gray-200); border-radius: 30px; padding: 12px 26px; font-weight: 700; color: var(--blue); font-size: 0.95rem; transition: var(--transition); }
.clients__list li:hover { background: var(--blue); color: #fff; }

/* =============================================================
   CERTIFICATIONS
   ============================================================= */
.certs { background: var(--blue); color: #fff; }
.certs__inner { text-align: center; }
.certs__title { color: #fff; margin-bottom: 28px; }
.certs__list { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.cert { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 22px 30px; min-width: 160px; }
.cert strong { display: block; font-size: 1.6rem; color: var(--orange); }
.cert span { color: #c7d2e2; font-size: 0.85rem; }

/* =============================================================
   CONTACT
   ============================================================= */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.contact__list { margin-top: 24px; display: grid; gap: 18px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__ic { width: 44px; height: 44px; flex: none; border-radius: 10px; background: rgba(26,54,93,0.08); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.contact__list strong { display: block; color: var(--blue); margin-bottom: 2px; font-size: 0.95rem; }
.contact__list div { color: var(--muted); font-size: 0.95rem; }
.contact__list a:hover { color: var(--orange); }

.contact__form { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--charcoal); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem; color: var(--text); transition: var(--transition); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,54,93,0.12); }
.field.is-error input, .field.is-error textarea { border-color: #e53e3e; }
.field__err { color: #e53e3e; font-size: 0.8rem; margin-top: 5px; display: none; }
.field.is-error .field__err { display: block; }
.form__note { margin-top: 14px; font-size: 0.9rem; font-weight: 600; }
.form__note.ok { color: #2f855a; }
.form__note.bad { color: #e53e3e; }
.map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); margin-top: 44px; }
.map iframe { width: 100%; height: 400px; border: 0; display: block; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .values, .services__grid, .team__grid, .grid-projects { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .values, .services__grid, .team__grid, .grid-projects { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item--wide { grid-column: span 2; }
  .ctastrip__inner { flex-direction: column; text-align: center; }
  .contact__form { padding: 22px; }
}


/* =============================================================
   MOBILE DISPLAY ENHANCEMENTS (added) — scoped to small screens
   Desktop (wider than 860px) is unaffected.
   ============================================================= */

/* Tablet / large phone */
@media (max-width: 860px) {
  /* Shorter hero so it doesn't eat the whole screen */
  .hero { min-height: clamp(440px, 68vh, 560px); }
  .hero__title { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .hero__lead { font-size: 1rem; }

  /* Featured projects: show ~1.1 cards so it's obviously swipeable */
  .carousel__item { flex: 0 0 82%; }

  /* Page hero (inner pages) a touch tighter */
  .pagehero { padding: 48px 0; }
}

/* Phones */
@media (max-width: 640px) {
  /* Hero: compact height; collage slide shows the center cleanly */
  .hero { min-height: 440px; }
  .hero__caption { max-width: 100%; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }

  /* Collage slide: keep it filling width, bias to top so the skyline/road reads */
  .hero__slide--contain { background-position: center top; }

  /* Section rhythm tighter on phones */
  .section { padding: 44px 0; }
  .section__head { margin-bottom: 32px; }
  .section__sub { font-size: 1rem; }

  /* Stats: 2x2 already; make numbers fit nicely */
  .stat__num { font-size: clamp(1.8rem, 8vw, 2.4rem); }

  /* Project filter buttons: wrap neatly, stay tappable */
  .filters { gap: 8px; }
  .filter { padding: 9px 16px; font-size: 0.85rem; }

  /* Carousel: ~1.15 cards visible to signal swipe */
  .carousel__item { flex: 0 0 86%; }

  /* Gallery lightbox controls: bigger tap zones */
  .lightbox__close, .lightbox__prev, .lightbox__next { width: 58px; height: 58px; font-size: 2.2rem; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }

  /* Google map: sensible mobile height, no overflow */
  .map { margin-top: 28px; }
  .map iframe { height: 280px; }

  /* CTA strip text scales down */
  .ctastrip h2 { font-size: 1.15rem; }
}

/* Very small phones */
@media (max-width: 400px) {
  .hero { min-height: 400px; }
  .hero__title { font-size: 1.55rem; }
  .stat__num { font-size: 1.7rem; }
  .carousel__item { flex: 0 0 90%; }
}
