/* Home page specific styles */

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --primary: #1a202c;
  --secondary: #4a5568;
  --accent: #2f855a;
  --light-bg: #f9f9f9;
  --white: #fff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding-top: 80px;
  font-family: 'Source Sans Pro', sans-serif;
  background-color: var(--white);
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
              url('../../images/background/Background.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 6rem 2rem 4rem;
  margin-top: -80px;
  padding-top: 10rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: white;
  border: 2px solid var(--accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: fadeInUp 1s ease-out 0.9s both;
}

.btn:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  margin-left: 1rem;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Gallery Section */
.gallery-section {
  padding: 6rem 2rem;
  background: var(--light-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.artwork-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.artwork-card.animate {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.artwork-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.artwork-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.artwork-info {
  padding: 1.5rem;
}

.artwork-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.artwork-details {
  color: var(--secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.artwork-price {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 1rem 2rem;
    min-height: 90vh;
    background-size: cover;
    background-position: center center;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }

  .btn {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    margin: 0.5rem;
    display: inline-block;
  }

  .gallery-section {
    padding: 4rem 1rem;
  }

  .gallery-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero {
    background: none !important;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
  }

  /* Fixed background using pseudo-element */
  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('../../images/background/Background.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    /* Lock the background size */
    min-height: 667px; /* iPhone SE height */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .hero-content {
    position: relative;
    z-index: 1;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    background-size: cover;
    background-position: center center;
    min-height: 100vh;
  }
}
