/* assets/css/home.css */

/* Overall container for homepage content */
.homepage {
  margin: 0 auto;
  padding: 0;
}

/* Hero Section */
.hero {
  position: relative;
  max-width: 1280px;
  min-height: 65vh; 
  background: url('https://cdn.pixabay.com/photo/2016/01/16/01/00/blue-1142745_1280.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center; 
  justify-content: center; 
  text-align: center;
  color: #fff;
  margin: 0 auto;

}

/* Overlay to darken the background image slightly */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.hero-content {
  position: relative; 
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem; /* Some side padding for smaller screens */
  animation: fadeInUp 1s ease-in-out;
}

/* Adjust the spacing between text elements */
.hero-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  line-height: 1.3;
}

.hero-content p {
  margin-bottom: 1.8rem;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* CTA button styling */
.hero-content .cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #ffd400; 
  color: #003366; 
  font-weight: bold;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

/* Button hover effect */
.hero-content .cta-button:hover {
  background-color: #ffda33;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Simple fade-up animation (optional) */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Mission Statement */
.mission {
  position: relative;
  padding: 3rem 1rem;
  text-align: center;
  overflow: hidden;
  
  /* A soft gradient from a lighter to slightly darker tone */
  background: linear-gradient(
    135deg, 
    #edf2f7 0%,   /* Light grayish-blue (top-left) */
    #cbd5e0 100%  /* Slightly darker tone (bottom-right) */
  );
}

/* Decorative radial highlight */
.mission-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(
    circle at center, 
    rgba(255, 212, 0, 0.25) 0%, 
    transparent 70%
  );
  opacity: 0.2; /* Subtle effect */
}

/* Content Container */
.mission-content {
  position: relative;
  z-index: 2;  /* Above the decorative overlay */
  max-width: 700px;
  margin: 0 auto;
  
  /* Simple fade-in animation */
  opacity: 0; /* Start hidden */
  animation: fadeIn 1s ease-in-out forwards;
}

/* Heading */
.mission-content h2 {
  font-size: 2rem;
  color: #003366; /* Dark blue for brand alignment */
  margin-bottom: 1rem;
}

/* Mission Paragraph */
.mission-content p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #333;
}

/* Fade-in Keyframes */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}


/* ---------------------------------
   BENEFITS / FEATURES SHOWCASE
---------------------------------- */

/* Section Wrapper */
.features {
  /* Subtle background gradient */
  background: linear-gradient(135deg, #f7f9fc 0%, #eef2f7 100%);
  padding: 3rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Section Title */
.features h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #003366; /* Dark blue for brand consistency */
  position: relative;
  z-index: 2;
  /* Optional small fade-in for the heading itself */
  animation: fadeInDown 0.8s ease-in-out forwards;
  opacity: 0;
}

/* Grid Layout */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto; /* center the grid within the section */
  position: relative;
  z-index: 2;
}

/* Card-like Feature Items */
.feature-item {
  background-color: #ffffff;
  padding: 2rem 1rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;                /* for fade-in on load */
  animation: fadeUp 0.8s ease-in-out forwards;
  /* We'll stagger the items with nth-child for a more dynamic entry */
}

/* Title inside each feature card */
.feature-item h3 {
  margin-bottom: 1rem;
  color: #003366;
  font-size: 1.25rem;
  transition: color 0.3s;
}

/* Paragraph */
.feature-item p {
  line-height: 1.5;
  font-size: 1rem;
  color: #555;
}

/* Hover Effect */
.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.feature-item:hover h3 {
  color: #ffd400; /* Light yellow on hover to highlight the feature title */
}

/* Animations: fadeUp for the cards, fadeInDown for the heading */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation for each item (nth-child) */
.features-grid .feature-item:nth-child(1) {
  animation-delay: 0.2s;
}
.features-grid .feature-item:nth-child(2) {
  animation-delay: 0.4s;
}
.features-grid .feature-item:nth-child(3) {
  animation-delay: 0.6s;
}
.features-grid .feature-item:nth-child(4) {
  animation-delay: 0.8s;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .features {
    padding: 2rem 1rem;
  }
  .feature-item {
    padding: 1.5rem;
  }
  .feature-item h3 {
    font-size: 1.15rem;
  }
  .feature-item p {
    font-size: 0.95rem;
  }
}


.quizzes-cta {
  /* A subtle gradient background using your dark blue range */
  background: linear-gradient(
    135deg, 
    #003366 0%, 
    #001f4d 100%
  );
  color: #fff;
  text-align: center;
  padding: 3rem 1rem; /* Larger padding for a bold look */
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}

/* Optional decorative element */
.quizzes-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center, 
    rgba(255, 255, 255, 0.2) 0%, 
    transparent 70%
  );
  opacity: 0.1; 
  transform: rotate(45deg);
}

.quizzes-cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.quizzes-cta p {
  max-width: 700px;
  margin: 0 auto 2rem; 
  font-size: 1.125rem;
  line-height: 1.5;
}

/* CTA Button */
.quizzes-cta .cta-button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background-color: #ffd400; /* Light yellow highlight */
  color: #003366;
  font-weight: bold;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

/* Hover effect */
.quizzes-cta .cta-button:hover {
  background-color: #ffe24c;  /* Slightly lighter yellow */
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* Elementary Course Preview Section */
.elementary-preview {
  position: relative;
  padding: 3rem 1rem;
  text-align: center;
  overflow: hidden; /* so we can animate content within */
  max-width: 1280px;
  margin: 0 auto; /* center this section horizontally if needed */
}

/* Intro text area */
.elem-preview-content {
  margin-bottom: 2rem;
  opacity: 0; /* for animation start */
  animation: fadeDown 1s ease-in-out forwards;
}

.elem-preview-content h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 1rem;
}

.elem-preview-content p {
  color: #555;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Video Grid Layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  opacity: 0; /* start hidden */
  animation: fadeUp 1.2s ease-in-out forwards;
  animation-delay: 0.3s; /* slight delay so the title appears first */
}

/* Each video card */
.video-item {
  position: relative;
  background-color: #fff; /* or keep transparent if you prefer */
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.video-item:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: translateY(0);
}

/* Responsive iframe aspect ratio (16:9) */
.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9; /* modern browsers support this */
  /* Fallback if needed for older browsers */
  height: auto;
  display: block;
}

/* Link to Courses Page */
.elem-preview-footer {
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease-in-out forwards;
  animation-delay: 0.6s; /* appear after videos */
}

.courses-link {
  text-decoration: none;
  font-weight: bold;
  color: #003366;
  padding: 0.5rem 1rem;
  background-color: #ffd400;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.courses-link:hover {
  background-color: #ffdb4c;
}

/* Animations */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 7. Blog Highlights */
.blog-highlights {
  position: relative;
  padding: 3rem 1rem;
  text-align: center;
  overflow: hidden;
  /* Optional subtle gradient background */
  background: linear-gradient(135deg, #f7f9fc 0%, #eef2f7 100%);
}

/* Intro Text */
.blog-highlights-content {
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeDown 1s ease forwards;
}
.blog-highlights-content h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 1rem;
}
.blog-highlights-content p {
  color: #555;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Blog Cards Container */
.blog-cards {
  display: flex;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
  justify-content: center;
  gap: 2rem;
  opacity: 0; /* fade-in animation start */
  animation: fadeUp 1.2s ease forwards;
  animation-delay: 0.3s;
  max-width: 1200px;
  margin: 0 auto;
}

/* Individual Blog Card */
.blog-card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  width: 320px; /* slightly wider than before */
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* keeps button at bottom if text is long */
}
.blog-card h3 {
  margin-bottom: 0.75rem;
  color: #003366;
  font-size: 1.2rem;
}
.blog-card p {
  flex: 1; /* push read-more to the bottom of the card if text is short or long */
  color: #555;
  line-height: 1.5;
}

/* Hover effects */
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Read More Link/Button */
.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #003366;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  background-color: #ffd400;
  border-radius: 4px;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.read-more:hover {
  background-color: #ffdb4c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Footer Link (View All Blogs) */
.blog-highlights-footer {
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.6s;
}
.view-all-blogs {
  text-decoration: none;
  color: #fff;
  background-color: #003366;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.view-all-blogs:hover {
  background-color: #002244; /* Slightly darker shade of blue */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .blog-card {
    width: 100%;
    max-width: 320px;
  }
  .blog-cards {
    gap: 1.5rem;
  }
}


/* Testimonials Section */
.testimonials {
  position: relative;
  padding: 3rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%);
  overflow: hidden;
}

.testimonials h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 2rem;
}

/* Wrapper for all testimonial items */
.testimonial-wrapper {
  max-width: 700px;
  margin: 0 auto;
  position: relative; /* so that testimonial-items can be absolutely positioned within */
  height: 200px; /* approximate height to avoid layout shift. Adjust as needed. */
  /* If you have varying text lengths, you can remove this fixed height 
     or handle with a dynamic approach. */
}

/* Each testimonial "slide" */
.testimonial-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  
  /* Start "hidden": move it slightly to the right and transparent */
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 1s ease, transform 1s ease;
  
  /* You can also do a "fadeDown" or "fadeUp" by changing translateY 
     if you prefer vertical movement. */
}

/* The "active" testimonial is fully visible */
.testimonial-item.active {
  opacity: 1;
  transform: translateX(0);
}

/* Text styling */
.testimonial-text {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 1rem;
  animation: fadeInText 1s ease-in-out;
}

.testimonial-author {
  color: #777;
  font-style: italic;
}

/* A simple text fadeIn if you want an inner element effect */
@keyframes fadeInText {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}


/* 9. Newsletter Sign-Up */
.newsletter-signup {
  background-color: #003366;
  color: #fff;
  padding: 2rem;
  text-align: center;
}
.newsletter-form {
  margin-top: 1rem;
}
.newsletter-form input[type="email"] {
  padding: 0.5rem;
  width: 220px;
  border: none;
  margin-right: 0.5rem;
  border-radius: 4px;
}
.newsletter-form button {
  padding: 0.5rem 1rem;
  background-color: #ffd400;
  color: #003366;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}
.newsletter-form button:hover {
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .testimonial-list {
    grid-template-columns: 1fr;
  }
  .blog-cards {
    flex-direction: column;
    align-items: center;
  }
}
