/* ==========================================================================
   TRENYORA — UI/UX UPGRADES, REFERENCE PROJECT MODAL & ACHIEVEMENTS STYLES
   ========================================================================== */

/* 1. Announcement Banner (Optional CMS-Controlled) */
.cms-announcement-bar {
  background: linear-gradient(90deg, #1D4ED8 0%, #6D28D9 100%);
  color: #FFFFFF;
  text-align: center;
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1200;
}

.cms-announcement-bar.visible {
  display: flex;
}

.cms-announcement-bar a {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
}

/* 2. Achievements & Global Impact Section (Immediately Below Hero) */
.impact-section {
  padding: 64px 0 76px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(238, 244, 255, 0.72) 55%, rgba(245, 243, 255, 0.65) 100%);
  border-top: 1px solid rgba(199, 210, 254, 0.6);
  border-bottom: 1px solid rgba(199, 210, 254, 0.6);
  position: relative;
  z-index: 5;
}

.impact-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 44px;
}

.impact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4F46E5;
  background: #F3F0FF;
  border: 1px solid rgba(124, 58, 237, 0.22);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.impact-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.impact-subheading {
  font-size: 1.06rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.impact-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 38px;
}

.impact-stat-card {
  background: #FFFFFF;
  border: 1px solid rgba(199, 210, 254, 0.85);
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.impact-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 18px 42px rgba(79, 70, 229, 0.11);
}

.impact-stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 3.6vw, 3.1rem);
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.impact-stat-label {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.impact-stat-desc {
  font-size: 0.84rem;
  color: #64748B;
  line-height: 1.5;
  margin: 0;
}

.impact-cta-wrap {
  text-align: center;
}

@media (max-width: 1024px) {
  .impact-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .impact-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 3. Live Productions Showcase Refinements */
.media-showcase-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.media-search-box {
  position: relative;
  min-width: 230px;
  max-width: 300px;
  flex: 1;
}

.media-search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  border: 1px solid rgba(199, 210, 254, 0.9);
  background: #FFFFFF;
  color: #0F172A;
  font-size: 0.86rem;
}

.media-search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  pointer-events: none;
}

.media-visual-frame {
  aspect-ratio: 16 / 10;
  height: auto !important;
}

.media-gallery-icon-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #4F46E5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}

.media-load-more-wrap {
  text-align: center;
  margin-top: 28px;
}

/* Global Mobile Horizontal Overflow Guard */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

/* 4. MANDATORY REFERENCE-MATCHED TWO-COLUMN PROJECT & CASE STUDY MODAL */
.editorial-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  z-index: 99990;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  box-sizing: border-box;
}

.editorial-modal-backdrop.open {
  display: flex;
}

.editorial-modal-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(1360px, 92vw);
  max-height: 90vh;
  background: #FFFFFF !important;
  opacity: 1 !important;
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.42);
  overflow-y: auto;
  overflow-x: hidden;
  color: #334155 !important;
  border: 1px solid rgba(226, 232, 240, 0.95);
  animation: editorialModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.editorial-modal-shell:focus {
  outline: none;
}

@keyframes editorialModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.editorial-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 25;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  font-size: 1.35rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
}

.editorial-modal-close:hover {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

.editorial-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  align-items: start;
  background: #FFFFFF;
  width: 100%;
}

.editorial-col-left {
  padding: 36px 34px 36px 40px;
  border-right: 1px solid #EEF2FF;
  background: #FFFFFF;
  min-width: 0;
}

.editorial-col-right {
  padding: 36px 56px 36px 34px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.editorial-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.editorial-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.editorial-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
}

.editorial-title {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 2.5vw, 2.3rem);
  font-weight: 800;
  color: #0F172A !important;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 10px 0;
}

.editorial-client-line {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: #4F46E5;
  margin-bottom: 20px;
}

/* Hero Media Stage (Image or Validated Video) */
.editorial-hero-stage {
  border-radius: 16px;
  overflow: hidden;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  margin-bottom: 14px;
  position: relative;
}

.tm-video-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0F172A;
}

.tm-video-ratio iframe,
.tm-video-ratio video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.tm-cover-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #F1F5F9;
}

.tm-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.tm-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.tm-watch-external-btn {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #FFFFFF !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* Clickable Gallery Strip with Prev / Next Arrows */
.editorial-gallery-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.editorial-gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 30px) / 4);
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  width: 100%;
  padding: 2px 0;
}

.editorial-gallery-track::-webkit-scrollbar {
  display: none;
}

.editorial-thumb-btn {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #F1F5F9;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.editorial-thumb-btn.active {
  border-color: #6366F1;
}

.editorial-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editorial-gal-nav.prev { left: -12px; }
.editorial-gal-nav.next { right: -12px; }

/* Left Column Testimonial Card (Hidden when no genuine testimonial) */
.editorial-testimonial-box {
  background: #F4F1FF;
  border: 1px solid #E9E3FF;
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.editorial-quote-mark {
  font-family: Georgia, serif;
  font-size: 2.6rem;
  line-height: 0.8;
  color: #7C3AED;
  flex-shrink: 0;
  margin-top: 4px;
}

.editorial-quote-text {
  font-size: 0.94rem;
  font-style: italic;
  color: #1E293B;
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.editorial-quote-author {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0F172A;
}

/* Right Column Structured Sections */
.editorial-overview-card {
  background: #F4F1FF;
  border: 1px solid #EAE4FF;
  border-radius: 16px;
  padding: 20px 22px;
}

.editorial-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.editorial-sec-icon {
  color: #5B4CE6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.editorial-sec-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: #0F172A !important;
  margin: 0;
}

.editorial-sec-body {
  font-size: 0.93rem;
  color: #334155 !important;
  line-height: 1.62;
  margin: 0;
  padding-left: 30px;
}

.editorial-overview-card .editorial-sec-body {
  padding-left: 30px;
}

.editorial-services-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}

.editorial-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #F4F1FF;
  border: 1px solid #E6E0FF;
  color: #1E293B;
  font-size: 0.84rem;
  font-weight: 600;
}

.editorial-service-chip svg {
  color: #5B4CE6;
  flex-shrink: 0;
}

.editorial-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.editorial-result-card {
  background: #F4F1FF;
  border: 1px solid #EAE4FF;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.editorial-result-icon {
  color: #5B4CE6;
  display: inline-flex;
}

.editorial-result-label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
}

.editorial-cta-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.editorial-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.4);
}

.editorial-secondary-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.editorial-sec-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: #4F46E5;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: #F4F1FF;
  border: 1px solid #E6E0FF;
}

.editorial-sec-link:hover {
  background: #EDE9FE;
}

@media (max-width: 960px) {
  .editorial-modal-backdrop {
    padding: 12px;
  }
  .editorial-modal-shell {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px;
  }
  .editorial-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
  .editorial-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-col-left {
    padding: 22px 18px 20px;
    border-right: none;
    border-bottom: 1px solid #EEF2FF;
  }
  .editorial-meta-row {
    padding-right: 44px;
  }
  .editorial-col-right {
    padding: 20px 18px 26px;
  }
  .editorial-sec-body,
  .editorial-overview-card .editorial-sec-body {
    padding-left: 0;
  }
  .editorial-results-grid {
    grid-template-columns: 1fr;
  }
  .editorial-gallery-track {
    grid-auto-columns: calc((100% - 16px) / 3);
  }
  .editorial-gal-nav.prev { left: 4px; }
  .editorial-gal-nav.next { right: 4px; }
}

/* 5. Growth Calculator Breakdown Grid */
.calc-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.calc-metric-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
}

.calc-metric-pill span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 4px;
}

.calc-metric-pill strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
}

.calc-disclaimer-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(199, 210, 254, 0.8);
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.5;
}

/* Verified badge on reviews */
.review-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Fix duplicate-free client cards grid when few items */
.client-showcase-grid-clean {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
