/* Hero Section */
.hero-section {
  width: 100%;
  height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide.prev {
  transform: translate(-150%, -50%);
}

.hero-slide.next {
  transform: translate(50%, -50%);
}

.hero-slide-inner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s ease;
}

.hero-slide.active .hero-slide-inner {
  animation: slideZoomIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Variable width slides */
.hero-slide.wide img {
  width: 650px;
  max-width: 70vw;
}

.hero-slide.medium img {
  width: 650px;
  max-width: 70vw;
}

.hero-slide.narrow img {
  width: 600px;
  max-width: 50vw;
}

.hero-arrows {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.hero-arrow {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-dark);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.hero-arrow:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-arrow:active {
  transform: translateY(0);
}

/* Slide indicators */
.hero-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero-indicator {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-indicator.active {
  width: 32px;
  border-radius: 5px;
  background: var(--accent);
}

.hero-indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Content Section */
.content-section {
  padding: 60px 80px;
  max-width: 1600px;
  margin: 0 auto;
}

.section-title {
  font-size: 24px;
  font-weight: 300;
  color: var(--text-dark);
  margin-bottom: 40px;
  letter-spacing: 0.5px;
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 48px;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
}

.gallery-item-inner {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  background: #f5f5f5;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.gallery-item:hover .gallery-item-inner {
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text);
}

.caption-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.caption-year {
  font-size: 13px;
  color: var(--text);
}

/* Footer */
footer {
  padding: 40px 80px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text);
}

/* Gallery Modal/Lightbox */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  padding: 20px;
  overflow: auto;
}

.gallery-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content-wrapper {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
  max-height: 90vh;
}

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

.modal-image-container {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  min-height: 500px;
}

.modal-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.modal-info-container {
  padding: 60px 40px;
  overflow-y: auto;
  background: white;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent);
  color: white;
  transform: rotate(90deg);
}

.modal-artwork-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.modal-artwork-year {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #000000, #2a2a2a);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 24px;
}

.modal-artwork-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}

.modal-artwork-details {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.modal-detail-item {
  margin-bottom: 16px;
}

.modal-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modal-detail-value {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: 500;
}

/* Gallery Navigation in Modal */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 5;
}

.modal-nav-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  pointer-events: all;
  box-shadow: var(--shadow-md);
}

.modal-nav-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.modal-nav-btn:active {
  transform: scale(0.95);
}

/* Responsive Modal */
@media (max-width: 768px) {
  /* Mobile hero section adjustments */
  .hero-section {
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Hide hero arrows on mobile */
  .hero-arrows {
    display: none;
  }
  
  /* Center images on mobile */
  .hero-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
  }
  
  .hero-slide img {
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
  }
  
  /* Ensure proper centering for different image sizes */
  .hero-slide-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }
  
  /* Ensure hero slider container is properly centered */
  .hero-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
  }
  
  /* Touch-friendly indicators on mobile */
  .hero-indicators {
    bottom: 20px;
    gap: 8px;
  }
  
  .hero-indicator {
    width: 12px;
    height: 12px;
  }
  
  /* Adjust slide positioning for mobile */
  .hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transform: translate(-50%, -50%);
  }
  
  .hero-slide.prev {
    transform: translate(-150%, -50%);
    opacity: 0;
    visibility: hidden;
  }
  
  .hero-slide.next {
    transform: translate(50%, -50%);
    opacity: 0;
    visibility: hidden;
  }
  
  .modal-content-wrapper {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }
  
  .modal-image-container {
    padding: 40px 20px;
    min-height: 300px;
  }
  
  .modal-image-container img {
    max-height: 50vh;
  }
  
  .modal-info-container {
    padding: 30px 20px;
  }
  
  .modal-artwork-title {
    font-size: 24px;
  }
  
  .modal-nav-btn {
    width: 40px;
    height: 40px;
  }
}

/* Additional mobile centering for smaller screens */
@media (max-width: 480px) {
  .hero-slide {
    padding: 10px;
  }
  
  .hero-slide img {
    max-width: 95vw;
    max-height: 75vh;
  }
  
  .hero-indicators {
    bottom: 15px;
  }
  
  .hero-indicator {
    width: 10px;
    height: 10px;
  }
  
  /* Show gallery images on mobile with mobile-optimized layout */
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 0 20px;
  }
  
  /* Mobile gallery item styling */
  .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
  }
  
  .gallery-item:active {
    transform: scale(0.98);
  }
  
  .gallery-item-inner {
    padding-bottom: 100%; /* Square aspect ratio */
    position: relative;
  }
  
  .gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .gallery-caption {
    padding: 8px 12px;
    background: white;
    font-size: 12px;
  }
  
  .caption-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
  }
  
  .caption-year {
    font-size: 11px;
    color: #666;
  }
  
  /* Mobile gallery modal adjustments */
  .gallery-modal {
    padding: 10px;
  }
  
  .modal-content-wrapper {
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
  }
  
  .modal-image-container {
    padding: 20px;
    min-height: 200px;
  }
  
  .modal-image-container img {
    max-height: 40vh;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  .modal-info-container {
    padding: 20px;
  }
  
  .modal-artwork-title {
    font-size: 20px;
    margin-bottom: 8px;
  }
  
  .modal-artwork-description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  
  .modal-artwork-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .modal-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
  }
  
  .modal-detail-label {
    font-weight: 600;
    font-size: 12px;
    color: #666;
  }
  
  .modal-detail-value {
    font-size: 12px;
    text-align: right;
  }
  
  .content-section {
    padding: 20px 0;
  }
  
  .section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  /* Fix mobile layout and scrolling */
  .main-layout {
    flex-direction: column;
  }
  
  .left-sidebar {
    display: none;
  }
  
  .main-content {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* Ensure proper mobile scrolling */
  body {
    overflow-x: hidden;
  }
  
  .hero-section {
    overflow: hidden;
  }
  
  /* RTL mobile fixes */
  [dir='rtl'] .hero-section {
    direction: ltr; /* Keep hero section LTR for proper image display */
  }
  
  [dir='rtl'] .hero-slide {
    direction: ltr;
  }
  
  [dir='rtl'] .hero-slide img {
    direction: ltr;
  }
  
  /* Ensure proper RTL text alignment without layout changes */
  [dir='rtl'] .section-title {
    text-align: center;
  }
  
  [dir='rtl'] .content-section {
    direction: rtl;
  }
}

/* Additional mobile optimizations for smaller screens */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 0 15px;
  }
  
  .gallery-item {
    border-radius: 6px;
  }
  
  .gallery-caption {
    padding: 6px 8px;
  }
  
  .caption-title {
    font-size: 12px;
  }
  
  .caption-year {
    font-size: 10px;
  }
  
  .section-title {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .content-section {
    padding: 15px 0;
  }
  .scrollable-images {
  display: flex;
  flex-direction: row;
  direction: ltr;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
}

.scrollable-images img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  scroll-snap-align: start;
}
}

