/**
 * Premium inner pages: About, Infrastructure, Gallery, Products, Product detail
 */
body[data-page="about"],
body[data-page="infrastructure"],
body[data-page="gallery"],
body[data-page="products"],
body[data-page="product-detail"] {
  --ip-brand: #c5963d;
  --ip-blue: #024fae;
  --ip-navy: #0f2740;
  --ip-muted: #475569;
  --ip-card: #fff;
  --ip-radius: 20px;
  --ip-shadow: 0 14px 40px rgba(15, 39, 64, 0.08);
}

/* Section backgrounds */
.ip-section {
  padding: clamp(2rem, 4vw, 3rem) 0;
  overflow: visible;
}

.ip-section--cream {
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(2, 79, 174, 0.06), transparent 55%),
    linear-gradient(180deg, #f3ede3 0%, #f7f4ee 100%);
}

.ip-section--light {
  background: linear-gradient(180deg, #faf6ed 0%, #f7f4ee 100%);
}

.ip-section--navy {
  background: linear-gradient(165deg, #0c2238 0%, var(--ip-navy) 50%, #061525 100%);
  color: #fff;
}

.ip-section--navy .ip-title,
.ip-section--navy .ip-eyebrow,
.ip-section--navy p {
  color: #fff;
}

.ip-section--navy .ip-eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.ip-shell {
  background: rgba(255, 252, 248, 0.95);
  border: 1px solid rgba(197, 150, 61, 0.2);
  border-radius: 24px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--ip-shadow);
  margin-bottom: 0.5rem;
}

.ip-section--navy .ip-shell--glass {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

/* Section header */
.ip-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
}

.ip-head--left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.ip-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ip-blue);
  margin-bottom: 0.4rem;
}

.ip-eyebrow::before {
  content: '';
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, var(--ip-blue), var(--ip-brand));
  border-radius: 2px;
}

.ip-head--left .ip-eyebrow::before {
  display: inline-block;
}

.ip-title {
  font-family: 'Sora', 'Poppins', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--ip-navy);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.ip-title span {
  color: var(--ip-brand);
}

.ip-title.h4,
.ip-title--sm {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

.ip-lead {
  font-size: 0.95rem;
  color: var(--ip-muted);
  margin: 0;
  line-height: 1.65;
}

/* Cards */
.ip-card {
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 18px;
  padding: 1.35rem;
  height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  box-shadow: 0 6px 20px rgba(15, 39, 64, 0.05);
}

.ip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 39, 64, 0.1);
  border-color: rgba(197, 150, 61, 0.35);
}

.ip-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(2, 79, 174, 0.1), rgba(197, 150, 61, 0.15));
  color: var(--ip-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.ip-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ip-navy);
  margin-bottom: 0.5rem;
}

.ip-card p {
  font-size: 0.88rem;
  color: var(--ip-muted);
  margin: 0;
  line-height: 1.55;
}

.ip-card--wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.ip-card--wide i {
  color: var(--ip-brand);
  font-size: 1.1rem;
}

/* Stats */
.ip-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ip-stat {
  text-align: center;
  padding: 1rem 0.75rem;
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 14px;
}

.ip-stat strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.65rem;
  color: var(--ip-blue);
  line-height: 1.1;
}

.ip-stat span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ip-muted);
}

/* Media frame */
.ip-media-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--ip-shadow);
}

.ip-media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid rgba(197, 150, 61, 0.4);
  border-radius: 20px;
  pointer-events: none;
}

.ip-media-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
  min-height: 260px;
}

/* Cert pills */
.ip-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ip-cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ip-navy);
  line-height: 1.45;
}

.ip-cert-item i {
  color: var(--ip-brand);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Contact strip (about) */
.ip-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ip-contact-tile {
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.ip-contact-tile small {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 0.35rem;
}

.ip-contact-tile strong {
  font-size: 0.9rem;
  color: #fff;
  word-break: break-word;
}

.ip-contact-tile a {
  color: #cbe7fb;
  text-decoration: none;
}

/* Credential cards */
.ip-cred-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ip-cred-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 18px;
  height: 100%;
  transition: transform 0.2s;
}

.ip-cred-card:hover {
  transform: translateY(-4px);
}

.ip-cred-card i {
  font-size: 2rem;
  color: var(--ip-blue);
}

.ip-cred-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
  color: var(--ip-navy);
}

/* Gallery */
.ip-gallery-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.ip-filter-btn {
  border: 1px solid rgba(2, 79, 174, 0.2);
  background: var(--ip-card);
  color: var(--ip-navy);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  transition: all 0.2s;
}

.ip-filter-btn:hover,
.ip-filter-btn.active {
  background: linear-gradient(135deg, var(--ip-blue), #2b6591);
  border-color: transparent;
  color: #fff;
}

.ip-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ip-gallery-item {
  min-width: 0;
}

.ip-gallery-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 39, 64, 0.1);
}

.ip-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ip-gallery-card:hover img {
  transform: scale(1.06);
}

.ip-gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 39, 64, 0.75) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 0.85rem;
  opacity: 0;
  transition: opacity 0.25s;
}

.ip-gallery-card:hover .ip-gallery-card__overlay {
  opacity: 1;
}

.ip-gallery-card__overlay span {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.ip-gallery-card__zoom {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ip-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ip-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ip-video-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.ip-video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ip-video-card .video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 39, 64, 0.35);
  transition: background 0.2s;
}

.ip-video-card:hover .video-play-btn {
  background: rgba(15, 39, 64, 0.5);
}

.ip-video-card .video-play-btn i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ip-brand);
  color: var(--ip-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Product listing */
.ip-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.ip-product-card {
  display: flex;
  flex-direction: column;
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s, box-shadow 0.22s;
  box-shadow: 0 8px 24px rgba(15, 39, 64, 0.06);
}

.ip-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 39, 64, 0.12);
  color: inherit;
}

.ip-product-card__img {
  height: 200px;
  overflow: hidden;
}

.ip-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.ip-product-card:hover .ip-product-card__img img {
  transform: scale(1.05);
}

.ip-product-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ip-product-card__body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ip-navy);
  margin-bottom: 0.35rem;
}

.ip-product-card__tagline {
  font-size: 0.82rem;
  color: var(--ip-muted);
  margin-bottom: 0.75rem;
}

.ip-product-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--ip-muted);
}

.ip-product-card__features li {
  margin-bottom: 0.25rem;
}

.ip-product-card__features i {
  color: var(--ip-brand);
}

.ip-product-card__cta {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ip-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Product detail */
.ip-product-hero {
  padding: clamp(2rem, 4vw, 3rem) 0;
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(197, 150, 61, 0.1), transparent 50%),
    linear-gradient(180deg, #f3ede3 0%, #f7f4ee 100%);
}

.ip-product-shell {
  background: rgba(255, 252, 248, 0.95);
  border: 1px solid rgba(197, 150, 61, 0.2);
  border-radius: 24px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--ip-shadow);
}

.ip-product-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.ip-product-info-panel {
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: var(--ip-radius);
  padding: clamp(1.15rem, 2.5vw, 1.65rem);
  box-shadow: 0 8px 28px rgba(15, 39, 64, 0.06);
}

.ip-product-info-panel .ip-title {
  font-size: 1.35rem;
}

.ip-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.ip-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(2, 79, 174, 0.08);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--ip-navy);
}

.ip-feature-list li i {
  color: var(--ip-brand);
  margin-top: 0.15rem;
}

.ip-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ip-product-actions .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
}

.ip-spec-panel {
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: var(--ip-radius);
  padding: 1.35rem;
  height: 100%;
}

.ip-spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ip-spec-table tr {
  border-bottom: 1px solid rgba(2, 79, 174, 0.08);
}

.ip-spec-table tr:last-child {
  border-bottom: none;
}

.ip-spec-table th,
.ip-spec-table td {
  padding: 0.75rem 0.5rem;
  font-size: 0.88rem;
  vertical-align: top;
}

.ip-spec-table th {
  width: 42%;
  font-weight: 700;
  color: var(--ip-navy);
}

.ip-spec-table td {
  color: var(--ip-muted);
}

.ip-app-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--ip-card);
  border: 1px solid rgba(2, 79, 174, 0.1);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ip-navy);
  height: 100%;
}

.ip-app-chip i {
  color: var(--ip-brand);
}

.ip-enquiry-panel {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(160deg, #fff 0%, #faf6ed 100%);
  border: 1px solid rgba(197, 150, 61, 0.25);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--ip-shadow);
}

.ip-enquiry-panel .form-control {
  border-radius: 12px;
  border: 1px solid rgba(2, 79, 174, 0.14);
  min-height: 48px;
}

.ip-enquiry-panel .btn-primary-glow {
  border-radius: 999px;
  font-weight: 700;
}

/* Infra photo grid */
.ip-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ip-photo-card {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.ip-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.ip-photo-card:hover img {
  transform: scale(1.05);
}

/* CTA band */
.ip-cta-band {
  text-align: center;
  padding: clamp(2rem, 4vw, 2.75rem) 1.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--ip-navy), var(--ip-blue));
  color: #fff;
}

.ip-cta-band h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  margin-bottom: 0.75rem;
  color: #fff;
}

.ip-cta-band p {
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 1.25rem;
  font-size: 0.92rem;
}

.ip-cta-band .btn-accent {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
}

/* Footer clearance */
body[data-page="about"] .site-main,
body[data-page="infrastructure"] .site-main,
body[data-page="gallery"] .site-main,
body[data-page="products"] .site-main,
body[data-page="product-detail"] .site-main {
  overflow: visible;
  padding-bottom: 1rem;
}

body[data-page="about"] .site-footer,
body[data-page="infrastructure"] .site-footer,
body[data-page="gallery"] .site-footer,
body[data-page="products"] .site-footer,
body[data-page="product-detail"] .site-footer {
  margin-top: 2rem !important;
}

@media (max-width: 991.98px) {
  .ip-cert-grid,
  .ip-contact-grid,
  .ip-cred-grid {
    grid-template-columns: 1fr;
  }

  .ip-gallery-grid,
  .ip-product-grid,
  .ip-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ip-product-layout {
    grid-template-columns: 1fr;
  }

  .ip-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="about"] .site-main,
  body[data-page="infrastructure"] .site-main,
  body[data-page="gallery"] .site-main,
  body[data-page="products"] .site-main,
  body[data-page="product-detail"] .site-main {
    padding-bottom: calc(var(--bottom-nav-h, 74px) + 1rem);
  }
}

@media (max-width: 575.98px) {
  .ip-gallery-grid,
  .ip-product-grid,
  .ip-video-grid {
    grid-template-columns: 1fr;
  }

  .ip-shell {
    border-radius: 16px;
    padding: 1rem;
  }
}
