/* Styles for templates/base.html (moved out of the template) */
  .wood-texture-header {
    background-image: linear-gradient(to bottom, 
      rgba(124, 79, 57, 0.85), 
      rgba(45, 33, 28, 0.9)),
      url('/media/random/IMG_8981.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
  }
  html, body {
  overscroll-behavior: none; /* Prevents overscrolling/bouncing */
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Optimize images to use hardware acceleration */
img {
    will-change: transform;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .blog-card:hover .blog-image {
        transform: none;
    }
    
    .book-item:hover .book-cover,
    .welcome-image-frame:hover,
    .gallery-item:hover {
        transform: none;
    }
}


.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(184, 92, 60, 0.98), rgba(201, 149, 78, 0.98));
  backdrop-filter: blur(10px);
  border-top: 3px solid var(--accent-warm);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
  color: white;
}

.cookie-consent-text h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color:rgba(28, 11, 11, 0.2);
}

.cookie-consent-text p {
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.cookie-details {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.75rem;
}

.cookie-consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.cookie-btn.accept-all {
  background-color: white;
  color: var(--accent-warm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-btn.accept-all:hover {
  background-color: #f8f8f8;
  transform: translateY(-2px);
}

.cookie-btn.necessary-only {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.cookie-btn.necessary-only:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.cookie-btn.settings {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn.settings:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  backdrop-filter: blur(5px);
}

.cookie-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  margin: 0;
  color: var(--accent-warm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-modal:hover {
  background-color: #f0f0f0;
  color: #333;
}

.cookie-modal-body {
  padding: 1.5rem;
}

.cookie-category {
  margin-bottom: 2rem;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
  margin: 0;
  color: #333;
  font-size: 1.1rem;
}

.cookie-category-header input[type="checkbox"] {
  transform: scale(1.2);
}

.cookie-category p {
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}

/* Mobile responsive for cookie modals */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .cookie-consent-actions {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
  
  .cookie-modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding: 1rem;
  }
}


.supercategory-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Row 1 - Cards 1-4 */
.dropdown:hover .supercategory-item:nth-child(1) {
  animation: slideInUp 0.4s 0.1s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(2) {
  animation: slideInUp 0.4s 0.15s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(3) {
  animation: slideInUp 0.4s 0.2s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(4) {
  animation: slideInUp 0.4s 0.25s ease forwards;
}

/* Row 2 - Cards 5-8 */
.dropdown:hover .supercategory-item:nth-child(5) {
  animation: slideInUp 0.4s 0.3s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(6) {
  animation: slideInUp 0.4s 0.35s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(7) {
  animation: slideInUp 0.4s 0.4s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(8) {
  animation: slideInUp 0.4s 0.45s ease forwards;
}

/* Row 3 - Cards 9-12 */
.dropdown:hover .supercategory-item:nth-child(9) {
  animation: slideInUp 0.4s 0.5s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(10) {
  animation: slideInUp 0.4s 0.55s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(11) {
  animation: slideInUp 0.4s 0.6s ease forwards;
}
.dropdown:hover .supercategory-item:nth-child(12) {
  animation: slideInUp 0.4s 0.65s ease forwards;
}

/* If you have the "All Categories" card that might be #13 */
.dropdown:hover .supercategory-item:nth-child(13) {
  animation: slideInUp 0.4s 0.7s ease forwards;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Also improve the main dropdown timing */
.dropdown-content {
  transition: 
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
    opacity 0.25s ease,
    visibility 0.25s;
}
