/* =========================================================
   PAKUA GALLERY — Social Media Feed Styles
   ========================================================= */

/* Gallery Hero */
.gallery-hero {
  padding: 4rem 2rem 3rem;
  text-align: center;
  background: linear-gradient(180deg, #f8f5f0 0%, #ffffff 100%);
}

.gallery-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.gallery-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.gallery-hero h1 span {
  color: var(--orange);
  position: relative;
}

.gallery-hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Gallery Tabs */
.gallery-tabs {
  padding: 0 2rem 0rem;
}

.tab-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
  background: var(--cream);
  padding: 0.5rem;
  border-radius: 60px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--line);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 40px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgba(8, 114, 61, 0.05);
}

.tab-btn.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 15px rgba(8, 114, 61, 0.25);
}

.tab-btn.active svg {
  stroke: #fff;
}

/* Gallery Grids */
.gallery-grids {
  padding-top: 1.5rem;
}

.gallery-feed {
  min-height: 400px;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Loader */
.loader {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Gallery Cards */
.gallery-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--line);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--orange);
}

.gallery-card .card-media {
  position: relative;
  background: var(--cream);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .card-media img {
  transform: scale(1.03);
}

.gallery-card .card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* TikTok Embed */
.tiktok-embed-wrapper {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
}

.tiktok-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Card Info */
.gallery-card .card-info {
  padding: 1rem;
}

.gallery-card .card-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card .card-caption {
  font-size: 0.85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.gallery-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.gallery-card .card-author {
  font-weight: 600;
  color: var(--green);
}

.gallery-card .card-link {
  color: var(--orange);
  font-weight: 600;
  transition: color 0.2s ease;
}

.gallery-card .card-link:hover {
  color: var(--green);
}

.gallery-card .card-date {
  font-size: 0.7rem;
}

/* Empty State */
.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Error Message */
.feed-error {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.feed-error p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feed-error .button {
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
}

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

.load-more-container .button {
  padding: 0.75rem 2rem;
  font-size: 0.85rem;
}

/* Footer Social Links */
.footer-social {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--gold);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

/* Mobile */
@media (max-width: 680px) {
  .gallery-hero {
    padding: 3rem 1.5rem 2rem;
  }
  
  .gallery-hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  
  .gallery-hero p {
    font-size: 1rem;
  }

  .tab-container {
    max-width: 100%;
    padding: 0.4rem;
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
  }

  .tab-btn svg {
    width: 16px;
    height: 16px;
  }

  .feed-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-card .card-media {
    aspect-ratio: 16/9;
  }

  .gallery-card .card-info {
    padding: 0.8rem;
  }

  .gallery-card .card-title {
    font-size: 0.85rem;
  }

  .gallery-card .card-caption {
    font-size: 0.8rem;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .feed-error .button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .footer-social {
    gap: 1rem;
  }

  .footer-social a {
    font-size: 0.7rem;
  }
}

/* Small Mobile */
@media (max-width: 420px) {
  .gallery-hero h1 {
    font-size: 1.8rem;
  }

  .tab-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.65rem;
  }

  .tab-btn svg {
    width: 14px;
    height: 14px;
  }

  .gallery-card .card-meta {
    font-size: 0.65rem;
  }
}