/* Hero Section Styles */

/* Fix for Hero Section background images to fill container fully */
.hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center; /* Ensure perfect centering */
  background-repeat: no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed; /* Added parallax effect */
}

/* Specific background positioning for rotunda image */
.hero[style*="rotundanight.jpg"] {
  background-position: 40% 40%;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18, 18, 18, 0.65); /* Slightly lighter for better readability */
  backdrop-filter: blur(3.5px); /* Enhanced blur */
}

.hero .container {
  position: relative;
  z-index: 1;
  margin-top: 2rem; /* Added top margin to better center content with lights */
}

.hero .row {
  min-height: 50vh; /* Ensures vertical centering */
  display: flex;
  align-items: center;
}

/* Hero text - improved centering and better sizing */
.hero-title, 
.hero-subtitle {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.hero-title {
  font-size: 3.2rem; /* Increased size as requested */
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.025em; /* Improved letter spacing */
}

.hero-title,
.hero .display-4 {
  font-family: 'Georgia', serif !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  font-weight: 400;
  font-size: 1.15rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65; /* Better readability */
  color: white !important; /* Ensure hero subtitle is always white */
}

/* Button styling improvements - Make them more visible */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 0.875rem 2rem; /* Slightly larger padding */
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
  letter-spacing: 0.01em; /* Improved letter spacing */
}

.hero-cta .btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white !important;
}

.hero-cta .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: white !important;
  background: rgba(255, 255, 255, 0.1);
}

.hero-cta .btn-primary:hover {
  background-color: var(--bs-primary-hover);
  border-color: var(--bs-primary-hover);
  transform: translateY(-4px); /* Enhanced hover effect */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

.hero-cta .btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: translateY(-4px); /* Enhanced hover effect */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

/* Improved BITS Pilani hero section */
.bits-hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center 30%; /* Changed to 30% vertical positioning */
  background-repeat: no-repeat;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.bits-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18, 18, 18, 0.75); /* Better contrast */
  backdrop-filter: blur(2px); /* Enhanced blur */
}

/* Force white text always with multiple important flags */
.bits-text,
.bits-hero h1,
.bits-hero p,
.bits-hero .lead {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

.bits-hero h1 {
  font-family: 'Georgia', serif !important;
}

/* Extra-strong light theme override */
body.light-theme .bits-text,
body.light-theme .bits-hero h1,
body.light-theme .bits-hero p,
body.light-theme .bits-hero .lead {
  color: #ffffff !important;
}

/* Override Bootstrap's text color utilities */
.bits-hero .text-dark,
.bits-hero .text-black,
.bits-hero [class*="text-"] {
  color: #ffffff !important;
}

/* Custom class to apply directly to elements */
.always-white-text {
  color: #ffffff !important;
}

/* Carousel styles */
.carousel-inner {
  max-height: none;
  overflow: hidden;
}

.carousel-item {
  height: auto;
  background-color: #121212;
}

.carousel-item img {
  object-fit: contain;
  width: 100%;
  max-height: 500px;
}

/* Make gallery carousel arrows white */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background-size: 50%;
  filter: brightness(2); /* Make white */
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .carousel-item img {
    max-height: 450px;
  }
  
  .hero {
    min-height: 90vh;
    background-attachment: scroll; /* Disable parallax on mobile for performance */
  }
  
  /* Adjust background position for mobile */
  .hero[style*="rotundanight.jpg"] {
    background-position: center 35%; /* Better mobile positioning */
  }
  
  .hero .container {
    margin-top: 1rem; /* Reduced margin on mobile */
  }
  
  .bits-hero {
    min-height: 400px;
    background-position: center 25%; /* Adjusted for mobile */
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .carousel-item img {
    max-height: 350px;
  }
  
  .hero {
    min-height: 80vh;
  }
  
  /* Further adjust for smaller screens */
  .hero[style*="rotundanight.jpg"] {
    background-position: center 30%; /* Even better positioning for tablets */
  }
  
  .hero .container {
    margin-top: 0.5rem;
  }
  
  .bits-hero {
    min-height: 350px;
    background-position: center 20%; /* Further adjusted for tablets */
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .carousel-item img {
    max-height: 250px;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  /* Mobile-specific positioning */
  .hero[style*="rotundanight.jpg"] {
    background-position: center 25%; /* Optimal mobile positioning */
  }
  
  .hero .container {
    margin-top: 0;
  }
  
  .bits-hero {
    min-height: 300px;
    background-position: center 15%; /* Optimal mobile positioning */
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
}
