﻿/* Refined color palette */
:root {
  --primary-color: #2c3e50;
  --accent-color: rgba(76, 175, 80, 0.8); /* Changed to green */
  --gradient-light: rgba(236, 240, 241, 0.95);
  --gradient-white: rgba(255, 255, 255, 0.98);
  --shadow-soft: 0 10px 30px rgba(44, 62, 80, 0.1);
  --shadow-strong: 0 20px 40px rgba(44, 62, 80, 0.15);
  --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Elegant hero section */
.hero2 {
  position: relative;
  padding: 140px 0;
  background: linear-gradient(
    135deg,
    var(--gradient-white),
    var(--gradient-light)
  );
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 60px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.hero2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(76, 175, 80, 0.05),
    /* Changed to green */ rgba(44, 62, 80, 0.05)
  );
  animation: subtleFlow 15s ease-in-out infinite;
}

/* Animated gradient line */
.hero2 .animated-line {
  height: 6px;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  width: 50%;
  transition: width 0.5s ease;
  margin: 0 auto;
  opacity: 1;
  border-radius: 10px;
}

.hero2:hover .animated-line {
  width: 100%;
}

/* Hero text with gradient */
.hero2 h1 {
  font-size: 4rem;
  font-weight: 300;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradient 5s ease-in-out infinite;
}

@keyframes textGradient {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Refined welcome section */
.welcome2 {
  position: relative;
  padding: 3.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 40px;
  box-shadow: 0 20px 40px rgba(44, 62, 80, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  animation: floatGentle 6s ease-in-out infinite;
}

.welcome2 h1 {
  font-size: 4.2rem;
  font-weight: 300;
  color: var(--primary-color);
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  position: relative;
}

.welcome2 h2 {
  font-size: 1.8rem;
  color: var(--accent-color);
  font-weight: 400;
  opacity: 0.9;
}

/* Card design */
.expandable-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.expandable-card {
  width: calc(50% - 35px);
  height: auto; /* Changed from fixed height to auto */
  min-height: 500px; /* Set a minimum height */
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 30px; /* Add some space between cards */
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 0.6s, box-shadow 0.3s;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Changed from space-between to flex-start */
  align-items: center;
  text-align: center;
  overflow-y: auto; /* Allow scrolling if content overflows */
}

.card-front {
  background-color: #ffffff;
  transform: rotateY(0deg);
}

.card-back {
  background-color: rgba(76, 175, 80, 0.1);
  color: #1f1f7a;
  transform: rotateY(180deg);
  overflow-y: hidden; /* Remove scroll */
}

.expandable-card:hover .card-front {
  transform: rotateY(180deg);
}

.expandable-card:hover .card-back {
  transform: rotateY(0deg);
}

.card-front img {
  width: 100px; /* Adjust this value to your preferred size */
  height: 100px; /* Adjust this value to your preferred size */
  object-fit: contain; /* This ensures the image keeps its aspect ratio */
  margin-bottom: 15px; /* Add some space below the image */
}

.card-front h3,
.card-back h3 {
  color: #1f1f7a;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
}

.card-front p,
.card-back p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #003366;
}

.card-front ul,
.card-back ul {
  list-style-type: none;
  padding: 0;
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
}

.card-front li,
.card-back li {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #003366;
  position: relative;
  padding-left: 20px;
  display: inline-block;
  text-align: left;
}

.card-front li::before,
.card-back li::before {
  content: "\2022";
  color: rgba(76, 175, 80, 0.7);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Main container */
main.container {
  background: white;
  border-radius: 40px;
  box-shadow: var(--shadow-soft);
  margin-top: -40px;
  padding: 60px 40px;
  position: relative;
  z-index: 2;
}

/* Animations */
@keyframes floatGentle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(0.5deg);
  }
}

@keyframes subtleFlow {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }
}

/* Grid layout */
@media (min-width: 992px) {
  .col-lg-3 {
    flex: 0 0 auto;
    width: 50%;
    padding: 0 25px;
  }
}

/* Loading animation */
.col-lg-3 {
  opacity: 0;
  transform: translateY(30px);
  animation: elegantFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes elegantFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered entrance */
.col-lg-3:nth-child(1) {
  animation-delay: 0.2s;
}

.col-lg-3:nth-child(2) {
  animation-delay: 0.4s;
}

.col-lg-3:nth-child(3) {
  animation-delay: 0.6s;
}

.col-lg-3:nth-child(4) {
  animation-delay: 0.8s;
}

.col-lg-3:nth-child(5) {
  animation-delay: 1s;
}

.col-lg-3:nth-child(6) {
  animation-delay: 1.2s;
}

.col-lg-3:nth-child(7) {
  animation-delay: 1.4s;
}

.col-lg-3:nth-child(8) {
  animation-delay: 1.6s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card {
    height: 400px;
  }

  .card-img-top {
    height: 300px;
  }

  .welcome2 h1 {
    font-size: 3rem;
  }
}
