/* ==========================================
   Schmankerl Styles - Instagram/TikTok Style Grid
   ========================================== */

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2rem;
}

.breadcrumb-link {
  color: #089289;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: #066f6a;
}

.breadcrumb-separator {
  color: #ccc;
  font-weight: 300;
}

.breadcrumb-current {
  color: #333;
  font-weight: 600;
}

/* Page Container */
.schmankerl-page {
  padding: 2rem 0 4rem;
}

.schmankerl-page .page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.schmankerl-page .page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.schmankerl-page .subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Example Notice */
.example-notice {
  background: linear-gradient(135deg, #089289 0%, #066f6a 100%);
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 3rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(8, 146, 137, 0.3);
}

.example-notice h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: white;
}

.example-notice p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.btn-challenge {
  display: inline-block;
  background: white;
  color: #089289;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-challenge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Square Grid Layout */
.schmankerl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 1024px) {
  .schmankerl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .schmankerl-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Individual Card */
.schmankerl-card {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
  position: relative;
  background-color: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.schmankerl-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Example Badge */
.example-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 152, 0, 0.95);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Media Container */
.schmankerl-media {
  width: 100%;
  height: 100%;
  position: relative;
}

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

/* Video Play Overlay */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.schmankerl-card:hover .video-overlay {
  opacity: 0;
}

.play-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
  font-size: 1.1rem;
}

/* ==========================================
   Modal/Lightbox Styles
   ========================================== */

.schmankerl-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  z-index: 10000;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 10001;
}

.modal-close:hover {
  opacity: 1;
}

/* Navigation Buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 10001;
}

.modal-nav:hover {
  opacity: 1;
  background: white;
}

.modal-nav.modal-prev {
  left: -4rem;
}

.modal-nav.modal-next {
  right: -4rem;
}

.modal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .modal-nav.modal-prev {
    left: 0.5rem;
  }

  .modal-nav.modal-next {
    right: 0.5rem;
  }
}

/* Modal Body */
.modal-body {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  max-height: 90vh;
}

@media (max-width: 1024px) {
  .modal-body {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }
}

/* Modal Media */
.modal-media {
  aspect-ratio: 1 / 1;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.modal-media img,
.modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Transition animations for switching items */
.modal-media.transitioning img,
.modal-media.transitioning video {
  opacity: 0;
  transform: scale(0.95);
}

@media (max-width: 1024px) {
  .modal-media {
    aspect-ratio: 1 / 1;
    max-height: 60vh;
  }
}

/* Modal Info */
.modal-info {
  padding: 2rem;
  overflow-y: auto;
  max-height: 90vh;
  transition: opacity 0.3s ease;
}

.modal-info.transitioning {
  opacity: 0;
}

@media (max-width: 1024px) {
  .modal-info {
    max-height: none;
  }
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.modal-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 2rem;
}

/* Metadata Section */
.modal-meta {
  border-top: 1px solid #e0e0e0;
  padding-top: 1.5rem;
}

.meta-item {
  margin-bottom: 1.5rem;
}

.meta-item strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.modal-creator {
  font-size: 1rem;
  color: #555;
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Dataset Links */
.modal-datasets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dataset-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
}

.dataset-link:hover {
  color: var(--jupyter-blue);
  background-color: var(--primary-light);
}

.dataset-link svg {
  flex-shrink: 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schmankerl-modal {
  animation: fadeIn 0.2s ease;
}

.modal-content {
  animation: slideUp 0.3s ease;
}
