/* ============================================================
   Brenda Portfolio — Stylesheet
   ============================================================ */

body.brenda-modal-open {
  overflow: hidden;
}

.brenda-portfolio-wrap {
  width: 100%;
}

/* --- Category Section --- */
.brenda-category-section {
  margin-bottom: clamp(32px, 8vw, 60px);
}

.brenda-category-title {
  font-family: "Roboto", Sans-serif;
  font-size: clamp(18px, 5vw, 29px);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Swiper Carousel --- */
.brenda-category-section .swiper {
  width: 100%;
  padding-bottom: 48px;
}

/* --- Standard card slide: 300×300 --- */
.brenda-category-section .swiper-slide {
  width: 300px;
}

/* --- Portrait (movie poster) card slide: 472×708 --- */
.brenda-category-section.is-portrait .swiper-slide {
  width: 236px; /* scaled down proportionally for carousel */
}

/* --- Portfolio Card — Standard square 1:1 --- */
.brenda-portfolio-card {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #0d0e1f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* --- Portrait card 2:3 ratio (472×708) --- */
.is-portrait .brenda-portfolio-card {
  aspect-ratio: 2 / 3;
}

.brenda-portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.3);
}

.brenda-portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.brenda-portfolio-card:hover img {
  transform: scale(1.04);
}

.brenda-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 0.9rem;
}

/* --- Card Hover Overlay (hidden — click only) --- */
.brenda-card-overlay {
  display: none;
}

/* --- Swiper Controls --- */
.brenda-category-section .swiper-button-next,
.brenda-category-section .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  top: calc(50% - 24px);
  transition: background 0.2s;
}

.brenda-category-section .swiper-button-next:hover,
.brenda-category-section .swiper-button-prev:hover {
  background: rgba(124, 58, 237, 0.7);
}

.brenda-category-section .swiper-button-next::after,
.brenda-category-section .swiper-button-prev::after {
  font-size: 14px;
  font-weight: 700;
}

.brenda-category-section .swiper-pagination-bullet {
  background: #555;
  opacity: 1;
}

.brenda-category-section .swiper-pagination-bullet-active {
  background: #c084ff;
}

/* ============================================================
   Modal
   ============================================================ */

.brenda-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.brenda-modal.is-open {
  pointer-events: all;
  opacity: 1;
}

.brenda-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 18, 0.45);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

/* Dark space background matching the site theme */
.brenda-modal-container {
  position: relative;
  z-index: 1;
  background: #080c1a;
  background-image:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(124, 58, 237, 0.18) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 100%,
      rgba(79, 70, 229, 0.12) 0%,
      transparent 60%
    );
  border: 1px solid rgba(192, 132, 255, 0.15);
  border-radius: 18px;
  max-width: 820px;
  width: 94%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow:
    0 0 0 1px rgba(192, 132, 255, 0.08),
    0 32px 80px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(124, 58, 237, 0.15);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
}

.brenda-modal.is-open .brenda-modal-container {
  transform: translateY(0) scale(1);
}

.brenda-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  color: #aaa;
  cursor: pointer;
  line-height: 36px;
  text-align: center;
  z-index: 2;
  transition:
    background 0.2s,
    color 0.2s;
  padding: 0;
}

.brenda-modal-close:hover {
  background: rgba(192, 132, 255, 0.2);
  color: #fff;
}

.brenda-modal-content {
  padding: 36px;
}

/* --- Standard layout (image + info side by side) --- */
.brenda-modal-standard {
  display: none;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* --- Video section (full width) --- */
.brenda-modal-video-section {
  display: none;
}

/* ── Standard detail image: 720×405 (16:9) ── */
.brenda-modal-image-wrap {
  flex: 0 0 auto;
  width: 360px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Movie poster detail image: 720×480 (3:2) ── */
.brenda-modal-image-wrap.is-poster {
  width: 300px;
}

.brenda-modal-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

/* --- Modal Info --- */
.brenda-modal-info {
  flex: 1;
  min-width: 200px;
  padding-top: 6px;
}

.brenda-modal-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  line-height: 1.3;
}

/* --- Audio Player --- */
.brenda-modal-audio {
  width: 100%;
  border-radius: 10px;
  outline: none;
  accent-color: #c084ff;
  margin-top: 8px;
  filter: invert(1) hue-rotate(180deg);
  background-color: #fff;
}

.brenda-modal-audio::-webkit-media-controls-panel {
  background: #ffffff;
}

/* --- Writing Link Button --- */
.brenda-modal-link {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 30px;
  background: linear-gradient(135deg, #c084ff, #7c3aed);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition:
    opacity 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(192, 132, 255, 0.35);
}

.brenda-modal-link:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(192, 132, 255, 0.5);
}

/* --- Video section inner spacing --- */
.brenda-modal-video-section .brenda-modal-title {
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.brenda-modal-video-section .brenda-modal-link {
  margin-top: 18px;
  display: inline-block;
}

.brenda-modal-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.brenda-modal-iframe,
.brenda-modal-video-tag {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet — hide swiper arrows (swipe gesture is natural on touch) */
@media (max-width: 768px) {
  .brenda-category-section .swiper-button-next,
  .brenda-category-section .swiper-button-prev {
    display: none;
  }

  .brenda-modal-standard {
    flex-direction: column;
    gap: 20px;
  }

  .brenda-modal-image-wrap,
  .brenda-modal-image-wrap.is-poster {
    width: 100%;
  }

  .brenda-modal-content {
    padding: 22px;
  }

  .brenda-modal-info {
    min-width: 0;
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .brenda-category-section .swiper-slide {
    width: 220px;
  }

  .brenda-category-section.is-portrait .swiper-slide {
    width: 160px;
  }

  .brenda-modal-content {
    padding: 16px;
  }

  .brenda-modal-close {
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    line-height: 32px;
  }

  .brenda-modal-title {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }

  .brenda-video-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .brenda-modal-link {
    padding: 10px 22px;
    font-size: 0.9rem;
  }

  .brenda-modal-container {
    width: 98%;
    border-radius: 12px;
    max-height: 96vh;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .brenda-category-section .swiper-slide {
    width: 180px;
  }

  .brenda-category-section.is-portrait .swiper-slide {
    width: 130px;
  }

  .brenda-modal-content {
    padding: 12px;
  }
}
