/* LMS theme — matches index / dashboard (purple–indigo on dark navy) */
:root {
  --lms-bg-dark: #0b1020;
  --lms-bg-mid: #1e1b4b;
  --lms-bg-deep: #312e81;
  --lms-primary: #7c3aed;
  --lms-secondary: #6366f1;
  --lms-accent: #a78bfa;
  --lms-accent-light: #c4b5fd;
  --lms-text: #f8fafc;
  --lms-text-muted: #cbd5e1;
}

.footer {
  background: linear-gradient(
    135deg,
    var(--lms-bg-dark) 0%,
    var(--lms-bg-mid) 45%,
    var(--lms-bg-deep) 100%
  );
  color: var(--lms-text);
  padding: 80px 50px 40px;
  font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  margin-top: auto;
  position: relative;
  box-shadow: 0 -8px 40px rgba(124, 58, 237, 0.2);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lms-primary), var(--lms-secondary), var(--lms-accent));
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 10px;
  max-width: 1200px;
  margin: auto;
  border-bottom: 1px solid rgba(124, 58, 237, 0.35);
  padding-bottom: 25px;
}

.footer-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 150px;
  text-align: left;
}

.footer-section-page,
.footer-section-course {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 100px;
  text-align: left;
}

.footer-logo-left {
  width: 85px;
  height: auto;
  max-height: 100px;
  margin-left: 50px;
  object-fit: contain;
}

.footer-logo {
  margin-top: 8px;
  margin-left: 2px;
  max-width: 160px;
  height: auto;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-flex;
}

.footer-social img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 6px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  object-fit: cover;
}

.footer-social img:hover {
  transform: scale(1.2) rotate(5deg);
  background: var(--lms-accent-light);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}

.footer-title,
.footer-subtitle,
.map-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--lms-accent);
  letter-spacing: 0.5px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 6px;
}

.footer-links ul li a {
  color: var(--lms-text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: var(--lms-accent-light);
}

.footer-links ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--lms-primary), var(--lms-secondary));
  transition: width 0.3s ease;
}

.footer-links ul li a:hover::after {
  width: 100%;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-item img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-item a {
  color: var(--lms-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
  word-break: break-word;
}

.contact-item a:hover {
  color: var(--lms-accent-light);
}

.footer-open-hours {
  list-style: none;
  padding: 0;
  margin: 0 0 6px 0;
  color: var(--lms-text-muted);
  font-weight: 500;
  font-size: 14px;
}

.footer-open-hours li {
  margin-bottom: 3px;
}

.footer-section iframe {
  width: 100%;
  height: 120px;
  border: none;
  border-radius: 10px;
  margin-top: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  outline: 1px solid rgba(124, 58, 237, 0.4);
}

.footer-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0 0;
  margin-top: 20px;
}

.footer-copy {
  font-size: 14px;
  color: var(--lms-text-muted);
  text-align: center;
  margin: 0;
}

.footer-copy strong {
  color: var(--lms-accent);
  font-weight: 600;
}

body.lms-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.lms-app main {
  flex: 1;
}

@media (max-width: 1100px) {
  .footer-container {
    flex-wrap: wrap;
    gap: 28px;
  }

  .footer-section,
  .footer-section-page,
  .footer-section-course {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 180px;
  }
}

@media (max-width: 850px) {
  .footer {
    padding: 50px 24px 30px;
  }

  .footer-container {
    justify-content: center;
    text-align: center;
  }

  .footer-section,
  .footer-section-page,
  .footer-section-course {
    flex: 1 1 calc(50% - 20px);
    min-width: 160px;
    align-items: center;
  }

  .footer-section.contact-us {
    flex: 1 1 100%;
  }

  .footer-section.contact-us .contact-item {
    justify-content: center;
  }

  .footer-logo-left {
    margin-left: 0;
    max-width: 55px;
  }

  .footer-logo {
    margin-left: 0;
    max-width: 130px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-section iframe {
    height: 100px;
  }
}

@media (max-width: 520px) {
  .footer-section,
  .footer-section-page,
  .footer-section-course {
    flex: 1 1 100%;
  }
}
