/* ============================================
   EASEIN STUDIO — PORTFOLIO (REELS STYLE)
============================================ */

:root {
  --header-height: 76px;
  --accent-cyan: #00f0ff;
  --bg-dark: #000b0f;
  --card-bg: #000;
  --text-main: #e8fdff;
}

body {
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

.portfolio-page {
  padding-top: calc(var(--header-height) + 40px);
}

/* ================= HERO SECTION ================= */

.portfolio-hero {
  padding: 20px 20px 60px;
}

.portfolio-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}

/* Ghost Text Background */
.ghost-text {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15vw;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

/* Hero Text */
.portfolio-hero-text {
  position: relative;
  z-index: 2;
}

.hero-tag {
  color: var(--accent-cyan);
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero-heading {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-heading .accent {
  color: var(--accent-cyan);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.hero-sub {
  font-size: 16px;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 450px;
}

/* Filter Pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: 0.3s;
}

.pill:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.pill .material-symbols-rounded {
  font-size: 18px;
}

/* Hero Video Container (Wide Cinematic) */
.hero-reel-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 1;

  /* PREPARE FOR ANIMATION */
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  animation: heroIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.4s;
  /* Wait slightly for text to start */

  /* ENSURE SMOOTH SCROLL TRANSFORMS */
  will-change: transform, opacity, filter;
  transition: transform 0.1s linear;
  /* Short transition for scroll smoothness */
}

/* THE "IN" ANIMATION KEYFRAMES */
@keyframes heroIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  position: absolute;
  top: 0;
  left: 0;
}

.video-main {
  z-index: 2;
  border: 1px solid rgba(0, 255, 255, 0.3);
}

.video-blur {
  z-index: 1;
  transform: scale(1.05) translateY(10px);
  filter: blur(30px);
  opacity: 0.6;
}

/* Responsive Hero */
@media (max-width: 900px) {
  .portfolio-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
.hero-heading {
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 20px;
}
  .hero-pills {
    justify-content: center;
  }

  .hero-sub {
    margin: 0 auto 30px;
  }
}

/* ================= CAROUSEL SECTIONS ================= */

.portfolio-section {
  padding: 60px 0;
}

.section-header {
  max-width: 1300px;
  margin: 0 auto 30px;
  padding: 0 90px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
@media(max-width: 768px) {
  .section-header {
  max-width: 1300px;
  margin: 0 auto 30px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
}
.section-header-mp {
  max-width: 1300px;
  margin: 0 auto 30px;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
@media(max-width: 768px) {
  .section-header-mp {
  max-width: 1300px;
  margin: 0 auto 30px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
}
.section-tag {
  color: var(--accent-cyan);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
}

.section-header h2 {
  font-size: 32px;
  margin: 5px 0 0;
}
.section-header-mp h2 {
  font-size: 32px;
  margin: 5px 0 0;
}

.section-desc {
  font-size: 14px;
  opacity: 0.7;
  max-width: 300px;
  text-align: right;
}

.portfolio-carousel {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.carousel-track {
  overflow-x: auto;
  /* keep scroll */
  scrollbar-width: none;
  /* Firefox */
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 24px 50px;
  /* Extra bottom padding for hover expansion */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.2);
  border-radius: 10px;
}

/* Buttons */
.carousel-btn {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
  transition: 0.3s;
  flex-shrink: 0;
  margin: 0 10px;
}

.carousel-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

@media(max-width: 768px) {
  .carousel-btn {
    display: none;
  }
}

/* ================= VIDEO CARDS (REELS STYLE) ================= */

.video-card {
  /* Enforce 9:16 Vertical Ratio */
  width: 260px;
  aspect-ratio: 9 / 16;
  flex-shrink: 0;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  scroll-snap-align: center;
}

/* Hover Effect: Lift & Glow */
.video-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15);
}

.thumb-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.thumb-wrapper video,
.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide Default Overlay Elements from HTML to clean it up via CSS */
.thumb-overlay {
  display: none;
}

/* RE-STYLE .video-meta TO BE THE OVERLAY */
.video-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 80px 15px 20px;
  /* Top padding creates space for gradient */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
  z-index: 5;
  pointer-events: none;
  /* Let clicks pass through to card */
  transition: 0.3s;
}

.video-meta h3 {
  font-size: 16px;
  margin: 0 0 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #fff;
}

.video-meta p {
  font-size: 13px;
  margin: 0;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Add a fake play button icon via CSS */
.video-meta::after {
  content: "play_circle";
  font-family: "Material Symbols Rounded";
  position: absolute;
  top: 20px;
  /* Positioned within the gradient area */
  right: 15px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: scale(0.8);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Show Play Button on Hover */
.video-card:hover .video-meta::after {
  opacity: 1;
  transform: scale(1);
  color: var(--accent-cyan);
}

/*another landscape variant*/
/* ================= VIDEO CARDS (REELS STYLE) ================= */

.video-card1 {
  aspect-ratio: 16 / 9;
  /* LANDSCAPE */
  width: 400px;
  /* or auto in flex/grid */
  max-width: 100%;
  height: 250px;
  flex-shrink: 0;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}


/* Hover Effect: Lift & Glow */
.video-card1:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15);
}

.thumb-wrapper1 {
  width: 100%;
  height: 100%;
  /* position: relative; */
}

.thumb-wrapper1 video,
.thumb-wrapper1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* display: block; */
}

/* Hide Default Overlay Elements from HTML to clean it up via CSS */
.thumb-overlay1 {
  display: none;
}

/* RE-STYLE .video-meta TO BE THE OVERLAY */
.video-meta1 {
  padding: 40px 16px 16px;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.5) 45%,
      transparent 100%);
}


.video-meta1 h3 {
  font-size: 16px;
  margin: 0 0 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  color: #fff;
}

.video-meta1 p {
  font-size: 13px;
  margin: 0;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Add a fake play button icon via CSS */
.video-meta1::after {
  content: "play_circle";
  font-family: "Material Symbols Rounded";
  position: absolute;
  top: 20px;
  /* Positioned within the gradient area */
  right: 15px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: scale(0.8);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Show Play Button on Hover */
.video-card1:hover .video-meta1::after {
  opacity: 1;
  transform: scale(1);
  color: var(--accent-cyan);
}

/* ================= LIGHTBOX (ANIMATION VIEW) ================= */

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 10, 15, 0.96);
  backdrop-filter: blur(15px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  width: 100%;
  max-width: 500px;
  /* Mobile vertical size */
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 255, 255, 0.2);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 20;
  transition: 0.2s;
}

.lightbox-close:hover {
  background: #ff4d4d;
  border-color: #ff4d4d;
}

.lightbox-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 25px 30px;
  background: linear-gradient(to top, black 10%, transparent);
  pointer-events: none;
}

.lightbox-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}

.lightbox-info p {
  margin: 0;
  font-size: 15px;
  opacity: 0.8;
}

/* ============================================
   NEW ADDITION: LOADING & ERROR STATES
============================================ */

/* 1. The Container for Loader/Error (Injected via JS) */
.video-status-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  /* Black background to hide unloaded poster */
  z-index: 3;
  /* Above video (z:2) but below overlays (z:5) */
  transition: opacity 0.3s ease;
  pointer-events: none;
  /* Allow clicks to pass through to the card */
}

/* Hide layer when video is playing */
.video-loaded .video-status-layer {
  opacity: 0;
}

/* 2. The Loading Spinner (Cyan Tech Look) */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 240, 255, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  /* Hidden by default, shown via JS */
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 3. The Error Message (If video fails) */
.error-msg {
  display: none;
  /* Hidden by default */
  flex-direction: column;
  align-items: center;
  color: #ff4d4d;
  text-align: center;
}

.error-msg .material-symbols-rounded {
  font-size: 32px;
  margin-bottom: 5px;
}

.error-msg span {
  font-size: 11px;
  opacity: 0.8;
  font-family: monospace;
}

/* 4. Active States (Toggled by JS) */
.is-loading .loading-spinner {
  display: block;
}

.is-loading .video-status-layer {
  opacity: 1;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.has-error .error-msg {
  display: flex;
}

.has-error .video-status-layer {
  opacity: 1;
  background: #000;
}

.has-error {
  border: 1px solid rgba(255, 77, 77, 0.4) !important;
}

.thumb-wrapper1 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* LANDSCAPE */
  background: #000;
  overflow: hidden;
  border-radius: 12px;
}

.thumb-wrapper1 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}