:root {
  --primary-color: rgb(94, 0, 66);
  --primary-light: rgba(94, 0, 66, 0.95);
  --primary-dark: rgb(74, 0, 46);
  --accent-color: #f8d774;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #ffffff;
  --background-dark: #f5f5f7;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body, html {
  margin: 0;
  padding: 0;
  font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--background-light);
  color: var(--text-dark);
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  margin: 0 auto;
  padding: 60px 0;
}

header.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffeba7;
  background: url('images/header-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

header.hero:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, 
    rgba(94, 0, 66, 0.99) 100%, 
    rgba(94, 0, 66, 0.99) 100%, 
    rgba(94, 0, 66, 0.99) 100%);
  z-index: 1;
}

/* Hero content styling for logo */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  margin-bottom: 20px;
}

.hero-logo img {
  max-width: 450px;
  width: 80%;
  height: auto;
  /* filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)); */
}

.hero-content h1 {
  font-size: 4rem;
  margin: 0;
}
.hero-content p {
  font-size: 1.5rem;
  margin: 10px 0;
}

/* Parallax sections for elegance */
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Alternate background for parallax sections */
section.parallax {
  /* Keep existing parallax background but add overlay for purple tint harmony */
  position: relative;
  color: #fff;
}

section.parallax:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(94, 0, 66, 0.7);
  z-index: -1;
}

/* Section styling */
section {
  padding: 80px 0;
  text-align: center;
  position: relative;
  background-color: var(--background-light);
  color: var(--text-dark);
}

section:nth-child(even):not(.parallax) {
  background-color: var(--background-dark);
}

section:not(.parallax):before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent white */
  z-index: -1;
}

section:not(.parallax) {
  color: #333; /* Dark text on light semi-transparent backgrounds */
}

/* Article boxes */
#segments article {
  margin: 30px 0;
  padding: 20px;
  border-bottom: 1px solid #ddd;
}

/* Mermaid diagram styling */
.mermaid {
  margin: 40px 0;
  text-align: left;
}

/* Navigation - updated for full-height logo */
.main-nav {
  position: fixed;
  width: 100%;
  z-index: 1000;
  background-color: var(--primary-color);
  box-shadow: var(--shadow);
  height: 90px; /* Set explicit height for nav */
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  height: 100%;
}

.logo {
  height: 100%;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100%; /* Make logo height 100% of nav height */
  width: auto;
  padding: 0;
  max-height: 150px; /* Match nav height */
  object-fit: contain;
}

.logo .mobile-logo {
  display: none;
}

.logo .desktop-logo {
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 4px;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-color) !important;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background-color: #fff;
}

/* Hero modifications */
.hero {
  position: relative;
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-down a {
  color: white;
  font-size: 2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Grid layouts */
.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.segment-card {
  background-color: var(--background-light);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
}

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

.segment-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.about-section {
  position: relative;
  width: 100%;
}

.about-image-container {
  width: 100%;
  position: relative;
}

.about-image {
  width: 100%;
  height: 76vh;
  display: block;
  object-fit: cover;
}

.about-content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 40px;
  padding-top: 0px;
  padding-right: 0;
  box-sizing: border-box;
}

.about-title {
  font-weight: bold;
  color: rgb(94, 0, 66);
  margin: 0;
  margin-left: 3vw;
  font-size: 2.2rem;
}

.about-title-small {
  font-weight: bold;
  color: rgb(94, 0, 66);
  margin: 0;
  display: none;
  font-size: 2.2rem;
}

.about-content {
  width: 40%;
  background: rgba(94, 0, 66, 0.707);
  color: #fff;
  padding: 20px;
  line-height: 1.6;
  font-size: 16px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: justify;
  text-align-last: left;
}

@media (max-width: 768px) {
  .about-content-wrapper {
    position: static;
    display: flex;
    flex-direction: column;
    padding-right: 40px;
    padding-left: 0;
    padding-top: 0;
    align-items: flex-start;
  }

  .about-title-small {
    display: block;
    text-align: left;
  }

  .about-image {
    height: auto;
  }

  .about-title {
    margin-bottom: 20px;
    text-align: left;
    display: none;
  }

  .about-content {
    width: 100%;
    max-height: none;
    overflow-y: visible;
  }
}

.feature-card {
  background-color: var(--background-light);
  color: var(--text-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.feature-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.feature-card h3 {
  margin: 15px 0;
  padding: 0 15px;
  padding-bottom: 1vw;
}

.feature-card p {
  text-align: left;
  padding-left: 2vw;
  padding-bottom: 5px;
}

.ck-icon {
  padding-right: 1vw;
}

/* Side by side layout */
.side-by-side {
  display: flex;
  align-items: center;
  gap: 50px;
}

.side-by-side.reverse {
  flex-direction: row-reverse;
}

.text-content, .image-content {
  flex: 1;
}

.image-content img {
  width: 60%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Testimonials */
.testimonial-slider {
  margin-top: 40px;
}

.testimonial {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.testimonial img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
}

blockquote {
  font-style: italic;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.6;
}

cite {
  display: block;
  margin-top: 20px;
  font-weight: 500;
  font-style: normal;
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.form-placeholder img {
  width: 100%;
  border-radius: 10px;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 60px 0 20px;
}

footer a {
  color: var(--text-light);
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

footer a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

.footer-logo img {
  height: 150px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  display: block;
  margin: 10px 0;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--accent-color);
  color: var(--primary-color);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

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

.button.outline {
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.copyright {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .side-by-side {
    flex-direction: column;
  }
  
  .side-by-side.reverse {
    flex-direction: column;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .logo img {
    max-height: 70px; /* Match nav height */
    object-fit: contain;
  }

  .logo .mobile-logo {
    display: block;
  }

  .logo .desktop-logo {
    display: none;
  }

  .footer-logo img {
    height: 40px;
  }
}

.features-grid .feature-card:nth-child(4) { transition-delay: 0.4s; }

/* Fix for AI Proctoring section text readability */
#ai-proctoring {  position: relative;  color: var(--text-light);}
#ai-proctoring:before {  content: '';  position: absolute;  top: 0;  left: 0;  width: 100%;  height: 100%;  background-color: var(--primary-color);  opacity: 0.85;  z-index: 0;}
#ai-proctoring .container {  position: relative;  z-index: 1;}
#ai-proctoring h2 {  color: var(--accent-color);  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}
#ai-proctoring p {  color: var(--text-light);  font-size: 1.1rem;  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);}
#ai-proctoring .image-content img {  border: 3px solid var(--text-light);}

/* Fix for features section text readability */
#features {  position: relative;  color: var(--text-light);}
#features:before {  content: '';  position: absolute;  top: 0;  left: 0;  width: 100%;  height: 100%;  background-color: var(--primary-color);  opacity: 0.85;  z-index: 0;}
#features .container {  position: relative;  z-index: 1;}
#features h2 {  color: var(--accent-color);  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);  font-size: 2.2rem;  margin-bottom: 30px;}
#features .feature-card {  background-color: rgba(255, 255, 255, 0.95);  border: 2px solid var(--accent-color);}

/* Parallax sections */
.hero.parallax,
#features.parallax,
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Improved parallax sections */
.hero.parallax {
  background: url('../images/header-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}

#features.parallax {
  background: url('../images/features-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}

#ai-proctoring.parallax {
  background: url('../images/proctoring-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}

/* For better mobile compatibility */
@media (max-width: 768px) {
  .parallax {
    background-attachment: scroll;  /* Fallback for mobile */
  }
}

/* Apple-inspired animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base styles for animated elements */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Apply animation when element becomes visible */
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for segment cards */
#segments h2 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#segments h2.visible {
  opacity: 1;
  transform: translateY(0);
}

#segments .segment-card:nth-child(1) { transition-delay: 0.1s; }
#segments .segment-card:nth-child(2) { transition-delay: 0.2s; }
#segments .segment-card:nth-child(3) { transition-delay: 0.3s; }
#segments .segment-card:nth-child(4) { transition-delay: 0.4s; }

/* Staggered animations for feature cards */
#features h2 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#features h2.visible {
  opacity: 1;
  transform: translateY(0);
}

.flexing-items {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0;
}

#features .feature-card:nth-child(1) { transition-delay: 0.1s; }
#features .feature-card:nth-child(2) { transition-delay: 0.2s; }
#features .feature-card:nth-child(3) { transition-delay: 0.3s; }
#features .feature-card:nth-child(4) { transition-delay: 0.4s; }