/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --primary-bg: #ffffff;
  --text-color: #1a1a1a;
  --accent-color: #333333;
  --spacing-sm: 10px;
  --spacing-md: 20px;
  --spacing-lg: 40px;
  --spacing-xl: 80px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
}

/* Layout Components */
header {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
}

nav ul {
  display: flex;
  flex-direction: column;
  margin-top: var(--spacing-sm);
}

nav ul li {
  margin-bottom: var(--spacing-sm);
}

main {
  margin-top: 120px;
  padding: var(--spacing-md);
}

.hero {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-xl);
}

.hero-text {
  margin-bottom: var(--spacing-md);
}

.hero-image {
  background-image: url('assets/hero-painting.jpg');
  background-size: cover;
  background-position: center;
  height: 60vh;
  width: 100%;
}

.collections {
  margin-bottom: var(--spacing-lg);
}

.collections ul li {
  margin-bottom: var(--spacing-sm);
}

.philosophy {
  font-style: italic;
  padding: var(--spacing-md) 0;
  max-width: 80%;
}

.statement {
  font-style: italic;
  margin-bottom: var(--spacing-md);
  max-width: 70%;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-md);
  margin-top: var(--spacing-xl);
  border-top: 1px solid #eaeaea;
}

.social {
  display: flex;
  margin-bottom: var(--spacing-md);
}

.social a {
  margin: 0 var(--spacing-sm);
  font-weight: 700;
}

/* Portfolio Page Specific */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.gallery-section {
  position: relative;
  min-height: 100vh;
}

.parallax-container {
  height: 50vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  margin: var(--spacing-lg) 0;
}

.gallery-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.gallery-item img {
  width: 100%;
  transition: transform 0.3s ease;
}

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

/* About Page */
.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.about-image {
  height: 40vh;
  background-size: cover;
  background-position: center;
}

.about-text {
  max-width: 800px;
}

/* Contact Page */
.contact-form {
  margin-top: var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
}

input, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  font-family: inherit;
}

button {
  background-color: var(--text-color);
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #333;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: block;
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: none;
  border: none;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-color);
  transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
  top: 0;
}

.mobile-menu-btn span:nth-child(2) {
  top: 9px;
}

.mobile-menu-btn span:nth-child(3) {
  top: 18px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px;
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 9px;
}

nav {
  display: none;
}

nav.active {
  display: block;
  position: fixed;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  top: 0;
  left: 0;
  z-index: 1000;
  padding-top: 80px;
  text-align: center;
}

nav.active ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

nav.active ul li {
  margin: var(--spacing-md) 0;
  font-size: 1.5rem;
}

/* Navigation active state */
nav a.active {
  font-weight: 700;
  border-bottom: 2px solid var(--text-color);
}

/* Form validation styles */
input.error, textarea.error {
  border-color: #e74c3c;
}

.success-message {
  background-color: #f8f9fa;
  padding: var(--spacing-lg);
  border-radius: 4px;
  text-align: center;
}

.success-message h3 {
  margin-bottom: var(--spacing-md);
}

.reset-btn {
  margin-top: var(--spacing-md);
}

/* Animations and transitions */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.5s ease;
}

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

.gallery-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop Styles */
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
  
  nav {
    display: block;
  }
  
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  nav ul {
    flex-direction: row;
    margin-top: 0;
  }
  
  nav ul li {
    margin-bottom: 0;
    margin-left: var(--spacing-md);
  }
  
  nav a.active {
    border-bottom: 1px solid var(--text-color);
  }
  
  main {
    margin-top: 80px;
    padding: var(--spacing-lg);
  }
  
  .hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .hero-text {
    width: 40%;
    margin-bottom: 0;
  }
  
  .hero-image {
    width: 55%;
    height: 80vh;
  }
  
  h2 {
    font-size: 4rem;
  }
  
  .gallery-items {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-content {
    flex-direction: row;
  }
  
  .about-image {
    width: 40%;
    height: auto;
    min-height: 60vh;
  }
  
  .about-text {
    width: 55%;
  }
  
  .contact-form {
    max-width: 600px;
  }
}

@media (min-width: 1024px) {
  .gallery-items {
    grid-template-columns: repeat(3, 1fr);
  }
  
  h2 {
    font-size: 5rem;
  }
}

/* Critical fix for visibility */
/* Add this to your styles.css file */

/* Ensure gallery sections are visible by default if JavaScript fails */
/* Modify this CSS by adding these lines at the end of your styles.css file */

.gallery-section {
    opacity: 1 !important; /* Override the opacity:0 in your CSS */
    transform: translateY(0) !important; /* Override the transform in your CSS */
  }
  
  /* Only enable animations if JavaScript has successfully loaded */
  .js-loaded .gallery-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .js-loaded .gallery-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Fix for parallax images - make sure they're visible */
  .parallax-container {
    height: 50vh;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: var(--spacing-lg) 0;
    opacity: 1 !important;
  }
  
  /* Optional: Add this debugging style to see element boundaries */
  .debug-mode .gallery-section {
    border: 2px dashed red;
  }
  .debug-mode .parallax-container {
    border: 2px solid blue;
  }
  .debug-mode .gallery-items {
    border: 2px dotted green;
  }