* {
  scroll-behavior: smooth;
}

/* ==========================================
   LOADING SCREEN
   ========================================== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
  text-align: center;
  color: white;
}

.paint-brush {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader p {
  font-size: 1.2rem;
  font-weight: 600;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode header {
  background: linear-gradient(to right, #264653, #2a9d8f);
  backdrop-filter: blur(10px);
}

body.dark-mode .gallery-main {
  background: #2a2a2a;
}

body.dark-mode .gallery-wrapper {
  background: #2a2a2a;
}

body.dark-mode .gallery-main h2 {
  background: transparent;
}

body.dark-mode .section {
  background: #2a2a2a;
  z-index: 10;
  position: relative;
}

body.dark-mode .artwork-detail {
  background: linear-gradient(135deg, rgba(38, 70, 83, 0.3) 0%, rgba(42, 157, 143, 0.3) 100%);
}

body.dark-mode .artwork-detail h3 {
  color: #f4a261;
}

body.dark-mode .artwork-text p {
  color: #e0e0e0;
}

body.dark-mode .artwork-text strong {
  color: #f4a261;
}

body.dark-mode .silent-quote {
  color: #d0d0d0;
  background: rgba(244, 162, 97, 0.1);
  border-left-color: rgba(244, 162, 97, 0.4);
}

body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
  color: #f4a261;
}

body.dark-mode .gallery img,
body.dark-mode .artwork-images img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode figcaption {
  color: #d0d0d0;
}

body.dark-mode figcaption strong {
  color: #f4a261;
}

body.dark-mode figcaption em {
  color: #b0b0b0;
}

body.dark-mode .modal {
  background-color: rgba(0, 0, 0, 0.95);
}

body.dark-mode #caption {
  color: #e0e0e0;
}

body.dark-mode footer {
  background: #0a0a0a;
  color: #d0d0d0;
}

body.dark-mode .audio-controls {
  background: rgba(38, 70, 83, 0.5);
}

body.dark-mode .audio-settings label {
  color: #f4a261;
}

body.dark-mode .speed-value {
  color: #f4a261;
}

body.dark-mode .voice-select {
  background: #333;
  color: #e0e0e0;
  border-color: #2a9d8f;
}

body.dark-mode .artwork-info {
  background: rgba(38, 70, 83, 0.4);
  border-left-color: #2a9d8f;
}

body.dark-mode .artwork-info h3 {
  color: #f4a261;
}

body.dark-mode .artwork-specs li {
  color: #d0d0d0;
  border-bottom-color: rgba(244, 162, 97, 0.2);
}

body.dark-mode .artwork-specs strong {
  color: #f4a261;
}

body.dark-mode form input,
body.dark-mode form textarea {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

body.dark-mode form button {
  background: #f4a261;
  color: #1a1a1a;
}

body.dark-mode form button:hover {
  background: #e76f51;
}

body.dark-mode .social-share h3 {
  color: #f4a261;
}

body.dark-mode .dropdown-content {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .dropdown-content a {
  color: #e0e0e0;
}

body.dark-mode .dropdown-content a:hover {
  background: #333;
}

/* Theme Toggle Button */
.theme-toggle {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   ANIMATION CLASSES
   ========================================== */
.section, .artwork-detail, figure {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.animate-in, .artwork-detail.animate-in, figure.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for gallery items */
figure:nth-child(1) { transition-delay: 0.1s; }
figure:nth-child(2) { transition-delay: 0.2s; }
figure:nth-child(3) { transition-delay: 0.3s; }
figure:nth-child(4) { transition-delay: 0.4s; }
figure:nth-child(5) { transition-delay: 0.5s; }
figure:nth-child(6) { transition-delay: 0.6s; }

/* ==========================================
   PARALLAX & VISUAL EFFECTS
   ========================================== */
.hero {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Custom Cursor Effect */
body {
  cursor: default;
}

a, button, .gallery img, .artwork-images img {
  cursor: pointer;
}

/* Tooltip on hover */
figure {
  position: relative;
}

figure::before {
  content: 'Click to view';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
  font-size: 0.9rem;
}

figure:hover::before {
  opacity: 1;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #333;
}

header {
  background: linear-gradient(to right, #f4a261, #e76f51);
  color: #fff8e7;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  flex: 0 0 auto;
}

.brand-link {
  color: #fff8e7;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  display: inline-block;
}

.brand-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
  text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  align-items: center;
  flex: 1 1 auto;
}

nav a, .nav-button {
  color: #fff8e7;
  margin: 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

nav a:hover, .nav-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Dropdown styles for Gallery */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: white;
  color: #333;
  min-width: 220px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 2000;
}

.dropdown-content a {
  display: block;
  padding: 0.6rem 1rem;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background: #f4f4f4;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  display: block;
}

/* Mobile dropdown improvements */
@media (max-width: 768px) {
  header {
    padding: 1rem 1.5rem;
  }
  
  nav {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .nav-brand {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  .brand-link {
    font-size: 1.5rem;
  }
  
  .nav-links {
    flex: 1 1 100%;
    justify-content: center;
    gap: 1rem;
  }
  
  nav a, .nav-button {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .theme-toggle {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }
  
  .dropdown-content {
    min-width: 180px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .dropdown-content a {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
}

.hero {
  position: relative;
  min-height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 1;
  background: linear-gradient(135deg, #264653 0%, #2a9d8f 50%, #e76f51 100%);
  padding: 2rem 0;
  margin-bottom: 0;
}

.hero-header {
  text-align: center;
  padding: 2rem;
  z-index: 10;
  position: relative;
}

.hero img {
  width: 95%;
  max-width: 1600px;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin: 1rem 0 2rem 0;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  text-align: center;
  border-radius: 10px;
  animation: fadeInUp 1s ease-out;
  position: relative;
  z-index: 10;
}

.hero-title {
  font-size: 3rem;
  font-weight: lighter;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  animation: fadeInDown 1.2s ease-out;
}

.hero-tagline {
  font-size: 1.5rem;
  margin-top: 1rem;
  font-style: italic;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1.4s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 20;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: auto;
    padding: 1.5rem 0 3rem 0;
    overflow: visible;
  }
  
  .hero img {
    width: 98%;
    margin: 1rem 0;
  }
  
  .hero-header {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-tagline {
    font-size: 1.2rem;
  }
  
  .section {
    position: relative;
    z-index: 10;
    background: #f9f9f9;
  }

  /* Audio controls mobile adjustments */
  .audio-controls {
    padding: 0.8rem;
  }

  .audio-settings {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .voice-select {
    width: 100%;
  }

  .speed-control {
    width: 100%;
  }

  .listen-btn {
    width: 100%;
    justify-content: center;
  }

  /* Social share buttons mobile */
  .share-btn {
    display: flex;
    width: calc(50% - 1rem);
    justify-content: center;
  }

  /* Slightly larger tap targets on tablets */
  .modal-btn {
    padding: 12px 22px;
    font-size: 18px;
  }
  .close {
    top: 16px;
    right: 24px;
    font-size: 38px;
    padding: 6px;
  }
  #backToTop {
    bottom: 22px;
    right: 22px;
    padding: 14px 16px;
    font-size: 22px;
  }

  /* More compact gallery columns on narrower screens */
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: auto;
    min-height: auto;
    padding: 1.5rem 0;
    overflow: visible;
  }
  
  .hero-content {
    width: 100%;
  }
  
  .hero img {
    border-radius: 6px;
  }
  
  .hero-text-overlay {
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    width: 85%;
    left: 50%;
  }
  
  .hero-title {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }
  
  .hero-tagline {
    font-size: 0.95rem;
    margin-top: 0.5rem;
  }
  
  .hero-header {
    padding: 0.8rem;
  }
  
  .section {
    position: relative;
    z-index: 10;
    background: #f9f9f9;
  }

  /* Single column gallery on small phones */
  .gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Larger tap targets for mobile */
  .modal-btn {
    padding: 14px 24px;
    font-size: 18px;
  }
  .close {
    font-size: 44px;
    right: 18px;
    top: 12px;
  }
  #backToTop {
    bottom: 16px;
    right: 16px;
    padding: 16px;
    font-size: 20px;
  }
}

/* Back to top button */
#backToTop {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #f4a261;
  color: white;
  padding: 12px 15px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 99;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#backToTop:hover {
  background: #e76f51;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#backToTop.show {
  display: block;
}

/* Fade in sections on scroll */
.section {
  opacity: 1;
}

.section.fade-in-animation {
  animation: fadeInSection 0.8s ease-out forwards;
}

@keyframes fadeInSection {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery {
  opacity: 1;
}

.gallery.fade-in-animation {
  animation: fadeInGallery 0.8s ease-out forwards;
}

@keyframes fadeInGallery {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Form success message */
.success-message {
  display: none;
  background: #4caf50;
  color: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 5px;
  animation: slideDown 0.4s ease-out;
}

.success-message.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: auto;
  position: relative;
  z-index: 10;
  background: #f9f9f9;
}

.gallery-main {
  margin-top: 0;
  padding: 0;
  clear: both;
  background: #f9f9f9;
  width: 100%;
  max-width: 100%;
}

.gallery-wrapper {
  background: #f9f9f9;
  padding: 4rem 2rem;
  position: relative;
  z-index: 10;
}

.gallery-main h2 {
  position: relative;
  z-index: 10;
  background: transparent;
  padding: 0 0 3rem 0;
  margin: 0;
  font-size: 2.5rem;
  color: #264653;
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
}

.section h3 {
  color: #264653;
  font-size: 2rem;
  margin: 3rem 0 2rem 0;
  font-weight: 600;
  text-align: center;
  border-bottom: 3px solid rgba(244, 162, 97, 0.4);
  padding-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.section h3:first-of-type {
  margin-top: 1rem;
}

.section h4 {
  color: #264653;
  font-size: 1.4rem;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid rgba(244, 162, 97, 0.2);
  padding-bottom: 0.3rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

figure {
  margin: 0;
  text-align: center;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #555;
  font-style: italic;
  line-height: 1.4;
}

figcaption strong {
  color: #264653;
  font-weight: 600;
  font-style: normal;
  display: block;
  margin-bottom: 0.3rem;
}

figcaption em {
  color: #666;
  font-size: 0.9rem;
}

/* Artwork Detail Section */
.artwork-detail {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.06) 0%, rgba(42, 157, 143, 0.06) 100%);
  padding: 3rem 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  position: relative;
}

/* Audio Controls Container */
.audio-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Listen Button Styles */
.listen-btn {
  background: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
  align-self: flex-start;
}

.listen-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 162, 97, 0.4);
  background: linear-gradient(135deg, #e76f51 0%, #f4a261 100%);
}

.listen-btn.playing {
  background: linear-gradient(135deg, #2a9d8f 0%, #264653 100%);
  animation: pulse 1.5s ease-in-out infinite;
}

.listen-icon {
  font-size: 1.2rem;
  display: inline-block;
}

/* Audio Settings */
.audio-settings {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.audio-settings label {
  font-weight: 600;
  color: #264653;
}

.voice-select {
  padding: 0.4rem 0.8rem;
  border: 2px solid #f4a261;
  border-radius: 5px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
}

.speed-control {
  width: 100px;
  cursor: pointer;
}

.speed-value {
  font-weight: 600;
  color: #264653;
  min-width: 40px;
}

/* Reading Progress Bar */
.reading-progress {
  width: 100%;
  height: 6px;
  background: rgba(38, 70, 83, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f4a261 0%, #e76f51 100%);
  transition: width 0.3s ease;
}

/* Text Highlight During Reading */
.reading-highlight {
  background: rgba(244, 162, 97, 0.2);
  padding: 0.5rem;
  border-radius: 5px;
  transition: background 0.3s ease;
}

/* Image Zoom on Hover */
.gallery img, .artwork-images img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery img:hover, .artwork-images img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 5;
  position: relative;
}

/* Social Share Buttons */
.social-share {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem 0;
}

.social-share h3 {
  color: #264653;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  margin: 0.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  color: white;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-btn.x {
  background: #000000;
}

.share-btn.pinterest {
  background: #e60023;
}

.share-btn.email {
  background: #666;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(42, 157, 143, 0.6);
  }
}

.artwork-detail h2 {
  color: #264653;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.4px;
}

.artwork-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Artwork Information Styles */
.artwork-info {
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #f4a261;
}

.artwork-info h3 {
  color: #264653;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.artwork-specs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.artwork-specs li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(38, 70, 83, 0.1);
  font-size: 0.95rem;
}

.artwork-specs li:last-child {
  border-bottom: none;
}

.artwork-specs strong {
  color: #264653;
  font-weight: 600;
  display: inline-block;
  min-width: 90px;
}

.artwork-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.artwork-images img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
  cursor: pointer;
}

.artwork-images img:hover {
  transform: scale(1.02);
}

.artwork-images .main-figure img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: block;
  cursor: pointer;
}

.artwork-images .main-figure img:hover {
  transform: scale(1.02);
}

.artwork-images .thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.artwork-images .thumbs .thumb-figure {
  width: calc(50% - 0.375rem);
  margin: 0;
}

.artwork-images .thumbs img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.artwork-images .thumbs img:hover {
  transform: translateY(-3px) scale(1.02);
  opacity: 0.98;
}

.artwork-images .thumbs figcaption {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.4rem;
  text-align: center;
}

.artwork-images .thumbs figcaption strong {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.artwork-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.silent-quote {
  font-style: italic;
  color: #6b6b6b;
  margin: 0 0 1rem 0;
  border-left: 4px solid rgba(231,111,81,0.18);
  padding-left: 1rem;
  font-size: 1.05rem;
  background: rgba(255,255,255,0.6);
  border-radius: 4px;
}

.artwork-text p {
  margin-bottom: 1rem;
  text-align: justify;
}

.artwork-text p:first-child {
  font-weight: 600;
  color: #264653;
  margin-bottom: 1rem;
}

.artwork-images figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  font-style: italic;
}

@media (max-width: 900px) {
  .artwork-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .artwork-detail h2 {
    font-size: 1.9rem;
  }

  .artwork-images .thumbs .thumb-figure {
    width: calc(50% - 0.375rem);
  }

  .artwork-text {
    font-size: 1rem;
  }

  .artwork-info {
    padding: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .artwork-info h3 {
    font-size: 1.2rem;
  }

  .artwork-specs li {
    font-size: 0.9rem;
  }
}

form input, form textarea {
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem 0;
  box-sizing: border-box;
}

form button {
  padding: 0.7rem 1.5rem;
  background: #222;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background: #444;
}

footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: clamp(40vh, 70vh, 90vh);
  border-radius: 8px;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0,0,0,0.45);
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  color: #ccc;
}

#caption {
  margin: auto;
  text-align: center;
  color: #ccc;
  padding: 10px;
  font-size: 18px;
  max-width: 80%;
}

.modal-nav {
  text-align: center;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-btn {
  background: #f4a261;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 10px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  transition: background 0.3s ease;
}

.modal-btn:hover {
  background: #e76f51;
}

.modal-counter {
  color: #ccc;
  margin: 10px;
  font-size: 14px;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 3px solid #264653;
  outline-offset: 2px;
}

/* ===============================
Journey section specific layout
=============================== */
#journey .artwork-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

#journey .artwork-text {
  order: 1;
}

#journey .artwork-images {
  order: 2;
}

/* ===============================
Silent Conversation section specific layout
=============================== */
#silent .artwork-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

#silent .artwork-text {
  order: 1;
}

#silent .artwork-images {
  order: 2;
}

/* ===============================
Landscape section specific layout
=============================== */
#landscape .artwork-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

#landscape .artwork-text {
  order: 1;
}

#landscape .artwork-images {
  order: 2;
}

/* ===============================
FIX: The Journey mobile layout
=============================== */
@media (max-width: 900px) {
  #journey .artwork-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  #journey .artwork-text {
    order: 1;
  }
  
  #journey .artwork-images {
    order: 2;
  }

  #silent .artwork-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  #silent .artwork-text {
    order: 1;
  }
  
  #silent .artwork-images {
    order: 2;
  }

  #landscape .artwork-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  #landscape .artwork-text {
    order: 1;
  }
  
  #landscape .artwork-images {
    order: 2;
  }
}

@media (max-width: 600px) {

/* Reduce padding so content fits */
#journey .artwork-detail {
  padding: 1.5rem 1rem;
}

/* Force clean single-column layout */
#journey .artwork-content {
  grid-template-columns: 1fr;
}

/* Center images properly */
#journey .artwork-images {
  display: grid;
  justify-items: center;
  gap: 1rem;
  order: 2;
}

#journey .artwork-images img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

/* Fix text readability */
#journey .artwork-text p {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

#journey .artwork-text {
  order: 1;
}

/* Scale heading */
#journey h2 {
  font-size: 1.6rem;
  line-height: 1.3;
  text-align: center;
}

/* Silent Conversation mobile layout */
#silent .artwork-detail {
  padding: 1.5rem 1rem;
}

#silent .artwork-content {
  grid-template-columns: 1fr;
}

#silent .artwork-images {
  display: grid;
  justify-items: center;
  gap: 1rem;
  order: 2;
}

#silent .artwork-images img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

#silent .artwork-text p {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

#silent .artwork-text {
  order: 1;
}

#silent h2 {
  font-size: 1.6rem;
  line-height: 1.3;
  text-align: center;
}

#landscape .artwork-detail {
  padding: 1.5rem 1rem;
}

#landscape .artwork-content {
  grid-template-columns: 1fr;
}

#landscape .artwork-images {
  display: grid;
  justify-items: center;
  gap: 1rem;
  order: 2;
}

#landscape .artwork-images img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

#landscape .artwork-text p {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

#landscape .artwork-text {
  order: 1;
}

#landscape h3 {
  font-size: 1.6rem;
  line-height: 1.3;
  text-align: center;
}

/* Mobile artwork info adjustments */
.artwork-info {
  padding: 1rem;
  margin-bottom: 1rem;
}

.artwork-info h3 {
  font-size: 1.1rem;
}

.artwork-specs li {
  font-size: 0.85rem;
  padding: 0.3rem 0;
}

.artwork-specs strong {
  min-width: 80px;
  font-size: 0.85rem;
}
}