/* --- General Styles & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #4f8aff;
  --primary-dark: #2a6de8;
  --secondary-color: #0d2c54; /* A deeper blue */
  --light-bg: #f0f4ff;
  --text-color: #333;
  --white-color: #ffffff;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background-color: rgb(222, 222, 222);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- Header --- */
header {
  display: flex;
  align-items: center;
  background: url('B.gif') no-repeat center center;
  background-size: cover;
  padding: 8px 20px;
  color: var(--white-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 100px; /* Reduced header height */
}

.logo {
  animation: float 4s ease-in-out infinite;
  animation-delay: 0.5s;
  transition: all 0.3s ease;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.logo:first-child {
  animation-delay: 0s;
}

.logo:last-child {
  animation-delay: 0.25s;
}

.logo img {
  height: 50px;
  margin: 0 15px;
  transition: all 0.3s ease;
  display: block;
}

.logo:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.3));
}

.logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

.title {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
  text-align: center;
  margin-left: 20px;
}

@keyframes float {
  0% {
    transform: translateY(0px);
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }
  50% {
    transform: translateY(-5px);
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
  }
  100% {
    transform: translateY(0px);
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }
}

.title h1 {
  font-size: 1.8em;
  margin: 0;
  background: linear-gradient(90deg, #ffffff 0%, #a5b4fc 25%, #ffffff 50%, #a5b4fc 75%, #ffffff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: titleShine 8s linear infinite;
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  line-height: 1.2;
  padding: 0 6px;
}

.title h1::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), #00eaff, var(--primary-color));
  border-radius: 2px;
  animation: underlinePulse 2.5s ease-in-out infinite;
}

.title p {
  font-size: 1.1em;
  margin: 6px 0 0 0;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  letter-spacing: 1.6px;
  font-weight: 500;
  opacity: 0.95;
  animation: fadeIn 1.2s ease-out, glowPulse 3.2s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animated gradient and accents for banner text */
@keyframes titleShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes underlinePulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 6px rgba(79,138,255,0.6), 0 2px 4px rgba(0,0,0,0.3); }
  50% { text-shadow: 0 0 12px rgba(79,138,255,1), 0 2px 6px rgba(0,0,0,0.35); }
}

/* --- Navigation Bar --- */
nav {
  background-color: var(--secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 5px;
  padding: 0;
  margin: 0;
}

nav li {
  position: relative; /* Needed for dropdown */
}

nav li a {
  color: var(--white-color);
  text-decoration: none;
  padding: 15px 20px;
  display: block;
  font-weight: 400;
  position: relative;
  transition: background-color 0.3s ease;
}

nav li a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav li a:hover, nav li:hover > a {
  background-color: rgba(255, 255, 255, 0.1);
}

nav li a:hover::after {
  width: 70%;
}

.user-icon img {
  height: 40px;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.user-icon img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--primary-color);
}

/* --- Dropdown Menu --- */
.content-dropdown {
  max-height: 0;
  overflow: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white-color);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 0;
  z-index: 999;
  transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
  border-top: 3px solid var(--primary-color);
}

.content-dropdown.show {
  max-height: 850px; /* Adjust as needed */
  padding: 10px 0;
}

.content-dropdown a {
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  color: var(--secondary-color);
  transition: background-color 0.3s, color 0.3s;
}

.content-dropdown a:hover {
  background-color: var(--light-bg);
  color: var(--primary-dark);
}

/* --- Marquee --- */
.marquee-container {
  background-color: var(--light-bg);
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.marquee-container p {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 25s linear infinite;
  margin: 0;
  font-weight: 600;
  color: var(--secondary-color);
}

@keyframes marquee {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* --- Main Content --- */
main {
  display: flex;
  justify-content: space-between;
  padding: 30px;
  gap: 30px;
}

.left, .right {
  width: 20%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.center {
  width: 60%;
  text-align: center;
}

/* --- Left & Right Sidebar Containers --- */
.time-container, .calendar-container, .links-container {
    background: var(--white-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.time {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary-dark);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.calendar div {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.calendar-header h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.calendar-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.calendar .day-header {
    color: var(--primary-color);
    font-weight: 700;
}

.calendar .day-number {
    line-height: 36px;
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
}

.calendar .day-number:hover {
    background-color: var(--light-bg);
    cursor: default;
}

.calendar .today {
  background-color: var(--primary-color);
  color: var(--white-color);
  font-weight: bold;
}

/* --- Center Content --- */
.center iframe {
  width: 100%;
  height: 450px;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.directed {
  font-size: 16px;
  color: #666;
  margin-top: 20px;
  padding: 15px;
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: inline-block;
}

/* --- Links Containers --- */
.links-container h3 {
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 10px;
}

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

.links-container li a {
  display: block;
  margin-bottom: 10px;
  background-color: var(--light-bg);
  color: var(--secondary-color);
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.links-container li a:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  transform: translateX(5px);
}

/* --- Page-Specific Sections (About, Contact) --- */
.about-section, .contact-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.about-section h2, .contact-section h2 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 40px;
}

.about-container, .contact-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.profile-card, .person-contact {
  background-color: var(--light-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 10px rgba(0,0,0,0.05);
  width: 300px;
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 4px solid var(--primary-color);
}

.profile-card:hover, .person-contact:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--white-color);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  margin-bottom: 20px;
}

.profile-card h3, .person-contact h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  color: var(--secondary-color);
}

.profile-card p, .person-contact p {
  margin: 5px 0;
  color: var(--text-color);
}

.person-contact p strong {
    color: var(--primary-dark);
}

.about-section .video-container {
    margin-top: 40px;
}

.about-section .video-container iframe {
    width: 100%;
    max-width: 800px;
    height: 450px;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* --- Course Details Page --- */
.course-details-section {
  width: 60%;
  background-color: var(--white-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: left;
}

.course-details-section h2 {
  font-size: 2.2rem;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 15px;
}

.course-details-section h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.course-info p, .course-description p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.course-info p strong {
  color: var(--primary-dark);
  min-width: 120px;
  display: inline-block;
}

.course-objectives ol, .course-competencies ol {
  padding-left: 20px;
  margin: 0;
}

.course-objectives li, .course-competencies li {
  margin-bottom: 10px;
  line-height: 1.8;
}

/* --- Lesson Page --- */
.lesson-section {
    width: 100%;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.lesson-section .lesson-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.lesson-section .video-container {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.lesson-section .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.lesson-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--white-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.lesson-links .presentation-link {
    background-color: var(--primary-color);
}

.lesson-links .presentation-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.lesson-links .posttest-link {
    background-color: var(--success-color);
}

.lesson-links .posttest-link:hover {
    background-color: var(--success-dark);
    transform: translateY(-3px);
}



.about-section h2, .contact-section h2 {
  font-size: 32px;
  margin-bottom: 30px;
  color: var(--secondary-color);
  text-align: center;
}

.about-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.person {
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  width: 280px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.person:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.person img.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 5px solid var(--white-color);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.person h3 {
  margin: 10px 0 5px;
  font-size: 22px;
  color: var(--primary-dark);
}

.person p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* --- Lesson Page Buttons (Refined) --- */
.lesson-buttons {
    display: flex;
    justify-content: center;
    gap: 25px; /* Increased gap for better spacing */
    margin-top: 30px; /* More space from the title */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.lesson-btn {
    display: inline-flex; /* Use inline-flex for better alignment of icon and text */
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 50px; /* Pill-shaped buttons */
    text-decoration: none;
    font-weight: 600; /* Bolder text */
    font-size: 1.1rem;
    color: var(--white-color);
    transition: all 0.3s ease-in-out;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden; /* For effects */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.lesson-btn span {
    margin-right: 10px;
    font-size: 1.4rem; /* Larger icon */
    transition: transform 0.3s ease;
}

.lesson-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.lesson-btn:hover span {
    transform: scale(1.2);
}

.lesson-btn.presentation {
    background: linear-gradient(45deg, #4f8aff, #2a6de8);
}

.lesson-btn.post-test {
    background: linear-gradient(45deg, #36d1dc, #5b86e5);
}

.lesson-btn.worksheet-btn {
    background: linear-gradient(45deg, #28a745, #218838);
}

.lesson-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Adding a subtle glow effect */
.lesson-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.7s ease;
}

.lesson-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}


/* --- General Button Styles --- */
.button-container {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav .user-icon {
    margin-top: 10px;
  }
  main {
    flex-direction: column;
  }
  .left, .center, .right {
    width: 100%;
    margin-bottom: 20px;
  }
  .lesson-buttons {
    flex-direction: column;
    align-items: center;
  }
  .lesson-btn {
    width: 80%;
    margin-bottom: 10px;
  }
  .course-details-section {
    width: 90%;
    padding: 20px;
  }
  .about-container, .contact-container {
      flex-direction: column;
      align-items: center;
  }
}

@media (max-width: 480px) {
    .title h1 {
        font-size: 1.5em;
    }
    .title p {
        font-size: 0.9em;
    }
    .marquee-container p {
        font-size: 0.8em;
    }
    nav li a {
        padding: 10px 15px;
    }
    .logo img {
        height: 40px;
    }
}
