/* Reset + Base */
body {
  margin: 0;
  padding: 0;
  font-family: 'Crimson Text', serif;
  /* Enhanced premium background gradient */
  background: linear-gradient(135deg, #fdfaf6 0%, #f8f4ef 100%);
  min-height: 100vh;
}

/* ===== ENHANCED STICKY HEADER FUNCTIONALITY ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  position: relative;
  /* Enhanced with backdrop blur */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 196, 176, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

/* Sticky state - activated by JavaScript */
.header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(212, 196, 176, 0.4);
}

/* Smooth slide-down animation when becoming sticky */
.header.sticky.slide-down {
  transform: translateY(-100%);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
  to {
    transform: translateY(0);
  }
}

/* Add padding to body when header becomes sticky to prevent content jump */
.body-sticky-padding {
  padding-top: 72px; /* Adjust based on your header height */
}

/* Enhanced logo hover in sticky mode */
.header.sticky img[alt="ArtSplatters Logo"]:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Enhanced navigation in sticky mode */
.header.sticky .nav-links a {
  color: #333;
  transition: color 0.3s ease;
}

.header.sticky .nav-links a:hover {
  color: #7b3e19;
}

.header.sticky .nav-links a.current {
  color: #7b3e19;
}

/* Header - Legacy support */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background-color: #fff;
  flex-wrap: wrap;
  /* Enhanced with subtle backdrop blur */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 196, 176, 0.3);
}

.logo a {
  display: inline-block;
}
.logo img {
  height: 48px;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  color: #7b3e19;
  font-weight: bold;
  /* Enhanced navigation hover effects */
  position: relative;
  transition: color 0.3s ease;
}

/* Enhanced navigation underline effect */
.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background: #7b3e19;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav a:hover::after {
  width: 100%;
}

/* Header Icons */
.header-icons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.icon {
  width: 28px;
  height: 28px;
  cursor: pointer;
}

/* Enhanced Featured Artwork */
.featured-artwork {
  display: flex;
  flex-direction: row;
  gap: 60px; /* Enhanced from 40px */
  padding: 80px 40px; /* Enhanced from 40px 24px */
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  margin-bottom: 40px;
}

/* Elegant section divider */
.featured-artwork::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, #d4c4b0, transparent);
}

.featured-left {
  width: 60%;
}
.featured-left img {
  width: 100%;
  height: auto;
  display: block;
  /* Enhanced with premium hover effects */
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-radius: 4px;
}
.featured-right {
  width: 40%;
  max-width: 400px;
}
.art-title {
  font-family: 'Lobster', cursive;
  font-size: 2rem;
  margin: 0;
}
.featured-right h2 {
  font-family: 'Crimson Text', serif;
  font-size: 2.2rem; /* Enhanced from 26px */
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #2c1810;
  margin-top: 0;
  margin-bottom: 20px;
}
.featured-right p {
  margin: 8px 0;
  color: #5a4a3a;
  line-height: 1.6;
}

/* ENHANCED Homepage 4-Block Layout */
.thumbnail-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 60px 40px; /* Enhanced from 24px */
  gap: 40px; /* Enhanced from 16px */
  max-width: 1200px;
  margin: 0 auto;
}

.thumbnail-block {
  width: calc(25% - 40px); /* Adjusted for larger gap */
  text-align: center;
  position: relative;
  margin-bottom: 40px; /* Enhanced spacing */
  /* Premium hover animation */
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

/* Enhanced hover lift effect */
.thumbnail-block:hover {
  transform: translateY(-8px);
}

.thumbnail-block img.thumbnail-image {
  width: 100%;
  height: auto;
  border-radius: 8px; /* Enhanced from 6px */
  display: block;
  margin: 0 auto 20px; /* Enhanced from 10px */
  /* Premium image effects */
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  opacity: 0;
  animation: fadeInImage 0.8s ease forwards;
}

/* Enhanced image hover effects */
.thumbnail-block:hover img.thumbnail-image {
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  transform: scale(1.02);
}

.thumbnail-block h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.3rem; /* Enhanced from 18px */
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #2c1810;
  margin: 20px 0 8px; /* Enhanced spacing */
}

.thumbnail-block p {
  margin: 0;
  font-size: 15px;
  font-family: 'Crimson Text', serif;
  color: #5a4a3a;
  line-height: 1.5;
  /* Subtle text animation */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumbnail-block:hover p {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered loading animations */
.thumbnail-block:nth-child(1) img { animation-delay: 0.1s; }
.thumbnail-block:nth-child(2) img { animation-delay: 0.2s; }
.thumbnail-block:nth-child(3) img { animation-delay: 0.3s; }
.thumbnail-block:nth-child(4) img { animation-delay: 0.4s; }

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

/* Tooltip Icons */
.status-icon,
.inquire-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-top: 10px;
  position: relative;
  cursor: pointer;
}
.status-icon::after,
.inquire-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 10;
}
.status-icon:hover::after,
.inquire-icon:hover::after {
  opacity: 1;
}
.inquire-icon {
  display: none;
  margin-left: 8px;
}
.thumbnail-block:hover .inquire-icon {
  display: inline-block;
}

/* Footer */
footer {
  background-color: #f8f8f8;
  padding: 24px 20px;
  font-size: 15px;
  border-top: 1px solid #ccc;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-icons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}
.footer-logo img {
  max-height: 42px;
}

/* Enhanced Responsive */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav,
  .header-icons {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }

  .featured-artwork {
    flex-direction: column;
    align-items: center;
    padding: 40px 20px; /* Enhanced mobile padding */
    gap: 30px;
  }

  .featured-left {
    width: 100%;
    max-width: 100%;
  }

  .featured-left img {
    width: 100%;
    max-width: 90vw;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .featured-right {
    width: 100%;
    max-width: 90vw;
    text-align: center;
    margin-top: 20px;
  }

  /* Enhanced mobile thumbnail layout */
  .thumbnail-row {
    padding: 40px 20px;
    gap: 30px;
  }

  .thumbnail-block {
    width: calc(50% - 15px); /* Two columns on tablet */
    margin-bottom: 30px;
  }

  /* Single column on small mobile */
  @media (max-width: 480px) {
    .thumbnail-block {
      width: 100%;
    }
  }

  /* Disable transform effects on mobile for performance */
  .thumbnail-block:hover {
    transform: none;
  }

  .thumbnail-block:hover img.thumbnail-image {
    transform: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }

  /* Mobile sticky header adjustments */
  .header.sticky .nav-links {
    top: 100%; /* Position mobile menu below sticky header */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
  }
  
  .body-sticky-padding {
    padding-top: 64px; /* Smaller padding on mobile */
  }
}

/* Mobile Menu Fix */
@media (max-width: 768px) {
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  position: relative;
  z-index: 1000;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 16px 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-top: 1px solid #eee;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .nav-links.active {
    display: flex;
    max-height: 300px;
  }

  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s ease;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    color: #7b3e19;
  }

.menu-toggle {
    display: flex;
    z-index: 1001;
    margin-left: 20px;
  }

  .header-icons {
    gap: 12px;
    z-index: 1001;
  }

  .home-main {
    position: relative;
    z-index: 1;
  }
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 999;
  transition: opacity 0.3s;
}

#backToTop.show {
  display: block;
  opacity: 1;
}

/* Enhanced Hover + Tooltip Effects */
@media (min-width: 768px) {
  .featured-left img:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  }
}

.icon[title] {
  position: relative;
}

.icon[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #5a2a2a;
  color: #fff8f0;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  z-index: 1000;
  opacity: 1;
}

.logo a img:hover {
  opacity: 0.9;
  transition: opacity 0.2s ease-in-out;
}

@media (max-width: 767px) {
  footer img[alt="Logo"] {
    height: 28px !important;
  }
}

/* ===== SCROLL INDICATOR (Optional Enhancement) ===== */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #7b3e19, #d4c4b0);
  z-index: 1001;
  transition: width 0.1s ease;
  opacity: 0;
}

.scroll-indicator.visible {
  opacity: 1;
}