/* Makent Portfolio Tabs — monitor mockups + sidebar (design-matched) */

.mpt-wrap {
  --mpt-navy: #162544;
  --mpt-navy-card: #1a2b4a;
  --mpt-coral: #e85d3f;
  --mpt-coral-hover: #f06f52;
  --mpt-text: #1f2937;
  --mpt-muted: #9ca3af;
  --mpt-white: #ffffff;
  --mpt-shadow: 0 10px 40px rgba(22, 37, 68, 0.1);
  --mpt-radius: 20px;
  --mpt-sidebar-w: 252px;

  display: flex;
  gap: 30px;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 0 48px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--mpt-text);
}

.mpt-wrap *,
.mpt-wrap *::before,
.mpt-wrap *::after {
  box-sizing: border-box;
}

/* Sidebar */
.mpt-sidebar {
  flex: 0 0 var(--mpt-sidebar-w);
  background: var(--mpt-white);
  border-radius: var(--mpt-radius);
  box-shadow: var(--mpt-shadow);
  padding: 12px 0;
  position: sticky;
  top: 24px;
}

.mpt-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mpt-tab-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--mpt-text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.mpt-tab-btn:hover {
  background: #f4f6fa;
}

.mpt-tab-btn.is-active {
  background: var(--mpt-navy);
  color: var(--mpt-white);
  font-weight: 600;
}

.mpt-tab-btn .mpt-chevron {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 17px;
}

.mpt-tab-btn.is-active .mpt-chevron {
  opacity: 1;
  transform: translateX(0);
}

/* Grid */
.mpt-main {
  flex: 1;
  min-width: 0;
}

.mpt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}

.mpt-grid.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Card */
.mpt-card {
  display: flex;
  flex-direction: column;
  animation: mptFadeIn 0.4s ease both;
}

@keyframes mptFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Monitor — full frame + chin bezel + stand (genuine look) */
.mpt-monitor {
  padding: 0 6px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.2));
}

.mpt-monitor-frame {
  background: linear-gradient(165deg, #525860 0%, #353941 40%, #25282f 100%);
  border-radius: 20px 20px 10px 10px;
  padding: 10px 10px 10px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.mpt-chrome {
  background: var(--mpt-white);
  border-radius: 10px 10px 0 0;
  padding: 3px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-bottom: none;
}

.mpt-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.mpt-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.mpt-dots span:nth-child(1) {
  background: #ff5f57;
}
.mpt-dots span:nth-child(2) {
  background: #febc2e;
}
.mpt-dots span:nth-child(3) {
  background: #28c840;
}

.mpt-chrome-bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #eef1f6;
}

/* Screen viewport — taller window, full screenshot visible */
.mpt-wrap .mpt-screen-viewport {
    position: relative;
    overflow: hidden !important;
    background: #ffffff;
    width: 100%;
    height: clamp(150px, 32vw, 150px);
    min-height: 150px;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    line-height: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.mpt-wrap .mpt-screen-track {
  will-change: transform;
  transform: translateY(0);
  transition: transform var(--mpt-scroll-duration, 8s) cubic-bezier(0.45, 0, 0.2, 1);
  line-height: 0;
}

.mpt-wrap .mpt-screen-shot {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  object-fit: unset !important;
  object-position: top center !important;
  pointer-events: none;
  user-select: none;
  vertical-align: top;
}

/* Short screenshot: show full page inside screen (no harsh crop) */
.mpt-wrap .mpt-screen-viewport.mpt-fit-contain {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  background: #f8fafc;
  line-height: normal;
}

.mpt-wrap .mpt-screen-viewport.mpt-fit-contain .mpt-screen-track {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.mpt-wrap .mpt-screen-viewport.mpt-fit-contain .mpt-screen-shot {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: top center !important;
}

/* Bottom chin bezel (was missing — screen looked cut off) */
.mpt-wrap .mpt-bezel-chin {
  background: linear-gradient(180deg, #3a3f47 0%, #2a2e35 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* CSS hover + JS mouseenter both supported */
.mpt-wrap .mpt-monitor:hover .mpt-screen-track.has-scroll,
.mpt-wrap .mpt-screen-viewport.is-scrolling .mpt-screen-track.has-scroll {
  transform: translateY(var(--mpt-scroll-y, 0)) !important;
}

.mpt-screen-viewport::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.08), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mpt-monitor:hover .mpt-screen-viewport.has-scroll::after {
  opacity: 1;
}

/* Stand — neck + base connected to monitor */
.mpt-wrap .mpt-stand-neck {
  width: 22%;
  height: 18px;
  margin: 0 auto;
  background: linear-gradient(180deg, #3d424a 0%, #2c3038 100%);
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

.mpt-wrap .mpt-stand {
  width: 44%;
  height: 8px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2c3038 0%, #1a1d22 100%);
  border-radius: 0 0 6px 6px;
}

.mpt-wrap .mpt-stand-base {
  width: 58%;
  height: 7px;
  display: none;
  margin: 0 auto 4px;
  background: #14171c;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

/* Info card (navy bar below monitor) */
.mpt-info {
  background: var(--mpt-navy-card);
  border-radius: var(--mpt-radius);
  padding: 09px 18px 09px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--mpt-shadow);
  margin: 12px 7px 0 7px;
}

.mpt-info-cat {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.mpt-info-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--mpt-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpt-info-text {
  min-width: 0;
  flex: 1;
}

/* Visit button — accent (coral) + default (dark) */
.mpt-visit {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--mpt-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.mpt-visit--accent {
  background: var(--mpt-coral);
  border-color: var(--mpt-coral);
  box-shadow: 0 6px 18px rgba(232, 93, 63, 0.45);
}

.mpt-visit:hover {
  transform: translateX(4px);
  color: var(--mpt-white);
}

.mpt-visit--accent:hover {
  background: var(--mpt-coral-hover);
  border-color: var(--mpt-coral-hover);
}

.mpt-visit:not(.mpt-visit--accent):hover {
  background: rgba(255, 255, 255, 0.2);
}

.mpt-visit svg {
  width: 22px;
  height: 22px;
}

.mpt-empty {
  grid-column: 1 / -1;
  background: var(--mpt-white);
  border-radius: var(--mpt-radius);
  padding: 36px;
  text-align: center;
  color: var(--mpt-muted);
  box-shadow: var(--mpt-shadow);
}

@media (max-width: 1100px) {
  .mpt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .mpt-wrap {
    flex-direction: column;
    gap: 18px;
  }

  .mpt-sidebar {
    flex: none;
    width: 100%;
    position: static;
    padding: 8px;
  }

  .mpt-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .mpt-tabs li {
    flex: 0 0 auto;
  }

  .mpt-tab-btn {
    white-space: nowrap;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .mpt-tab-btn .mpt-chevron {
    display: none;
  }

  .mpt-grid {
    grid-template-columns: 1fr;
  }
}

/* Built-in mockup preview (matches reference design when no image uploaded) */
.mpt-wrap .mpt-mockup {
  background: #fff;
  min-height: 320%;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.mpt-wrap .mpt-mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f6;
  font-size: 11px;
  color: #374151;
}

.mpt-wrap .mpt-mock-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.mpt-wrap .mpt-mock-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.mpt-wrap .mpt-mock-links {
  display: flex;
  gap: 10px;
  color: #6b7280;
  font-size: 10px;
}

.mpt-wrap .mpt-mock-hero {
  position: relative;
  padding: 22px 16px 28px;
  color: #fff;
  overflow: hidden;
  min-height: 140px;
}

.mpt-wrap .mpt-mockup--blue .mpt-mock-logo {
  background: #60a5fa;
}
.mpt-wrap .mpt-mockup--blue .mpt-mock-hero {
  background: linear-gradient(135deg, #4f7cff 0%, #7b4dff 100%);
}

.mpt-wrap .mpt-mockup--green .mpt-mock-logo {
  background: #34d399;
}
.mpt-wrap .mpt-mockup--green .mpt-mock-hero {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.mpt-wrap .mpt-mockup--orange .mpt-mock-logo {
  background: #fb923c;
}
.mpt-wrap .mpt-mockup--orange .mpt-mock-hero {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.mpt-wrap .mpt-mock-label {
  margin: 0 0 6px;
  font-size: 9px;
  letter-spacing: 0.12em;
  opacity: 0.9;
  font-weight: 600;
}

.mpt-wrap .mpt-mock-hero h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  max-width: 70%;
}

.mpt-wrap .mpt-mock-hero > p {
  margin: 0 0 12px;
  font-size: 10px;
  opacity: 0.92;
  max-width: 65%;
}

.mpt-wrap .mpt-mock-cta {
  display: inline-block;
  background: #fff;
  color: #1f2937;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
}

.mpt-wrap .mpt-mock-orb {
  position: absolute;
  right: -20px;
  top: 10px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mpt-wrap .mpt-mock-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #eef1f6;
  text-align: center;
}

.mpt-wrap .mpt-mock-stats strong {
  display: block;
  font-size: 12px;
  color: #111827;
}

.mpt-wrap .mpt-mock-stats span {
  font-size: 8px;
  color: #6b7280;
}

.mpt-wrap .mpt-mock-block {
  height: 90px;
  background: #f3f4f6;
  margin: 10px 12px;
  border-radius: 8px;
}

.mpt-wrap .mpt-mock-block--light {
  height: 70px;
  background: #e5e7eb;
}

.mpt-wrap .mpt-mock-footer {
  padding: 16px;
  text-align: center;
  font-size: 10px;
  color: #9ca3af;
}