/* Base Styles and Variables */
:root {
  --wood-dark: #5d4037;
  --wood-medium: #8d6e63;
  --wood-light: #d7ccc8;
  --accent-gold: #d4af37;
  --text-dark: #3e2723;
  --text-light: #efebe9;
  --overlay-dark: rgba(62, 39, 35, 0.8);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Roboto Slab', serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--wood-light);
  position: relative;
}

/* Wood Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/wood-grain.png');
  opacity: 0.1;
  pointer-events: none;
  z-index: 1000;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40%;
  height: 3px;
  background-color: var(--accent-gold);
}

.highlight {
  color: var(--wood-dark);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: url('../images/brush-stroke.png') no-repeat;
  background-size: 100% 100%;
}

p {
  margin-bottom: 1.5rem;
}

a {
  text-decoration: none;
  color: var(--wood-dark);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-gold);
}

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

/* Button Styles */
.btn-primary, .btn-secondary, .btn-tertiary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: var(--wood-dark);
  color: var(--text-light);
  border: 2px solid var(--wood-dark);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent-gold);
  transform: translateX(-100%);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn-primary:hover {
  color: var(--text-dark);
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--wood-dark);
  border: 2px solid var(--wood-dark);
}

.btn-secondary:hover {
  background-color: var(--wood-dark);
  color: var(--text-light);
}

.btn-tertiary {
  background-color: var(--accent-gold);
  color: var(--text-dark);
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-tertiary:hover {
  background-color: var(--wood-dark);
  color: var(--text-light);
}

/* Header & Navigation */
header {
  background-color: var(--text-light);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 5%;
  border-bottom: 3px solid var(--wood-medium);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  margin-right: 10px;
}

h1 {
  font-size: 1.7rem;
  color: var(--wood-dark);
}

h1 span {
  color: var(--accent-gold);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 2rem;
}

nav a {
  position: relative;
  font-weight: 500;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--wood-dark);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(93, 64, 55, 0.7), rgba(93, 64, 55, 0.7)), url('../images/hero-workshop.jpg') center/cover no-repeat;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  color: var(--text-light);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--wood-light), transparent);
}

.hero-content {
  z-index: 10;
}

/* Video Background Styles */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-background video,
.video-background .fallback-image {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay to improve text readability */
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* About Section */
.about-section {
  padding: 5rem 0;
}

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

.about-text p {
  font-size: 1.1rem;
}

.about-image img {
  border-radius: 5px;
  box-shadow: var(--shadow);
  transition: transform 0.5s ease;
}

.about-image img:hover {
  transform: scale(1.02);
}

.rounded-img {
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Materials Section */
.materials-section {
  padding: 5rem 0;
  background-color: var(--wood-dark);
  color: var(--text-light);
}

.materials-section h2 {
  color: var(--text-light);
}

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

.material-card {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 5px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.material-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

.material-icon {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.material-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Featured Works Gallery */
.featured-works {
  padding: 5rem 0;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  height: 300px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-overlay h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

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

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.center-button {
  text-align: center;
  margin-top: 3rem;
}

/* Testimonials */
.testimonials {
  padding: 5rem 0;
  background-color: var(--text-light);
  text-align: center;
}

.testimonial-carousel {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial {
  display: none;
  padding: 2rem;
}

.testimonial.active {
  display: block;
  animation: fadeIn 1s ease;
}

.testimonial p {
  font-size: 1.3rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial p::before,
.testimonial p::after {
  content: '"';
  font-size: 2rem;
  color: var(--accent-gold);
}

cite {
  font-style: normal;
  font-weight: 700;
  color: var(--wood-dark);
}

.carousel-nav {
  margin-top: 2rem;
}

.nav-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--wood-medium);
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active,
.nav-dot:hover {
  background-color: var(--accent-gold);
  transform: scale(1.2);
}

/* CTA Section */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(rgba(93, 64, 55, 0.85), rgba(93, 64, 55, 0.85)), url('../images/workshop.jpg') center/cover no-repeat fixed;
  color: var(--text-light);
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

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

/* Footer */
footer {
  background-color: var(--wood-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo h3 {
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-light);
}

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

.footer-contact p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

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

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--accent-gold);
  color: var(--wood-dark);
  transform: translateY(-3px);
}

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

.wood-seal {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border: 1px solid var(--accent-gold);
  font-style: italic;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1.5s ease-in;
}

@keyframes slideInFromLeft {
  from { 
    transform: translateX(-30px);
    opacity: 0;
  }
  to { 
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  from { 
    transform: translateX(30px);
    opacity: 0;
  }
  to { 
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  opacity: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1; /* Image first on smaller screens */
    margin-bottom: 2rem;
  }
  
  .hero h2 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--text-light);
    flex-direction: column;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  nav.active ul {
    display: flex;
  }
  
  nav ul li {
    margin: 0;
  }
  
  nav ul li a {
    display: block;
    padding: 1rem 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* IntersectionObserver Animations */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}