/* Main Styles for Anandam School Website */

/* Base Styles */
:root {
  --primary-color: #2a3890; /* Blue from the logo */
  --secondary-color: #f7941d; /* Orange from the logo */
  --accent-color: #ffd24c; /* Yellow from the logo */
  --primary-dark: #1e2a70; /* Darker blue for hover states */
  --secondary-dark: #e58000; /* Darker orange for hover states */
  --light-bg: #f9f9f9;
  --section-padding: 80px 0;
  --border-radius: 8px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Poppins", "Roboto", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

.btn {
  border-radius: var(--border-radius);
  padding: 10px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.section-padding {
  padding: var(--section-padding);
}

.section-title {
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.section-title h2:after {
  content: "";
  position: absolute;
  width: 70px;
  height: 4px;
  background-color: var(--secondary-color);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-title p {
  color: #666;
  font-size: 18px;
  max-width: 700px;
  margin: 25px auto 0;
}

.section-divider {
  height: 100px;
  background-image: url("/assets/images/wave-divider.svg");
  background-size: cover;
  background-position: center;
  margin-top: -50px;
  margin-bottom: -50px;
  position: relative;
  z-index: 1;
}

.bg-light {
  background-color: #f8f9fa !important;
}

.bg-primary-light {
  background-color: rgba(42, 56, 144, 0.05);
}

.bg-secondary-light {
  background-color: rgba(247, 148, 29, 0.05);
}

.bg-accent-light {
  background-color: rgba(255, 210, 76, 0.2);
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 80px;
  height: 80px;
  position: relative;
}

.spinner:before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  animation: spin 1s linear infinite;
}

.spinner:after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  width: 60px;
  height: 60px;
  top: 10px;
  left: 10px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-left-color: var(--accent-color);
  border-right-color: var(--accent-color);
  animation: spin 0.5s linear infinite reverse;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Header Styles */
.top-bar {
  font-size: 14px;
  background-color: var(--primary-color) !important;
  padding: 10px 0;
}

.top-bar a:hover {
  color: var(--accent-color);
  opacity: 1;
}

header {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #fff;
  padding: 15px 0;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 10px 0;
}

header .navbar-nav .nav-link {
  padding: 10px 15px;
  font-weight: 600;
  color: #333;
  position: relative;
}

header .navbar-nav .nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  background-color: var(--secondary-color);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

header .navbar-nav .nav-link.active,
header .navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

header .navbar-nav .nav-link.active:after,
header .navbar-nav .nav-link:hover:after {
  width: 70%;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  max-height: 70px;
  transition: all 0.3s ease;
}

header.scrolled .logo-container img {
  max-height: 60px;
}

.school-name {
  margin-left: 15px;
}

.school-name h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--primary-color);
}

.school-name p {
  font-size: 14px;
  margin: 0;
  color: var(--secondary-color);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  overflow: hidden;
}

.hero-slider .carousel-item {
  height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slider .carousel-item:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(42, 56, 144, 0.8), rgba(247, 148, 29, 0.8));
}

.hero-slider .carousel-caption {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 15%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-slider .carousel-caption h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  animation: fadeInDown 1s both;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-slider .carousel-caption p {
  font-size: 20px;
  margin-bottom: 30px;
  animation: fadeInUp 1s both 0.3s;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-slider .carousel-caption .btn {
  animation: fadeInUp 1s both 0.6s;
  padding: 12px 30px;
  font-size: 16px;
}

.hero-slider .carousel-indicators {
  bottom: 30px;
}

.hero-slider .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
}

.hero-slider .carousel-indicators button.active {
  background-color: #fff;
  transform: scale(1.2);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.hero-slider:hover .carousel-control-prev,
.hero-slider:hover .carousel-control-next {
  opacity: 1;
}

.hero-slider .carousel-control-prev {
  left: 20px;
}

.hero-slider .carousel-control-next {
  right: 20px;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Features Section */
.features-section {
  position: relative;
  z-index: 2;
  margin-top: -50px;
}

.feature-box {
  text-align: center;
  padding: 40px 30px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  transition: all 0.3s ease;
  height: 100%;
  border-bottom: 5px solid transparent;
}

.feature-box:hover {
  transform: translateY(-15px);
  border-bottom: 5px solid var(--secondary-color);
}

.feature-box i {
  font-size: 56px;
  color: var(--primary-color);
  margin-bottom: 25px;
  display: inline-block;
  transition: all 0.3s ease;
}

.feature-box:hover i {
  color: var(--secondary-color);
  transform: rotateY(180deg);
}

.feature-box h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.feature-box p {
  color: #666;
  margin-bottom: 0;
}

/* About Section */
.about-section {
  position: relative;
  overflow: hidden;
}

.about-section:before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background-color: rgba(255, 210, 76, 0.1);
  border-radius: 50%;
  top: -150px;
  left: -150px;
  z-index: -1;
}

.about-section:after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background-color: rgba(42, 56, 144, 0.05);
  border-radius: 50%;
  bottom: -150px;
  right: -150px;
  z-index: -1;
}

.about-img {
  position: relative;
  z-index: 1;
}

.about-img img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
}

.about-img:hover img {
  transform: scale(1.03);
}

.about-img:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--secondary-color);
  border-radius: var(--border-radius);
  top: 20px;
  left: 20px;
  z-index: -1;
}

.about-content {
  padding: 30px 0 30px 30px;
}

.about-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 15px;
}

.about-content h2:after {
  content: "";
  position: absolute;
  width: 70px;
  height: 4px;
  background-color: var(--secondary-color);
  bottom: 0;
  left: 0;
  border-radius: 2px;
}

.about-content p {
  margin-bottom: 25px;
  color: #666;
}

.about-content .btn {
  margin-top: 10px;
}

/* Gallery Section */
.gallery-section {
  position: relative;
  overflow: hidden;
}

.gallery-scroller {
  margin: 0 -15px;
}

.gallery-carousel .owl-stage-outer {
  padding: 20px 0;
}

.gallery-item {
  margin: 15px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  position: relative;
}

.gallery-item img {
  transition: all 0.5s ease;
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(42, 56, 144, 0.8), rgba(247, 148, 29, 0.4));
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  text-align: center;
  color: #fff;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

.gallery-info h5 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.gallery-info p {
  font-size: 14px;
  margin-bottom: 0;
}

.owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: var(--primary-color) !important;
  font-size: 20px !important;
  line-height: 40px !important;
  text-align: center;
  transition: all 0.3s ease;
}

.owl-nav button:hover {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

.owl-nav button.owl-prev {
  left: -20px;
}

.owl-nav button.owl-next {
  right: -20px;
}

/* News & Testimonials Section */
.news-testimonials-section {
  position: relative;
}

.news-list {
  margin-top: 30px;
}

.news-item {
  margin-bottom: 30px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.news-item:hover {
  transform: translateY(-10px);
}

.news-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.news-content {
  padding: 20px;
}

.news-date {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.news-content h5 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.news-content p {
  color: #666;
  margin-bottom: 15px;
}

.read-more {
  font-weight: 600;
  color: var(--secondary-color);
  display: inline-block;
  transition: all 0.3s ease;
}

.read-more i {
  margin-left: 5px;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: var(--primary-color);
}

.read-more:hover i {
  transform: translateX(5px);
}

.testimonial-carousel {
  margin-top: 30px;
}

.testimonial-item {
  padding: 30px;
}

.testimonial-content {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  position: relative;
}

.testimonial-text {
  position: relative;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.quote-icon {
  font-size: 24px;
  color: var(--secondary-color);
  opacity: 0.3;
  position: absolute;
  top: -10px;
  left: -10px;
}

.testimonial-text p {
  font-style: italic;
  color: #666;
  margin-bottom: 0;
}

.author-img img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
}

.author-info h5 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.author-info p {
  font-size: 14px;
  color: #888;
  margin-bottom: 5px;
}

.rating {
  color: #ffc107;
}

/* Achievers Section */
.achievers-section {
  position: relative;
  overflow: hidden;
}

.achiever-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.achiever-card:hover {
  transform: translateY(-10px);
}

.achiever-img {
  position: relative;
  overflow: hidden;
}

.achiever-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.achiever-card:hover .achiever-img img {
  transform: scale(1.1);
}

.achiever-info {
  padding: 20px;
  text-align: center;
}

.achiever-info h5 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.achievement {
  margin-bottom: 15px;
}

.badge {
  font-size: 14px;
  padding: 5px 10px;
  margin-right: 10px;
}

.class-info {
  font-size: 14px;
  color: #666;
}

.achievement-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 0;
}

/* Call to Action */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/assets/images/pattern.png");
  opacity: 0.1;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  padding: 12px 30px;
  font-size: 16px;
}

/* Footer */
footer {
  background-color: #212529;
  position: relative;
}

footer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

footer h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #fff;
  position: relative;
  padding-bottom: 15px;
}

footer h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 1.5px;
}

footer a {
  color: #ccc;
  display: block;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--secondary-color);
  padding-left: 10px;
}

footer p {
  color: #ccc;
}

footer .social-icons {
  margin-top: 20px;
}

.social-icons a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  color: #fff;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
  padding-left: 0;
}

footer .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  height: 45px;
  color: #fff;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

footer .form-control:focus {
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.2);
}

footer .input-group .btn {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 0 20px;
}

footer hr {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 99;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */
@media (max-width: 1199px) {
  .hero-slider .carousel-item {
    height: 550px;
  }

  .hero-slider .carousel-caption h2 {
    font-size: 42px;
  }
}

@media (max-width: 991px) {
  :root {
    --section-padding: 60px 0;
  }

  .section-title h2 {
    font-size: 32px;
  }

  .hero-slider .carousel-item {
    height: 450px;
  }

  .hero-slider .carousel-caption h2 {
    font-size: 36px;
  }

  .hero-slider .carousel-caption p {
    font-size: 18px;
  }

  .navbar-nav .nav-link {
    padding: 10px;
  }

  .about-content {
    padding: 15px 0 0 0;
    margin-top: 30px;
  }

  .about-img:before {
    display: none;
  }

  .feature-box {
    padding: 30px 20px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding: 50px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section-title p {
    font-size: 16px;
  }

  .hero-slider .carousel-item {
    height: 400px;
  }

  .hero-slider .carousel-caption h2 {
    font-size: 30px;
  }

  .hero-slider .carousel-caption p {
    font-size: 16px;
  }

  .hero-slider .carousel-caption .btn {
    padding: 8px 20px;
    font-size: 14px;
  }

  .about-content h2 {
    font-size: 28px;
  }

  .feature-box {
    margin-bottom: 20px;
  }

  .cta-section h2 {
    font-size: 28px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  .hero-slider .carousel-item {
    height: 350px;
  }

  .hero-slider .carousel-caption {
    padding: 0 10%;
  }

  .hero-slider .carousel-caption h2 {
    font-size: 24px;
  }

  .hero-slider .carousel-caption p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .about-content h2 {
    font-size: 24px;
  }

  .feature-box i {
    font-size: 48px;
  }

  .feature-box h3 {
    font-size: 20px;
  }

  .cta-section h2 {
    font-size: 24px;
  }

  footer h3 {
    font-size: 20px;
  }
}
