/* Tackle Baba Social Media Posts Portal - Gallery Styling with Share & Lightbox */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #060913;
  --bg-card: rgba(17, 24, 43, 0.55);
  --bg-card-hover: rgba(23, 33, 58, 0.8);
  --color-primary: #00828a;
  --color-primary-glow: rgba(0, 130, 138, 0.2);
  --color-primary-hover: #00a4ad;
  --color-text-main: #f3f4f6;
  --color-text-muted: #9ca3af;
  --color-border: rgba(0, 130, 138, 0.15);
  --color-border-hover: rgba(0, 130, 138, 0.4);
  --font-main: 'Poppins', sans-serif;
  --font-heading: 'Bricolage Grotesque', sans-serif;
  --shadow-glow: 0 4px 20px rgba(0, 130, 138, 0.1);
  --shadow-hover: 0 10px 30px rgba(0, 130, 138, 0.25);
  --transition-speed: 0.3s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--color-text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 80px;
}

/* Header Section */
.header-wrapper {
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}
.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 48px;
  width: auto;
}

/* Main Container */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Hero Title Section */
.hero-section {
  text-align: center;
  margin-bottom: 50px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 30%, var(--color-primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
}

/* Loading indicators */
.loading-text {
  text-align: center;
  color: var(--color-text-muted);
  padding: 50px 0;
  font-size: 1.1rem;
}

/* ==========================================================================
   DESKTOP STYLE: Grouped rows (AM & PM side by side)
   ========================================================================== */
.desktop-gallery {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin-top: 20px;
}

.day-row {
  display: flex;
  flex-direction: row;
  gap: 40px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 45px;
}
.day-row:last-child {
  border-bottom: none;
}

.day-label-column {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 10px;
}

.day-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary-hover);
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  display: inline-block;
  position: relative;
}
.day-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  margin-top: 6px;
}
.day-subtext {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}
.day-purpose-tag {
  display: inline-block;
  background: var(--color-primary-glow);
  color: var(--color-primary-hover);
  border: 1px solid var(--color-border);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 12px;
  align-self: flex-start;
}

.day-posts-grid {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Card Styles */
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.gallery-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-hover);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #0b0f19;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.gallery-card:hover .card-image-wrap img {
  transform: scale(1.02);
}

.card-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(4, 6, 12, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.card-post-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  margin-right: 15px;
}
.card-post-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary-hover);
  text-transform: uppercase;
  margin-right: 6px;
}

/* Minimal Card actions group */
.card-actions-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Minimal Copy & Share Icon Buttons */
.btn-copy-icon {
  background: transparent;
  border: none;
  color: var(--color-primary-hover);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  outline: none;
}
.btn-copy-icon:hover {
  background: var(--color-primary-glow);
  color: var(--color-text-main);
  transform: scale(1.15);
}
.btn-copy-icon:active {
  transform: scale(0.95);
}

/* ==========================================================================
   MOBILE CAROUSEL STYLE (Visible on Mobile)
   ========================================================================== */
.mobile-carousel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mobile-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  width: 100vw;
  padding: 10px 30px 25px 30px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE */
}
.mobile-carousel-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.peek-animation {
  animation: peekScroll 1.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes peekScroll {
  0% { transform: translateX(0); }
  15% { transform: translateX(-55px); } /* shift left, revealing card on right */
  35% { transform: translateX(10px); }   /* bounce back right */
  55% { transform: translateX(-15px); }  /* small nudge left */
  75% { transform: translateX(3px); }    /* small nudge right */
  100% { transform: translateX(0); }     /* settle at 0 */
}

.mobile-slide-card {
  flex: 0 0 82vw;
  scroll-snap-align: center;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-glow);
  position: relative;
}

.slide-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #0b0f19;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.slide-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(4, 6, 12, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.slide-meta-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  margin-right: 15px;
  min-width: 0;
}

.slide-day-tag {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.0;
}

.slide-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-indicator {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0.5;
}

/* ==========================================================================
   LIGHTBOX PREVIEW MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 10, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 800px;
  background: var(--bg-main);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-media-pane {
  background: #000;
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  min-height: 250px;
  width: 100%;
}

.modal-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0f19;
}

.modal-slide img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  width: auto;
  height: auto;
  display: block;
}

.modal-pagination-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  background: rgba(4, 6, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.pagination-dot {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
}
.pagination-dot:hover {
  background: rgba(255, 255, 255, 0.55);
}
.pagination-dot.active {
  background: var(--color-primary-hover);
  transform: scale(1.25);
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.modal-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: rgba(4, 6, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-meta-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
  margin-right: 20px;
}
.modal-day-tag {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.0;
}
.modal-post-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 12px var(--color-primary-glow);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1010;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--color-border);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 1010;
  transition: all 0.2s ease;
  user-select: none;
  outline: none;
}
.modal-nav-btn:hover {
  background: var(--color-primary-glow);
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
  box-shadow: 0 0 10px var(--color-primary-glow);
}
.modal-nav-btn.prev {
  left: 30px;
}
.modal-nav-btn.next {
  right: 30px;
}

/* Toast Notification System */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #00828a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 130, 138, 0.45);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE SHOW/HIDE RULES
   ========================================================================== */
@media (min-width: 768px) {
  .mobile-carousel-container {
    display: none;
  }
  .desktop-gallery {
    display: flex;
  }
}

@media (max-width: 767px) {
  .desktop-gallery {
    display: none;
  }
  .mobile-carousel-container {
    display: flex;
  }
  .modal-nav-btn {
    display: none;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .main-content {
    padding: 30px 16px;
  }
  .modal-footer-bar {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    padding: 18px 20px;
  }
  .modal-meta-info {
    margin-right: 0;
    text-align: center;
  }
  .modal-actions-row {
    justify-content: center;
  }
  .modal-actions-row .btn {
    flex-grow: 1;
  }
}
