/* Brand Gallery Modal - Clean White Design */
/* Simplified from React port */

/* Modal Overlay */
.brand-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.brand-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.brand-modal {
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-modal-overlay.active .brand-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.brand-modal-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.brand-modal-brand {
  flex: 1;
  display: flex;
  align-items: center;
}

.brand-modal-logo {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand-modal-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

/* Simple Stats Badge */
.brand-modal-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-modal-count {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--baito-blue, #0066ff);
}

.brand-modal-count-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.125rem;
}

/* Close Button */
.brand-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 10px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brand-modal-close:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Content */
.brand-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  background: #f8f9fa;
}

.brand-modal-content::-webkit-scrollbar {
  width: 6px;
}

.brand-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.brand-modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

/* Projects List */
.brand-modal-projects {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Project Card */
.brand-project-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-project-card:hover {
  border-color: rgba(0, 102, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-project-card.expanded {
  border-color: var(--baito-blue, #0066ff);
}

.brand-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  gap: 1rem;
}

.brand-project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-project-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  margin: 0;
}

.brand-project-card:hover .brand-project-name {
  color: var(--baito-blue, #0066ff);
}

/* Project Meta (Year + Tags) */
.brand-project-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand-project-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  border-radius: 6px;
}

/* Project Type Tags */
.brand-project-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  white-space: nowrap;
}

.brand-project-type.roadshow {
  background: #dbeafe;
  color: #1d4ed8;
}

.brand-project-type.instore {
  background: #dcfce7;
  color: #15803d;
}

.brand-project-type.workshop {
  background: #fef3c7;
  color: #b45309;
}

.brand-project-type.roving {
  background: #f3e8ff;
  color: #7c3aed;
}

.brand-project-type.fmcg {
  background: #ffe4e6;
  color: #be123c;
}

.brand-project-type.event {
  background: #e0e7ff;
  color: #4338ca;
}

.brand-project-type.cny,
.brand-project-type.raya {
  background: #fef9c3;
  color: #a16207;
}

.brand-project-chevron {
  color: #9ca3af;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.brand-project-card.expanded .brand-project-chevron {
  transform: rotate(180deg);
  color: var(--baito-blue, #0066ff);
}

/* Photo Gallery */
.brand-project-gallery {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #f8f9fa;
  padding: 1rem;
  display: none;
}

.brand-project-card.expanded .brand-project-gallery {
  display: block;
}

.brand-project-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

/* Photo Thumbnails - Clean Rectangle Style */
.brand-project-photo {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  background: #e5e7eb;
}

.brand-project-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-project-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder */
.brand-project-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 0.625rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .brand-modal-overlay {
    padding: 1rem;
    align-items: flex-end;
  }

  .brand-modal {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }

  .brand-modal-header {
    padding: 1.25rem 1.5rem;
    gap: 1rem;
  }

  .brand-modal-logo {
    height: 36px;
  }

  .brand-modal-name {
    font-size: 1.125rem;
  }

  .brand-project-photos {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}

@media (max-width: 480px) {
  .brand-modal-count {
    font-size: 1.5rem;
  }

  .brand-project-name {
    font-size: 0.9375rem;
  }

  .brand-project-photos {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}

/* Clickable brand logos in marquee */
.marquee__item.item-partners {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.marquee__item.item-partners:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

/* "View Gallery" hint on hover */
.marquee__item.item-partners::after {
  content: "View Gallery";
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 102, 255, 0.95);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.marquee__item.item-partners:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Stats Items */
.brand-modal-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Year Filters */
.brand-modal-filters {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.75rem 1rem;
  flex-wrap: wrap;
}

.year-filter {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.year-filter:hover {
  border-color: #0066ff;
  color: #0066ff;
}

.year-filter.active {
  background: #0066ff;
  border-color: #0066ff;
  color: #ffffff;
}

/* Photo Count Badge */
.brand-project-photo-count {
  font-size: 0.75rem;
  color: #888;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: 0.5rem;
}

/* Blogpost Sections */
.project-blogpost {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.project-blogpost h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.5rem;
}

.project-blogpost p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 0.75rem;
}

.project-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.service-tag {
  padding: 0.25rem 0.75rem;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: #0066ff;
  text-decoration: none;
  font-weight: 500;
}

.read-more-link:hover {
  text-decoration: underline;
}

.project-blogpost-pending {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.pending-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #888;
}

/* No Photos Message */
.no-photos {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 2rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .brand-modal-overlay,
  .brand-modal,
  .brand-project-card,
  .brand-project-photo {
    transition: none;
  }
}

/* Mobile Responsive Filters */
@media (max-width: 640px) {
  .brand-modal-filters {
    padding: 0 1rem 0.75rem;
  }

  .year-filter {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .brand-modal-stats {
    gap: 1rem;
  }

  .stat-item .brand-modal-count {
    font-size: 1.25rem;
  }
}
