.grazing-hero {
  min-height: 70vh;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../media/graze-hero.webp') no-repeat center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fcf9f2;
  position: relative;
  padding: 40px 20px;
}

.grazing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Define the animation */
@keyframes slideInFromTop {
  0% {
    transform: translateY(-100%);
    /* Start off-screen above */
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    /* End at its natural position */
    opacity: 1;
  }
}

.hero-content {
  background: rgba(252, 249, 242, 0.95);
  padding: clamp(20px, 5vw, 40px);
  max-width: 900px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: slideInFromTop 1s ease-out forwards;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.grazing-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: #333;
  line-height: 1.3;
}

.grazing-hero p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.8;
  font-weight: 300;
  text-align: center;
}

.grazing-hero-button {
  background: #fcf9f2;
  color: #333;
  padding: 12px 30px;
  border: 1px solid #333;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* align-self: flex-start; */
  text-decoration: none;
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.grazing-hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #ba9f38;
  transition: left 0.3s ease;
  z-index: -1;
}

.grazing-hero-button:hover::before {
  left: 0;
}

.grazing-hero-button:hover {
  color: #f8f6f3;
  transform: translateY(-2px);
}

.grazing-hero a {
  color: #333;
  text-decoration: none;
}

.grazing-hero a:hover {
  color: #fcf9f2;
  text-decoration: none;
}

.flatlay-grazing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  z-index: 2;
}

.flatlay-section-title {
  font-size: 2.5rem;
  text-align: center;
  color: #2c2c2c;
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: 1px;
}

.flatlay-section-description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: 500px;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: #2c2c2c;
  border: none;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-nav-btn:hover {
  background-color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
  left: 20px;
}

.carousel-nav-btn.next {
  right: 20px;
}

.carousel-wrapper {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y; /* Allow vertical scrolling but handle horizontal swipes */
  height: 100%;
}

.carousel-wrapper:active {
  cursor: grabbing;
}

.carousel-wrapper::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
  background-color: #f5f5f5;
}

/* .carousel-item:hover {
  transform: scale(1.03);
} */

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fills container completely, crops if needed */
  pointer-events: none; /* Prevent image drag on mobile */
  user-select: none; /* Prevent text selection */
  display: block;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.pagination-dot.active {
  background-color: #2c2c2c;
  transform: scale(1.2);
}

.pagination-dot:hover {
  background-color: #999;
}

.graze-usecase-section {
  position: relative;
  padding: 20px 20px;
  text-align: center;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  background: linear-gradient(rgba(0, 0, 0, 0.405), rgba(0, 0, 0, 0.329)), url('../media/grazing-use1.jpeg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.graze-usecase-section h2 {
  font-size: clamp(1.1rem, 4vw, 2.5rem);
  text-align: center;
  color: #fcf9f2;
  font-weight: 400;
  letter-spacing: 1px;
}

.tiered-grazing-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.tiered-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.tiered-description {
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.text-content {
  padding-right: 20px;
}

.main-heading {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 20px;
  font-weight: 400;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  /* Reduced from 20px */
  max-width: 100%;
}

.media-item {
  position: relative;
  overflow: hidden;
  /* max-width: 250px; /* Limit width */
  max-height: 350px;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3/4;
}


.grazing-section {
  padding: clamp(40px, 8vw, 80px) 20px;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 50;
}

.section-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Reverse for alternating layout */
.section-content.reverse {
  direction: rtl;
}

.section-content.reverse>* {
  direction: ltr;
}

.media-container {
  position: relative;
  overflow: visible;
}

.media-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  background: #f5f5f5;
  overflow: hidden;
}

.media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image overlay positioned outside the video */
.image-overlay {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid #fcf9f2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

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

.content {
  padding: 20px;
}

.content h2 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.content p {
  font-size: 1rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.features-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.features-list li {
  font-size: 0.95rem;
  color: #666;
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  line-height: 1.6;
}

.features-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ba9f38;
  font-weight: bold;
  font-size: 1.2rem;
}

.cta-button {
  background: #fcf9f2;
  color: #333;
  padding: 12px 30px;
  border: 1px solid #333;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* align-self: flex-start; */
  text-decoration: none;
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #ba9f38;
  transition: left 0.3s ease;
  z-index: -1;
}

.cta-button:hover::before {
  left: 0;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: black;
  border-radius: 10px;
  overflow: hidden;
}

.modal-video {
  width: 100%;
  height: auto;
  display: block;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.graze-section {
  background-color: #fcf9f2;
  padding: 40px 20px;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.graze-section h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  color: #333;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 5px;
  max-width: 900px;
  margin: 0 auto;
}

.event-item {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #666;
  padding: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Georgia', serif;
}

@media (max-width: 1024px) {
  .tiered-content-wrapper {
    gap: 40px;
  }

  .tiered-grazing-section {
    padding: 50px 30px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .grazing-hero {
    min-height: 60vh;
    background-attachment: scroll;
  }

  .grazing-hero h1 {
    font-size: 1.1rem;
  }

  .grazing-section {
    padding: 40px 20px;
  }

  .section-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-content.reverse {
    direction: ltr;
  }

  .content h2 {
    font-size: 1.8rem;
  }

  .media-wrapper {
    height: 300px;
  }

  .carousel-container {
    height: 300px;
  }

  .tiered-content-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .text-content {
    padding-right: 0;
  }

  .main-heading {
    font-size: 2rem;
  }

  .tiered-description {
    font-size: 1rem;
    text-align: left;
  }

  .tiered-grazing-section {
    padding: 40px 20px;
  }

  .image-overlay {
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    border-width: 6px;
  }

  .graze-section {
    padding: 30px 20px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .event-item {
    padding: 3px;
  }

  .flatlay-section-title {
    font-size: 2rem;
  }

  .flatlay-section-description {
    font-size: 1rem;
    padding: 0 10px;
  }

.carousel-item {
    width: 100%;
    height: 100%;
}

  .carousel-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .carousel-nav-btn.prev {
    left: 10px;
  }

  .carousel-nav-btn.next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .graze-section {
    padding: 40px 15px;
  }

  .grazing-hero h1 {
    font-size: 1.1rem;
  }

  .grazing-hero p {
    font-size: 0.8rem;
  }

  .graze-usecase-section {
    min-height: 150px;
  }

  .graze-section .subtitle {
    margin-bottom: 35px;
  }

  .graze-section h2 {
    margin-bottom: 30px;
  }

  .media-grid {
    display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; /* Reduced from 20px */
  max-width: 100%;
  }

  .main-heading {
    font-size: 1.75rem;
  }

  .tiered-description {
    font-size: 0.95rem;
  }

  .tiered-grazing-section {
    padding: 30px 15px;
  }

  .flatlay-section-title {
    font-size: 1.6rem;
  }

.carousel-item {
    width: 100%;
    height: 100%;
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
  .carousel-container {
    margin: 0 10px; /* Add some margin for easier swiping */
  }
  
  .carousel-wrapper {
    touch-action: pan-y pinch-zoom; /* Allow vertical scroll and pinch zoom */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .carousel-nav-btn {
    display: none; /* Hide navigation buttons on mobile - use swipe instead */
  }
  
  .carousel-nav {
    margin-top: 20px; /* More space for pagination dots */
  }
  
  .pagination-dot {
    width: 12px;
    height: 12px;
    margin: 0 8px; /* Larger touch targets */
  }
}

  .flatlay-grazing-section {
    padding: 40px 10px;
  }

  .carousel-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .carousel-nav-btn.prev {
    left: 5px;
  }

  .carousel-nav-btn.next {
    right: 5px;
  }
}

/* Print styles for better SEO */
@media print {
  .graze-section {
    background-color: white;
  }
}