/**
 * Custom styles for art portfolio
 */

.bg-pattern {
  background-image: url('images/layout/repeating-paper-bg-light.jpg');
  background-repeat: repeat;
  transition: background-image 0.3s ease-in-out;
}

.dark .bg-pattern {
  background-image: url('images/layout/repeating-paper-bg-dark.jpg');
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin: 0.75rem;
  margin-bottom: 2.5rem;
  border-radius: 8px;
  padding: 0.5rem 0;
}

.grid-item:hover {
  transform: scale(1.01);
}

.grid-item img {
  width: 100%;
  display: block;
  border-radius: 6px;
  border: 2px solid #d0d0d0;
  transition: transform 0.3s ease, border-color 0.3s ease;
  object-fit: cover;
}

.dark .grid-item img {
  border-color: #404040;
}

.grid-item:hover img {
  border-color: #b0b0b0;
  transform: translateY(-2px);
}

.dark .grid-item:hover img {
  border-color: #606060;
}

.grid-item img[style*="height: 450px"] {
  width: 100%;
  object-position: center;
}

body {
  padding-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .grid-item:hover {
    transform: none;
  }
  
  .grid-item:hover img {
    border-color: #d0d0d0;
    transform: none;
  }
  
  /* Keep process items specific on mobile */
  .process-item, .process-item:hover {
    margin-bottom: 0;
    transform: none;
  }
  
  .process-item img, .process-item:hover img {
    transform: none;
  }
}

/* Process images row styles */
.process-row {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  width: 100%;
  display: flex;
  overflow-x: auto;
  grid-column: 1 / -1;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: #d0d0d0 transparent; /* For Firefox */
  padding-bottom: 15px; /* Reduced padding for desktop */
}

.dark .process-row {
  scrollbar-color: #404040 transparent;
}

.process-row::-webkit-scrollbar {
  height: 6px;
  margin-top: 10px; /* Add margin to push scrollbar down */
}

.process-row::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
  margin: 6px 0; /* Add vertical margins to the track */
}

.process-row::-webkit-scrollbar-thumb {
  background-color: #d0d0d0;
  border-radius: 3px;
  margin-top: 6px; /* Add top margin to the thumb */
}

.dark .process-row::-webkit-scrollbar-thumb {
  background-color: #404040;
}

.process-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  gap: 6px;
  padding: 0 0 10px 0; /* Reduced bottom padding for desktop */
  width: 100%;
}

.process-item {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: transparent;
  border: none;
  height: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.process-item img {
  height: auto;
  width: auto;
  max-height: 500px;
  max-width: 450px;
  min-width: 350px;
  object-fit: contain;
  background-color: transparent;
  border: 2px solid #d0d0d0;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  transition: border-color 0.3s ease;
  display: block;
}

.process-item:hover img {
  border-color: #b0b0b0;
}

/* Arrow styles between process images */
.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #666;
  padding: 0 10px !important;
  height: 100%;
}

/* Special styling for last process image */
.process-item:last-child {
  margin-left: 30px;
}

@media (max-width: 640px) {
  .process-row {
    padding-bottom: 12px; /* Less padding on mobile */
    display: flex !important; /* Ensure flex display on mobile */
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .process-container {
    gap: 4px;
    padding: 0 0 8px 0; /* Less padding on mobile */
    display: flex !important; /* Ensure flex display on mobile */
    width: 100%;
  }
  
  .process-item {
    width: auto;
    min-width: 180px;
    display: flex !important; /* Ensure flex display on mobile */
  }
  
  .process-item img {
    max-height: 225px; /* Increased from 175px to 225px */
    min-width: auto; /* Remove min-width constraint for mobile */
    max-width: 100%;
    width: auto; /* Allow width to adjust naturally */
    border: none; /* Remove border on mobile */
    object-fit: contain;
    display: block !important; /* Ensure images display on mobile */
  }
  
  .process-arrow {
    padding: 0 8px !important;
    font-size: 28px;
    display: flex !important; /* Ensure arrows display */
  }
  
  .process-item:last-child {
    margin-left: 15px;
  }
}

/* Fix logo and header stretching on mobile */
header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 1rem;
  text-align: center;
  margin-top: 5rem !important;
  /* Let Tailwind handle the default desktop margin-bottom */
}

/* Add more space between header and content on desktop */
header.mb-16 {
  margin-bottom: 4.5rem !important;
}

header img {
  max-width: 100%;
  height: 3rem;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

header div {
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
  margin-top: 0;
  text-align: center;
}

@media (max-width: 768px) {
  header {
    overflow: visible;
    max-height: none;
    padding: 0 0.75rem;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 1.5rem !important;
    /* Don't set margin-bottom here, use the selector below */
  }
  
  /* Add more space between header and gallery on mobile */
  header.mb-16 {
    margin-bottom: 2rem !important;
  }
  
  /* Also adjust space for the first section */
  section:first-of-type {
    margin-top: 1rem !important;
  }
  
  header img {
    height: 1.75rem;
    width: auto;
    object-fit: contain;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
  
  header div {
    width: auto !important;
    white-space: nowrap;
    overflow: visible;
    margin-top: 0;
    text-align: center;
  }
  
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  #featured-grid, #main-grid {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Button container spacing adjustments */
@media (min-width: 769px) {
  /* Button container spacing for desktop */
  #button-container {
    padding-top: 2.5rem !important;
    padding-bottom: 4rem !important;
    margin-bottom: 2rem;
  }
  
  /* Ensure sufficient bottom padding on desktop */
  body {
    padding-bottom: 2rem !important;
  }
} 