/* Product View - pixel-precise layout */

/* Scaffold */
body.page-project-view {
  background: #fff;
}

.pv-wrap {
  width: 1500px;
  margin: 0 auto;
  padding: 24px 0 60px;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: #101223;
}

/* Article View (av-*) */
body.page-article-view {
  background: #fff;
}

.av-wrap {
  max-width: 1300px;
  width: 92%;
  margin: 0 auto;
  padding: 24px 0 60px;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  color: #101223;
}

.av-hero {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f8;
  margin-bottom: 24px;
}

.av-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.av-header {
  text-align: center;
  margin: 54px 0 12px;
}

.av-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.av-date {
  font-size: 14px;
  color: #8a8e99;
  margin-bottom: 12px;
}

.av-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.av-pill {
  display: inline-block;
  font-size: 12px;
  color: #7a7d86;
  background: #f7f8fb;
  border: 1px solid #e6e9f0;
  border-radius: 999px;
  padding: 6px 12px;
}

.av-body {
  max-width: 800px;
  margin: 50px auto 256px;
  font-size: 15px;
  line-height: 26px;
  color: #333846;
  text-align: center;
}

.av-suggested {
  margin-top: 48px;
  margin-bottom: 24px;
}

.av-s-heading {
  font-size: 20px;
  font-weight: 800;
  color: #101223;
  margin: 0 0 20px;
}

.av-s-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 768px) {
  .av-s-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.av-s-grid .blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.av-s-grid .blog-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
  transform: translateY(-4px);
}

.av-s-grid .blog-card .card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.av-s-grid .blog-card .card-body {
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.av-s-grid .blog-card .card-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.av-s-grid .blog-card .card-categories .cat {
  color: #e74c3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.av-s-grid .blog-card .card-categories .sep {
  color: #ccc;
  flex-shrink: 0;
}

.av-s-grid .blog-card .card-categories .date {
  font-weight: 400;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

.av-s-grid .blog-card .card-title {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  color: #111;
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.av-s-grid .blog-card .card-excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: #888;
  margin-bottom: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Breadcrumbs */
.pv-breadcrumbs {
  font-size: 12px;
  color: #7a7d86;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pv-breadcrumbs a {
  color: #7a7d86;
  text-decoration: none;
}

.pv-breadcrumbs a:hover {
  color: #101223;
}

.pv-breadcrumbs .sep {
  color: #cacbd1;
}

/* Two-column main */
.pv-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

/* Gallery */
.pv-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 16px;
  align-items: start;
}

.pv-hero {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f8;
}

.pv-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pv-hero .overlay-actions {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
}

.pv-btn {
  background: rgba(16, 18, 35, 0.85);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: saturate(160%) blur(6px);
}

.pv-thumbs {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pv-thumb {
  width: 120px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e9ebf0;
  background: #f3f4f8;
}

.pv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Details */
.pv-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 16px;
}

.pv-back {
  display: inline-block;
  margin-bottom: 12px;
  color: #7a7d86;
  text-decoration: none;
  font-size: 12px;
}

.pv-back:hover {
  color: #101223;
}

/* Project details row */
.pj-details {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  margin-top: 36px;
}

.pj-meta ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pj-meta li {
  font-size: 13px;
  color: #555a66;
  line-height: 22px;
  margin-bottom: 6px;
}

.pj-meta strong {
  color: #7a7d86;
  font-weight: 600;
  margin-right: 6px;
}

.pj-project {
  font-size: 12px;
  color: #7a7d86;
  margin-bottom: 10px;
}

.pj-title {
  font-size: 44px;
  font-weight: 800;
  color: #101223;
  margin: 0;
}

.pj-hr {
  height: 1px;
  background: #e9ebf0;
  margin: 18px 0 22px;
}

.pj-body p {
  font-size: 14px;
  line-height: 24px;
  color: #333846;
  margin: 0 0 16px;
}

.pv-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.pv-features li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 22px;
  color: #555a66;
}

.pv-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #9aa0ab;
}

.pv-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 18px 0;
}

.pv-select label {
  display: block;
  font-size: 12px;
  color: #7a7d86;
  margin-bottom: 6px;
}

.pv-select select {
  width: 180px;
  height: 32px;
  border: 1px solid #d9dbe2;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  color: #101223;
}

.pv-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 22px;
}

.pv-download {
  font-size: 12px;
  color: #5b5d6b;
  text-decoration: none;
  margin-top: 60px;
}

.pv-download:hover {
  color: #101223;
}

.pv-contact {
  background: #bf2026;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pv-contact:hover {
  background: #a6191f;
}

.pv-date {
  font-size: 11px;
  color: #a0a3ab;
  margin-top: 2px;
}

.pv-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.pv-share .icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

/* Specs */
.pv-specs {
  margin-top: 40px;
}

.pv-specs h2 {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.pv-accordion {
  width: 100%;
}

.pv-acc-item {
  border: 1px solid #e9ebf0;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.pv-acc-header {
  background: #f7f7fa;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  cursor: pointer;
}

.pv-acc-title {
  font-size: 14px;
  font-weight: 700;
  color: #101223;
}

.pv-acc-arrow {
  width: 18px;
  height: 18px;
  border: 1px solid #cfd3dc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7d86;
  font-size: 11px;
}

.pv-acc-content {
  display: none;
  background: #fff;
}

.pv-acc-item.open .pv-acc-content {
  display: block;
}

.pv-spec-table {
  width: 100%;
  border-collapse: collapse;
}

.pv-spec-table th,
.pv-spec-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 10px 16px;
  font-size: 13px;
  color: #333846;
}

.pv-spec-table th {
  width: 220px;
  color: #7a7d86;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1280px) {
  .pv-wrap {
    width: 1000px;
  }

  .pv-hero {
    height: 460px;
  }
}

@media (max-width: 1024px) {
  .pv-wrap {
    width: 92%;
  }

  .pv-gallery {
    grid-template-columns: 1fr;
  }

  .pv-hero {
    height: 420px;
  }

  .pv-thumbs {
    flex-direction: row;
  }

  .pj-details {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .pv-hero {
    height: 320px;
  }

  .pj-title {
    font-size: 28px;
  }
}

/* Article View responsive */
@media (max-width: 1280px) {
  .av-hero {
    height: 460px;
  }
}

@media (max-width: 1024px) {
  .av-title {
    font-size: 44px;
  }

  .av-hero {
    height: 420px;
  }

  .av-body {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .av-title {
    font-size: 32px;
  }

  .av-hero {
    height: 300px;
  }

  .av-s-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Article Features Showcase ─── */
.av-features-showcase {
  width: 100%;
  margin-top: 24px;
  margin-bottom: 0;
  padding: 48px 0 60px;
  background: #fff;
}

.av-features-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.av-feat-block {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
  animation: avFeatFadeIn 0.7s ease forwards;
}

.av-feat-block:last-child {
  margin-bottom: 0;
}

/* Stagger animation */
.av-feat-block:nth-child(1) {
  animation-delay: 0.1s;
}

.av-feat-block:nth-child(2) {
  animation-delay: 0.25s;
}

.av-feat-block:nth-child(3) {
  animation-delay: 0.4s;
}

.av-feat-block:nth-child(4) {
  animation-delay: 0.55s;
}

.av-feat-block:nth-child(5) {
  animation-delay: 0.7s;
}

.av-feat-block:nth-child(n+6) {
  animation-delay: 0.85s;
}

@keyframes avFeatFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Text Block */
.av-feat-text {
  color: #1a1a2e;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  text-align: center;
}

.av-feat-text h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  color: #101223;
}

.av-feat-text h2 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #101223;
}

.av-feat-text h3 {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: #101223;
}

.av-feat-text p {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.8;
  color: #333846;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.av-feat-text ul,
.av-feat-text ol {
  color: #333846;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.8;
}

/* Image Block */
.av-feat-image {
  text-align: center;
}

.av-feat-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.av-feat-caption {
  margin-top: 14px;
  font-size: 14px;
  color: #7a7d86;
  font-style: italic;
  text-align: center;
}

/* Video Block */
.av-feat-video {
  text-align: center;
}

.av-feat-video video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* Photo Grid Block */
.av-feat-grid {
  display: grid;
  gap: 12px;
}

.av-feat-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.av-feat-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.av-feat-grid-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f3f4f8;
}

.av-feat-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.av-feat-grid-item:hover img {
  transform: scale(1.05);
}

/* Image + Text Block */
.av-feat-imgtext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.av-feat-imgtext.swapped {
  direction: rtl;
}

.av-feat-imgtext.swapped>* {
  direction: ltr;
}

.av-feat-imgtext-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.av-feat-imgtext-text {
  color: #1a1a2e;
}

.av-feat-imgtext-text h1,
.av-feat-imgtext-text h2 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: #101223;
}

.av-feat-imgtext-text h3 {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  margin-bottom: 10px;
  color: #101223;
}

.av-feat-imgtext-text p {
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.8;
  color: #555a66;
}

/* Embed Block */
.av-feat-embed {
  border-radius: 12px;
  overflow: hidden;
}

.av-feat-embed iframe {
  width: 100%;
  min-height: 400px;
  border: none;
  border-radius: 12px;
}

/* Article Features responsive */
@media (max-width: 768px) {
  .av-features-showcase {
    padding: 32px 0;
  }

  .av-feat-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
  }

  .av-feat-imgtext {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .av-feat-block {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .av-features-showcase {
    padding: 24px 0;
  }

  .av-feat-grid.cols-2,
  .av-feat-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Page-only hero min-height adjustments (product_view.php) */
@media (min-width: 1024px) and (orientation: landscape) {

  body.page-project-view .hero-section-container,
  body.page-project-view .hero-content {
    min-height: 200px !important;
  }
}

/* Page-only hero min-height adjustments (article_view.php) */
@media (min-width: 1024px) and (orientation: landscape) {

  body.page-article-view .hero-section-container,
  body.page-article-view .hero-content {
    min-height: 200px !important;
  }
}

/* Tablet portrait-only hero min-height (article_view.php) */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {

  body.page-article-view .hero-section-container,
  body.page-article-view .hero-content {
    min-height: 10vh !important;
  }
}

/* Tablet range 820–1023px (article_view.php only) */
@media (min-width: 390px) {

  body.page-article-view .hero-section-container,
  body.page-article-view .hero-content {
    min-height: 15vh !important;
  }
}

/* Tablet range 820–1023px (article_view.php only) */
@media (min-width: 414px) and (max-width: 1023px) {

  body.page-article-view .hero-section-container,
  body.page-article-view .hero-content {
    min-height: 10vh !important;
  }
}

@media (min-width: 820px) and (max-width: 1023px) {

  body.page-project-view .hero-section-container,
  body.page-project-view .hero-content {
    min-height: 10vh !important;
  }
}

/* Portrait tablets/desktops: page-only adjustment */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {

  body.page-project-view .hero-section-container,
  body.page-project-view .hero-content {
    min-height: 10vh !important;
  }
}