@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Raleway:wght@300;400;600&display=swap');

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

:root {
  --primary-color: #2c3e50;
  --accent-color: #e74c3c;
  --text-color: #34495e;
  --light-bg: #f8f9fa;
}

body {
  font-family: 'Raleway', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #333;
  text-decoration: none;
}

.nav-links a {
  margin-left: 2rem;
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #666;
}

.hamburger {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.5rem;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #333;
  transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links a {
    margin: 0;
    padding: 1rem 0;
    display: block;
  }
}

.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('assets/hero.png') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(transparent, var(--light-bg));
}

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

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  margin-top: 2rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.cta-button:hover {
  transform: translateY(-2px);
}

section {
  padding: 5rem 2rem;
}

.gallery-section,
.about-section,
.contact-section {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.painting {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.painting:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.painting::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.5));
  opacity: 0;
  transition: opacity 0.3s;
}

.painting:hover::after {
  opacity: 1;
}

.image-container {
  position: relative;
  width: 100%;
  height: 250px;
}

.painting img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-nav {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -moz-transform: translateY(-50%);
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  -webkit-transition: background 0.3s;
  -moz-transition: background 0.3s;
  transition: background 0.3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.image-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.image-nav.prev {
  left: 10px;
}

.image-nav.next {
  right: 10px;
}

.image-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
}

.painting.sold {
  position: relative;
}

.sold-banner {
  position: absolute;
  top: 20px;
  right: -30px;
  background: #e74c3c;
  color: white;
  padding: 5px 40px;
  transform: rotate(45deg);
  font-weight: bold;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-crossed {
  text-decoration: line-through;
  color: #999;
}

.dimensions {
  font-size: 0.9em;
  color: #666;
  padding: 0 1rem 1rem;
  margin: 0;
}

.painting h3,
.painting p {
  padding: 1rem;
  margin: 0;
}

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: center;
}

.artist-photo {
  height: 200px;
  width: 100%;
  border-radius: 50%;
}

.artist-bio h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

#contact-form {
  display: grid;
  gap: 1rem;
}

#contact-form input,
#contact-form textarea {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
}

#contact-form textarea {
  height: 150px;
  resize: vertical;
}

#contact-form button {
  padding: 1rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

#contact-form button:hover {
  background: #444;
}

footer {
  background: #333;
  color: white;
  padding: 3rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-content i {
  margin-right: 10px;
  color: var(--accent-color);
}

.footer-content a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-content a:hover {
  color: var(--accent-color);
}

.social-links a {
  color: white;
  text-decoration: none;
  margin-right: 1rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom a {
  color: var(--accent-color);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.modal-image-container {
  position: relative;
  margin-bottom: 1rem;
}

#modal-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 5px;
}

.modal-navigation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.3s;
  z-index: 10;
}

@media (max-width: 768px) {
  .modal-nav {
    padding: 15px 20px;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.7);
  }
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

.modal-image-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
}

.paypal-form {
  margin-top: 1rem;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.pagination button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .artist-photo {
    max-width: 250px;
    margin: 0 auto;
  }

  .artist-bio p {
    text-align: justify;
  }

  .contact-section p {
    text-align: justify;
  }
}