/* New Hope Academy - Enhanced Stylesheet */
:root {
  --primary: #6a1b9a;
  --primary-light: #9c27b0;
  --primary-dark: #4a148c;
  --secondary: #e91e63;
  --accent: #ff6b35;
  --header-height: 56px;
  --gradient-primary: linear-gradient(135deg, #6a1b9a, #9c27b0);
  --gradient-secondary: linear-gradient(135deg, #e91e63, #ff6b35);
  --shadow-soft: 0 10px 30px rgba(106,27,154,0.1);
  --shadow-medium: 0 15px 35px rgba(106,27,154,0.15);
  --shadow-strong: 0 20px 40px rgba(106,27,154,0.2);
}

/* Fix horizontal scrolling and add smooth scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  background: linear-gradient(135deg, #faf7fd 0%, #f3e5f5 100%);
  color: #2c2c2c;
  scroll-behavior: smooth;
  line-height: 1.7;
  width: 100%;
  margin: 0;
  padding: 0;
}

.top-header {
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  box-shadow: 0 2px 10px rgba(106,27,154,0.1);
}

.top-header .social-icons a {
  color: #fff;
  margin-left: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
}

.top-header .social-icons a:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 25px rgba(106,27,154,0.1);
  border-bottom: 1px solid rgba(106,27,154,0.05);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar .nav-link {
  font-weight: 500;
  margin: 0 8px;
  padding: 12px 16px !important;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar .nav-link:hover::before {
  width: 80%;
}

.navbar .nav-link.active, .navbar .nav-link:hover {
  color: var(--primary) !important;
  background: rgba(106,27,154,0.05);
  transform: translateY(-2px);
}

.btn-primary, .btn-primary:focus {
  background: var(--gradient-primary);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: var(--gradient-secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--gradient-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.section-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}



.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.feature-icon:hover {
  color: var(--secondary);
  transform: scale(1.1) rotate(5deg);
}

.card {
  border-radius: 1.5rem;
  box-shadow: var(--shadow-soft);
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
}

.footer {
  background: var(--gradient-primary);
  color: #fff;
  padding: 3rem 0 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

.footer a {
  color: rgba(255,255,255,0.9);
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  transform: translateX(5px);
}

.scroll-top {
  position: fixed;
  right: 25px;
  bottom: 35px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
}

.scroll-top:hover {
  background: var(--gradient-secondary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-strong);
}

/* Enhanced carousel styles */
#heroCarousel {
  height: 500px;
  overflow: hidden;
  position: relative;
}

.carousel-inner {
  height: 100%;
}

.carousel-item {
  height: 100%;
  position: relative;
}

.carousel-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(106,27,154,0.4), 
    rgba(156,39,176,0.3), 
    rgba(233,30,99,0.2));
  z-index: 1;
}

.carousel-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: none !important;
  backdrop-filter: none;
  border-radius: 0;
  padding: 2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.carousel-caption h1 {
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.carousel-caption p {
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

.carousel-control-prev,
.carousel-control-next {
  z-index: 3;
  width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 24px 24px;
  width: 48px;
  height: 48px;
  background-color: rgba(106,27,154,0.8);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--primary);
  transform: scale(1.1);
}

.banner {
  background-attachment: scroll;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 100vh;
  min-height: 600px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(106,27,154,0.8), 
    rgba(156,39,176,0.7),
    rgba(233,30,99,0.6));
  z-index: 1;
}

.banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s ease-in-out infinite;
  z-index: 2;
}

.banner h1 {
  position: relative;
  z-index: 3;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  font-weight: 700;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.banner .container,
.banner .display-5 {
  position: relative;
  z-index: 3;
}

.banner .display-5 {
  font-size: 3rem;
  font-weight: 600;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

/* Gallery enhancements */
.gallery-img-consistent {
  transition: all 0.3s ease;
  filter: brightness(0.95);
}

.gallery-img-consistent:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: var(--shadow-medium);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(106,27,154,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

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

/* Feature cards */
.feature-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(106,27,154,0.1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(106,27,154,0.05), transparent);
  transition: left 0.5s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: var(--primary);
}

/* Event cards */
.event-card {
  transition: all 0.4s ease;
  border: none;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-15px) rotate(1deg);
  box-shadow: var(--shadow-strong);
}

.event-card .card-header {
  border-radius: 1.5rem 1.5rem 0 0 !important;
  padding: 1.5rem;
  border: none;
}

/* Floating shapes animation */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: float-shapes 15s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  top: 30%;
  left: 80%;
  animation-delay: 10s;
}

@keyframes float-shapes {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
}

/* Testimonial enhancements */
.testimonial-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(106,27,154,0.1);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.testimonial-card:hover::before {
  transform: scaleX(1);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(106,27,154,0.15);
  border-color: var(--primary);
}

.testimonial-avatar {
  min-width: 40px;
  min-height: 40px;
  font-weight: bold;
  letter-spacing: 1px;
  background: var(--gradient-primary) !important;
  transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
  background: var(--gradient-secondary) !important;
  transform: scale(1.1);
}

/* Welcome section enhancements */
.welcome-image-container {
  position: relative;
}

/* Welcome section enhancements */
.welcome-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.welcome-image-container img {
  transition: all 0.4s ease;
  width: 100%;
  height: auto;
  /* Fallback background in case image fails */
  background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%);
  min-height: 300px;
  object-fit: cover;
}

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

.welcome-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 10px 15px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: float 3s ease-in-out infinite;
}

.welcome-content .section-title::after {
  left: 0;
  transform: none;
}

.welcome-stats {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow-soft);
}

.stat-item h3 {
  margin-bottom: 5px;
  font-size: 2rem;
}

.stat-item {
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

#welcome .img-fluid {
  transition: all 0.4s ease;
  border-radius: 2rem !important;
}

#welcome .img-fluid:hover {
  transform: scale(1.02) rotate(1deg);
  box-shadow: var(--shadow-strong);
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(106,27,154,0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(106,27,154,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(106,27,154,0);
  }
}

.btn-primary.pulse {
  animation: pulse 2s infinite;
}

/* Smooth scrolling enhancements */
html {
  scroll-padding-top: 100px;
}

/* Loading animation for images */
.img-fluid {
  opacity: 0;
  animation: fadeInImage 0.6s ease forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

.banner h1 {
  position: relative;
  z-index: 3;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  font-weight: 700;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
  #heroCarousel {
    height: 350px;
  }
  
  .carousel-caption h1 {
    font-size: 2rem;
  }
  
  .carousel-caption p {
    font-size: 1rem;
  }
  
  .banner {
    height: 100vh;
    min-height: 500px;
    background-attachment: scroll;
    padding: 0;
  }

  .banner h1,
  .banner .display-5 {
    font-size: 2.5rem;
  }

  .banner .display-5 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .feature-card, .event-card {
    margin-bottom: 2rem;
  }
  
  .floating-shapes {
    display: none;
  }
}

/* Director and Principal Message Styles */
.director-photo-container, .principal-photo-container {
  transition: transform 0.3s ease;
  max-width: 100%;
}

.director-photo-container:hover, .principal-photo-container:hover {
  transform: scale(1.05);
}

.director-photo, .principal-photo {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  max-width: 200px;
  margin: 0 auto;
}

.director-photo:hover, .principal-photo:hover {
  transform: rotate(5deg);
}

.director-title, .principal-title {
  transition: all 0.3s ease;
  max-width: 200px;
  margin: 15px auto 0;
}

.director-title:hover, .principal-title:hover {
  transform: translateY(-2px);
}

.message-content {
  position: relative;
  transition: all 0.3s ease;
  max-width: 100%;
  word-wrap: break-word;
}

.message-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.message-content-principal {
  position: relative;
  transition: all 0.3s ease;
  max-width: 100%;
  word-wrap: break-word;
}

.message-content-principal:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

/* Container fixes */
.container, .container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

.row {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.col, .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
  padding-left: 15px;
  padding-right: 15px;
  max-width: 100%;
  word-wrap: break-word;
}

/* Responsive adjustments for director/principal messages */
@media (max-width: 768px) {
  .director-photo, .principal-photo {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px;
  }
  
  .director-title, .principal-title {
    font-size: 14px !important;
    padding: 6px 15px !important;
    max-width: 150px;
  }
  
  .message-content {
    padding: 20px !important;
    margin-top: 20px;
    max-width: 100%;
  }
  
  .card-body {
    padding: 30px 20px !important;
  }
}

@media (max-width: 576px) {
  .director-photo, .principal-photo {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px;
  }
  
  .director-title, .principal-title {
    font-size: 12px !important;
    padding: 5px 12px !important;
    max-width: 120px;
  }
  
  .message-content {
    padding: 15px !important;
    max-width: 100%;
  }
  
  .lead {
    font-size: 1rem !important;
  }
  
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Director and Principal Sections - Professional Style */
.director-section, .principal-section {
  position: relative;
  overflow: hidden;
}

.director-section::before, .principal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.photo-frame {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-frame:hover {
  transform: translateY(-10px);
}

.photo-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.photo-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
}

.photo-frame:hover .photo-container::after {
  opacity: 1;
}

.name-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-frame:hover .name-badge {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.message-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Responsive Design for Director/Principal Sections */
@media (max-width: 768px) {
  .director-section, .principal-section {
    padding: 3rem 0 !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .photo-container {
    width: 200px !important;
    height: 240px !important;
  }
  
  .message-container {
    padding: 25px !important;
    margin-top: 20px;
  }
  
  .lead {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 576px) {
  .photo-container {
    width: 180px !important;
    height: 220px !important;
  }
  
  .message-container {
    padding: 20px !important;
  }
  
  .display-4 {
    font-size: 1.8rem !important;
  }
  
  .name-badge h4 {
    font-size: 18px !important;
  }
}
