/* style.css - Full Updated Code */

@import url("https://fonts.maheen.me/kalpurush/font.css");

:root {
  --primary-color: #008080; /* Teal */
  --primary-hover: #006666;
  --bg-light: #e0f2f1;
  --text-dark: #2c3e50;
  --laltu-bg: #b2dfdb;
  --white: #ffffff;
}

body {
  font-family: "Kalpurush", "Arial", sans-serif !important;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar & Global */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--primary-color);
}
.main-content {
  flex: 1;
  padding-top: 60px;
  padding-bottom: 80px;
  animation: slideUpFade 0.8s ease;
}
.navbar {
  background-color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}
.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.6rem;
}
.nav-link {
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 10px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

/* Laltu Box & Cards */
.laltu-box {
  background-color: #ffffff;
  border-left: 6px solid var(--primary-color);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 128, 128, 0.1);
  animation: float 4s ease-in-out infinite;
}
.laltu-box::before {
  content: "💡 Logic Laltu Says:";
  display: block;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.lesson-card {
  background: var(--white);
  border: none;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  border-bottom: 4px solid transparent;
  height: 100%;
}
.lesson-card:hover {
  transform: translateY(-10px);
  border-bottom: 4px solid var(--primary-color);
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
}
.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

/* CERTIFICATE STYLES (IMPORTANT FOR DOWNLOAD) */
.certificate-wrapper {
  /* Wrapper ensures alignment but isn't part of the image */
  display: flex;
  justify-content: center;
  padding: 20px;
}

#targetCert {
  /* This specific ID will be captured as image */
  width: 800px; /* Fixed width for consistent image output */
  padding: 50px;
  background-color: #ffffff; /* Must be white */
  border: 15px double var(--primary-color);
  text-align: center;
  position: relative;
  color: #333;
  /* Fancy Background Pattern */
  background-image: radial-gradient(#00808022 1px, transparent 1px);
  background-size: 20px 20px;
}

.cert-seal {
  width: 130px;
  height: 130px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  position: absolute;
  bottom: 40px;
  right: 50px;
  border: 5px dashed white;
  transform: rotate(-15deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer & Code */
pre {
  background: #1e272e;
  color: #d2dae2;
  padding: 25px;
  border-radius: 12px;
  font-family: "Consolas", monospace !important;
}
footer {
  background: var(--white);
  padding: 40px 0;
  text-align: center;
  margin-top: auto;
}

/* Animations */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  /* On mobile, we scale down the view, but the downloaded image remains high quality */
  #targetCert {
    width: 100%;
    padding: 20px;
    border-width: 8px;
  }
  .cert-seal {
    width: 80px;
    height: 80px;
    font-size: 0.8rem;
    right: 20px;
    bottom: 20px;
  }
}
