html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
  color: #212529;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom styles for the test UI */
.container.test-container {
  max-width: 900px;
  margin-top: 32px;
  margin-bottom: 48px;
}

.question-card {
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(32, 45, 66, 0.06);
  border: 1px solid rgba(32,45,66,0.06);
  padding: 18px;
  background: #fff;
}

.question-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.options-list .form-check {
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.05s;
}

.options-list .form-check:hover {
  background: #f4f9ff;
}

.options-list .form-check-input {
  margin-top: 6px;
}

.btn-primary.custom-submit {
  background: linear-gradient(90deg,#0d6efd,#1e90ff);
  border: 0;
  box-shadow: 0 6px 18px rgba(30,144,255,0.18);
}

.result-badge {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg,#28a745,#2ecc71);
}

.correct-answer {
  color: #0b6623;
  font-weight: 600;
}

.admin-form .form-control {
  margin-bottom: 10px;
}

/* small screens fix */
@media (max-width: 575.98px) {
  .question-title { font-size: 1rem; }
}

/* Hero styles */
.hero {
  background: linear-gradient(180deg, #0f4c81 0%, #1e90ff 60%);
  color: #fff;
  padding: 64px 0;
  border-radius: 8px;
}
.hero .lead {
  color: rgba(255,255,255,0.9);
}
.hero .cta-btn {
  padding: 12px 20px;
  font-weight: 600;
  border-radius: 8px;
}

/* Feature cards */
.features {
  margin-top: 32px;
}
.feature-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 76, 129, 0.08);
  height: 100%;
  transform: translateY(0);
  transition:
    transform 300ms cubic-bezier(.2,.8,.2,1),
    box-shadow 300ms ease;
}
.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(13,76,129,0.12);
}

.feature-icon {
  font-size: 28px;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(90deg,#0d6efd,#1e90ff);
  color: #fff;
  margin-right: 12px;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}

/* Footer tweak */
.footer .container { padding: 18px 0; }
.footer {
  background: #000; /* ensure dark background if not set elsewhere */
  color: #ffffff;
}
.footer, .footer p, .footer span, .footer small, .footer li, .footer label, .footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6 {
  color: #ffffff !important;
}
.footer a {
  color: #ffffff !important;
}
.footer a:hover, .footer a:focus {
  color: #dcdcdc !important;
  text-decoration: underline;
}
.footer .text-muted {
  color: rgba(255,255,255,0.65) !important;
}

/* Ensure any footer element with dark background shows white text */
footer.bg-dark, footer.bg-dark * {
  color: #ffffff !important;
}
footer.bg-dark .text-muted {
  color: rgba(255,255,255,0.85) !important;
}

/* Also handle footers that use 'text-light' and nested muted text */
footer.text-light, footer.text-light * {
  color: #ffffff !important;
}
footer.text-light .text-muted {
  color: rgba(255,255,255,0.85) !important;
}

/* Ensure footer text remains visible even when Bootstrap's .text-muted is applied on the footer element itself */
.footer.text-muted,
footer.footer.text-muted,
.footer.text-muted *,
footer.footer.text-muted * {
  color: #ffffff !important;
}

/* Also ensure small/lead/muted inside footer are white-ish */
.footer .small,
.footer small,
.footer .lead,
.footer .text-muted {
  color: rgba(255,255,255,0.85) !important;
}

/* Additional home page tweaks */
.site-hero { background: linear-gradient(180deg,#0d3b61 0%, #1e90ff 60%); color: #fff; padding: 64px 0; border-radius: 10px; margin-bottom: 24px; }
/* Increase hero image size and make responsive */
.hero-image {
  width: 100%;
  max-width: 520px; /* allow larger image on wide screens */
  height: auto;
  display: inline-block;
}
/* Mobile-specific hero image used in small screens */
.mobile-hero-image {
  width: auto;
  max-width: 360px;
  max-height: 320px; /* cap height to avoid overflow on small screens */
  height: auto;
}
.blockquote { border-left: 0; }
.blockquote-footer { color: #6c757d; }
.bg-light { background: #f8f9fa; }
.footer { border-top: 1px solid rgba(255,255,255,0.06); }
/* Testimonial background colors */
.testimonial-student { background: linear-gradient(135deg, #e9f7ef 0%, #dff5e7 100%); }
.testimonial-instructor { background: linear-gradient(135deg, #fff6e6 0%, #fff0d1 100%); }
.testimonial-learner { background: linear-gradient(135deg, #eef6ff 0%, #e6f0ff 100%); }

/* Ensure blockquote text contrasts */
.testimonial-student p, .testimonial-instructor p, .testimonial-learner p { color: #0d2b1f; }
.testimonial-student .blockquote-footer, .testimonial-instructor .blockquote-footer, .testimonial-learner .blockquote-footer { color: #6c757d; }

/* Fees box styles */
.fees-box {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(13,76,129,0.06);
  transform: translateY(12px) scale(0.995);
  opacity: 0;
  transition:
    transform 520ms cubic-bezier(.2,.8,.2,1),
    opacity 520ms ease;
}
.fees-box.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.fees-box h3 { color: #0d3b61; }
.fees-box .table tbody tr td { padding: 10px 8px; }

.fees-highlight {
  background: linear-gradient(90deg, #fff4e6 0%, #fff1d1 100%);
  border: 1px solid rgba(255,200,60,0.12);
}
.fees-highlight .fs-4 { color: #b86b00; }

/* How it works section - updated to a modern, professional card style */
.how-it-works {
  background: #ffffff; /* crisp white card */
  border-radius: 12px;
  padding: 40px 28px;
  margin-bottom: 32px;
  border: 1px solid rgba(13,76,129,0.06);
  box-shadow: 0 10px 30px rgba(13,76,129,0.06);
  position: relative;
  overflow: hidden;
}

/* Vertical accent bar to the left for a modern look */
.how-it-works::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 6px;
  background: linear-gradient(180deg, #1e90ff 0%, #0d6efd 100%);
  border-radius: 6px;
}

.how-it-works .container { position: relative; z-index: 2; }
.how-it-works h3 {
  color: #073b57; /* darker navy */
  font-weight: 700;
  margin-bottom: 12px;
}
.how-it-works ol {
  margin-left: 1rem;
  color: #334e68; /* comfortable readable text color */
}
.how-it-works ol li {
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Right-side highlight card inside how-it-works */
.how-it-works .card {
  border: none;
  background: linear-gradient(180deg,#f8fbff 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(13,76,129,0.04);
  border-radius: 10px;
}
.how-it-works .card .card-title { color: #0d3b61; font-weight:700; }
.how-it-works .card .card-text { color: #536878; }

/* Animation utilities */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

.float-anim {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(.2,.8,.2,1), transform 600ms cubic-bezier(.2,.8,.2,1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CTA pulse */
@keyframes pulse {
  0% { box-shadow: 0 6px 18px rgba(30,144,255,0.18); }
  50% { box-shadow: 0 12px 30px rgba(30,144,255,0.22); transform: translateY(-2px); }
  100% { box-shadow: 0 6px 18px rgba(30,144,255,0.18); transform: translateY(0); }
}
.cta-pulse {
  animation: pulse 3s ease-in-out infinite;
}

/* Animations and interactive enhancements for home page */

/* Feature card hover + entrance */
.feature-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 76, 129, 0.08);
  height: 100%;
  transform: translateY(0);
  transition:
    transform 300ms cubic-bezier(.2,.8,.2,1),
    box-shadow 300ms ease;
}
.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(13,76,129,0.12);
}

/* Testimonials subtle lift on hover */
.testimonial-student, .testimonial-instructor, .testimonial-learner {
  transition:
    transform 300ms cubic-bezier(.2,.8,.2,1),
    box-shadow 300ms ease;
}
.testimonial-student:hover, .testimonial-instructor:hover, .testimonial-learner:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(10,35,60,0.06);
}

/* Fees box entrance */
.fees-box {
  transform: translateY(12px) scale(0.995);
  opacity: 0;
  transition:
    transform 520ms cubic-bezier(.2,.8,.2,1),
    opacity 520ms ease;
}
.fees-box.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Add stagger utility for child reveal */
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
}
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(.2,.8,.2,1);
}

/* Slight icon pop for feature icons */
.feature-icon {
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
.feature-card:hover .feature-icon {
  transform: scale(1.06) rotate(-6deg);
}

/* Ensure CTA stands out more on hover */
.btn-primary.cta-pulse:hover {
  transform: translateY(-3px);
}

/* Expert badge */
.expert-badge {
  background: linear-gradient(90deg,#ffd54f,#ffc107);
  color: #0d2b1f;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  vertical-align: middle;
  box-shadow: 0 6px 18px rgba(255,193,7,0.12);
}

/* User banner styling */
.user-banner {
  max-height: 240px;
  object-fit: cover;
  width: 100%;
  border: 1px solid rgba(13,76,129,0.06);
  box-shadow: 0 8px 24px rgba(13,76,129,0.06);
}

/* Analog clock styles */
.analog-clock {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 40%), linear-gradient(180deg,#fefefe,#f5f8ff);
  box-shadow: 0 10px 24px rgba(13,76,129,0.08);
}

.analog-clock-container { display:flex; align-items:center; justify-content:center; }
/* Center analog clock wrapper to occupy space and center content */
.test-banner-row .analog-clock-wrapper {
  display: inline-block;
  text-align: center;
}

.test-banner-row .col-md-8 { min-height: 260px; display: flex; align-items: center; justify-content: center; }

.analog-clock { width: 260px; height: 260px; }

/* Banner container with clock overlay */
.banner-container { position: relative; display:flex; align-items:center; justify-content:center; }
.analog-clock-overlay { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; pointer-events: none; }
.analog-clock-wrapper { pointer-events: auto; text-align:center; }

/* Ensure clock sits below banner and centered */
.analog-clock-below { display:flex; justify-content:center; }
.banner-container { display:block; }
.user-banner { width:100%; height:180px; object-fit:cover; }
.analog-clock { width:220px; height:220px; }

/* Subscription messages area styling */
.subscription-messages .alert { max-width: 780px; margin: 0 auto; text-align: left; }
/* Subscription block styles */
.subscription-block { border-radius: 10px; padding: 12px; }
.subscription-block .analog-clock-wrapper { display:inline-block; }
/* Prevent clock overlapping message text: ensure flex layout and spacing */
.subscription-block .card-body { gap: 18px; }
.subscription-block .analog-clock-left { margin-top: 6px; }
.subscription-block .subscription-messages { padding-right: 10px; }
.subscription-block .analog-clock-left canvas { max-width: 160px; max-height: 160px; display:block; }
/* Adjust subscription block layout with left clock and right messages */
.subscription-block .analog-clock-left { width: 180px; flex: 0 0 180px; }
.subscription-block .subscription-messages { flex: 1 1 auto; }
.subscription-block .subscription-messages { margin-top: 8px; }