/* Leadership Cards Styles */
.leadership-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

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

.leadership-card-img {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    min-height: 300px;
}

.leadership-card-img img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    transition: all 0.5s ease;
}

.leadership-card:hover .leadership-card-img img {
    transform: scale(1.05);
}

.leadership-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.leadership-card-content {
    padding: 20px;
    text-align: center;
}

.leadership-card-content h4 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}

.leadership-card-content .designation {
    color: #f1c40f;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.leadership-card-content .leadership-note {
    font-size: 12px;
    opacity: 0.8;
}

/* White Leadership Card Variant for Office Bearers */
.leadership-card-white {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.leadership-card-white:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.leadership-card-white .leadership-card-img {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    min-height: 300px;
}

.leadership-card-white .leadership-card-img img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    transition: all 0.5s ease;
}

.leadership-card-white:hover .leadership-card-img img {
    transform: scale(1.05);
}

.leadership-card-white .leadership-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

.leadership-card-white .leadership-card-content {
    padding: 20px;
    text-align: center;
    color: #333;
}

.leadership-card-white .leadership-card-content h4 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #222;
}

.leadership-card-white .leadership-card-content .designation {
    color: #e67e22;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.leadership-card-white .leadership-card-content .leadership-note {
    font-size: 12px;
    opacity: 0.8;
    color: #555;
}

/* Slideshow Styles */
* {box-sizing: border-box}
.mySlides {display: none}
img {vertical-align: middle;}

/* Slideshow container */
.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
  background-color: #f1f1f1; /* Light background while loading */
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/* Enhanced Slideshow Styles */
.mySlides {
  display: none;
  position: relative;
  min-height: 300px; /* Ensure there's always space for the image */
}

/* Ensure image is visible only when loaded */
.mySlides.loaded img {
  opacity: 1;
}

/* Add a loading indicator */
.slideshow-container::before {
  content: '';
  display: none; /* Hidden by default */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 2s linear infinite;
  z-index: 1;
}

.slideshow-container.loading::before {
  display: block;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Slideshow Caption Styles */
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px;
  text-align: left;
}

.slide-caption h3 {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.slide-caption p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

/* Caption text - hide the old caption as we now have the improved one */
.text {
  display: none;
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
  .prev, .next,.text {font-size: 11px}
}

/* Make sure captions look good on smaller screens */
@media only screen and (max-width: 767px) {
  .slide-caption {
    padding: 10px;
  }
  
  .slide-caption h3 {
    font-size: 18px;
    margin-bottom: 5px;
  }
  
  .slide-caption p {
    font-size: 14px;
  }
}

/* Home page specific styles */
.upcoming-events-sidebar ul {
    list-style: none;
    padding: 5px;
}

.upcoming-events-sidebar li {
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.post-img img {
    height: 300px;
    width: 100%;
    object-fit: cover;
}

.post-info {
    padding: 10px;
    height: 250px;
    position: relative;
}

.post-info .readmore {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.member-image {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.upcoming-events {
    padding: 40px 0;
}

.upcoming-events-header {
    background-color: red;
    text-align: center;
}

.upcoming-events-header strong {
    color: white;
}

@media (max-width: 767px) {
    .leadership-card-img {
        min-height: 220px;
    }
    
    .leadership-card-img img {
        max-height: 220px;
    }
}
