/* About Page Specific Styling */

.about-hero {
  width: 100%;
  height: 400px;
  background-image: url('../Images/Image_10.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 0; /* Changed from 40px to 0 to remove the gap */
}

.about-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-hero-overlay h2 {
  color: #fff;
  font-size: 48px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-section {
  padding: 60px 0;
  background-color: #f2e8d5;
}

.about-section.alt {
  background-color: #e8d5c5;
}

.about-container {
  display: flex;
  align-items: center; /* This already centers vertically */
  justify-content: space-between;
  gap: 40px;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  min-width: 0;
}

.about-text p {
  margin-bottom: 20px;
  text-align: justify;
}

.about-text h3 {
  color: #6b4226;
  font-size: 32px;
  margin-bottom: 25px;
  position: relative;
}

.about-text h3:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #800000;
}

.about-slider {
  flex: 0 0 500px;
  min-width: 300px;
  align-self: flex-start; /* Change from center to flex-start */
  margin-top: 80px; /* Add top margin to push it down, aligning with text content */
  margin-bottom: 20px;
}

.about-slider .slider {
  aspect-ratio: 16/9;
  height: auto !important;
  max-height: 350px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.about-slider .slides {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
  position: relative;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
}

.about-slider .slide {
  width: 100%;
  min-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.about-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: #f8f3ea;
}

/* Ensure buttons display correctly */
.about-slider .prev,
.about-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.about-slider .prev {
  left: 10px;
}

.about-slider .next {
  right: 10px;
}

.about-slider .prev:hover,
.about-slider .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.team-section {
  padding: 60px 0;
}

.team-heading {
  text-align: center;
  color: #6b4226;
  font-size: 36px;
  margin-bottom: 40px;
  position: relative;
}

.team-heading:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #800000;
}

.timeline {
  max-width: 800px;
  margin: 50px auto;
  position: relative;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #800000;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  position: relative;
  margin-bottom: 30px;
  width: 50%;
}

.timeline-item:nth-child(even) {
  align-self: flex-end;
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 30px;
  left: 50%;
}

.timeline-content {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  width: 100%;
}

.timeline-content:before {
  content: '';
  position: absolute;
  right: -15px;
  top: 20px;
  width: 15px;
  height: 15px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 15px solid #fff;
}

.timeline-item:nth-child(even) .timeline-content:before {
  left: -15px;
  border-left: none;
  border-right: 15px solid #fff;
}

.timeline-year {
  position: absolute;
  top: 12px;
  right: -90px;
  width: 60px;
  height: 30px;
  background: #800000;
  color: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.timeline-item:nth-child(even) .timeline-year {
  left: -90px;
  right: auto;
}

.timeline-content h3 {
  color: #6b4226;
  margin-bottom: 10px;
}

.cta-section {
  background-color: #800000;
  padding: 60px 20px;
  text-align: center;
  color: #fff;
}

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

.cta-section h3 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #fff;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  color: #f2e8d5;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  padding: 14px 30px;
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.cta-button.primary {
  background-color: #fff;
  color: #800000;
}

.cta-button:hover {
  background-color: #f2e8d5;
  border-color: #f2e8d5;
  color: #800000;
}

.cta-button.primary:hover {
  background-color: transparent;
  color: #fff;
}

/* Responsive styles */
@media (max-width: 992px) {
  .about-container {
    gap: 30px;
  }

  .about-slider {
    flex: 0 0 400px;
  }
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 30px;
  }

  .about-slider {
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    max-height: 220px;
  }

  /* Improve touch interaction on mobile */
  .about-slider .slider {
    touch-action: pan-y pinch-zoom;
  }

  .about-slider .prev,
  .about-slider .next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .about-text h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-text h3 {
    text-align: center;
  }

  .timeline {
    max-width: 100%;
    margin: 30px auto;
    padding: 0 20px;
  }

  .timeline:before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: calc(90% - 40px);
    padding-left: 60px;
    padding-right: 20px;
    left: 0;
    margin-bottom: 20px;
  }

  .timeline-year,
  .timeline-item:nth-child(even) .timeline-year {
    left: 0;
    right: auto;
    top: 12px;
    width: 50px;
    height: 25px;
    font-size: 12px;
  }

  .timeline-content:before {
    display: none;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .timeline-content p {
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .about-hero-overlay h2 {
    font-size: 36px;
    text-align: center;
  }

  .about-text h3 {
    font-size: 28px;
  }

  .team-heading {
    font-size: 28px;
  }

  /* Ensure slider buttons are touch-friendly on small screens */
  .about-slider .prev,
  .about-slider .next {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .about-slider .slider {
    height: 220px;
  }
}
