/* Base styles CSS*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6b2cf5;
  --primary-light: rgba(107, 44, 245, 0.1);
  --primary-hover: rgba(107, 44, 245, 0.2);
  --dark-bg: #161926;
  --dark-secondary: #1a1f2e;
  --text-light: #ffffff;
  --text-dark: #333333;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
  --card-bg: rgba(26, 31, 46, 0.7);
  --focus-outline: 2px solid #9b75f7;
}

/* Light Theme Variables */
.light-theme {
  --dark-bg: #f5f5f7;
  --dark-secondary: #ffffff;
  --text-light: #333333;
  --text-dark: #666666;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.85);
  --primary-light: rgba(107, 44, 245, 0.05);
  --primary-hover: rgba(107, 44, 245, 0.1);
}

/* Additional light theme adjustments - complete and comprehensive */
.light-theme header {
  background: linear-gradient(145deg, #f5f5f7, #ffffff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.light-theme .navbar a {
  color: #333333;
}

.light-theme .navbar a:hover,
.light-theme .navbar a:focus {
  color: var(--primary-color);
}

.light-theme .menu-toggle {
  color: #333333;
}

.light-theme article,
.light-theme .aside-right {
  background-color: rgba(107, 44, 245, 0.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.light-theme footer,
.light-theme .footer {
  background-color: #f0f0f5;
  color: #333333;
}

.light-theme .footer-section h3 {
  color: var(--primary-color);
}

.light-theme .footer-section p,
.light-theme .footer-section ul li a {
  color: #333333;
}

.light-theme .footer-bottom {
  background-color: #e8e8f0;
  border-top: 1px solid rgba(107, 44, 245, 0.1);
}

.light-theme .footer-bottom p {
  color: #555555;
}

.light-theme .social-icon {
  color: #333333;
}

.light-theme .modal {
  background-color: rgba(0, 0, 0, 0.7); /* Keep dark overlay for readability */
}

.light-theme .modal-content {
  background: #ffffff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.light-theme #modalContent h3,
.light-theme #modalContent h4 {
  color: var(--primary-color);
}

.light-theme #modalContent p,
.light-theme #modalContent ul,
.light-theme #modalContent li {
  color: #333333;
}

.light-theme .close-modal {
  color: #333333;
}

.light-theme .character-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(107, 44, 245, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.light-theme .character-card h3 {
  color: var(--primary-color);
}

.light-theme .character-card p {
  color: #333333;
}

.light-theme .character-card:hover,
.light-theme .character-card:focus-within {
  border-color: rgba(107, 44, 245, 0.3);
  box-shadow: 0 8px 20px rgba(107, 44, 245, 0.1);
}

.light-theme .list-MP li {
  background: rgba(107, 44, 245, 0.05);
  color: #333333;
}

.light-theme .list-MP li:hover {
  background: rgba(107, 44, 245, 0.1);
}

.light-theme strong {
  color: var(--primary-color);
}

.light-theme .theme-switch-wrapper .slider {
  background-color: #e0e0e0;
  border-color: rgba(107, 44, 245, 0.3);
}

.light-theme .loading {
  background-color: #f5f5f7;
}

.light-theme .skip-link:focus {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Transition for theme changes */
body,
article,
.character-card,
.modal-content,
header,
footer,
.aside-right {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--dark-bg);
  color: var(--text-light);
  scroll-behavior: smooth;
  transition: background-color 0.5s ease;
}

/* Typography */
h2 {
  color: var(--primary-color);
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), transparent);
}

h3 {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  h3 {
    font-size: 1.5rem;
  }
}

/* Header and Navigation */
header {
  background: linear-gradient(145deg, var(--dark-bg), var(--dark-secondary));
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: row; /* Changed to row for better mobile layout */
  align-items: center;
  justify-content: space-between; /* Added for mobile */
  width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  margin: 0; /* Remove margin for better alignment */
  z-index: 1001; /* Keep logo above mobile menu */
}

.logo a {
  display: block;
  line-height: 0; /* Prevent vertical shift on click */
}

.logo-img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 5px rgba(107, 44, 245, 0.5));
  transition:
    filter 0.3s ease,
    height 0.3s ease;
}

.logo-img:hover {
  filter: drop-shadow(0 0 8px rgba(107, 44, 245, 0.8));
}

@media (min-width: 768px) {
  header {
    padding: 0.75rem 2rem;
  }

  .logo-img {
    height: 45px;
  }
}

.navbar {
  width: auto; /* Changed from 100% */
  position: relative;
}

.menu-toggle {
  position: relative;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  padding: 0.5rem;
  border: none;
  background: none;
  transition: color 0.3s ease;
  z-index: 1001; /* Ensure it's above the menu */
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: var(--primary-color);
  outline: none;
}

.menu-toggle.active {
  color: var(--primary-color);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: fixed; /* Fixed positioning for mobile */
  top: 0;
  left: 0; /* Cover entire screen */
  width: 100%;
  height: 100vh;
  background: linear-gradient(
    145deg,
    rgba(22, 25, 38, 0.98),
    rgba(26, 31, 46, 0.98)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999; /* Below the logo and hamburger */
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  justify-content: center;
  padding: 5rem 0 2rem;
  opacity: 0;
  visibility: hidden;
}

.nav-list.show {
  opacity: 1;
  visibility: visible;
}

.nav-list li {
  width: 80%;
  margin: 0.5rem 0;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.nav-list.show li {
  opacity: 1;
  transform: translateY(0);
}

/* Create staggered animation for menu items */
.nav-list.show li:nth-child(1) {
  transition-delay: 0.1s;
}
.nav-list.show li:nth-child(2) {
  transition-delay: 0.2s;
}
.nav-list.show li:nth-child(3) {
  transition-delay: 0.3s;
}
.nav-list.show li:nth-child(4) {
  transition-delay: 0.4s;
}

.nav-list a {
  font-size: 1.4rem;
  padding: 1.2rem;
  margin: 0.3rem 0;
  width: 100%;
  display: block;
  transition: all 0.3s ease;
  text-align: left;
  border-radius: 12px;
  position: relative;
  background: rgba(107, 44, 245, 0.05);
  overflow: hidden;
  border-left: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.nav-list a:hover,
.nav-list a:focus {
  background: rgba(107, 44, 245, 0.15);
  border-left: 3px solid var(--primary-color);
  transform: translateX(5px);
}

.nav-list a i {
  margin-right: 1rem;
  font-size: 1.2rem;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
  color: var(--primary-color);
  width: 24px;
  text-align: center;
}

.nav-list a:hover i,
.nav-list a:focus i {
  transform: scale(1.2);
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(107, 44, 245, 0.2), transparent);
}

/* Additional styling for mobile menu items */
.nav-list a span {
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .nav-list {
    flex-direction: row;
    position: static;
    height: auto;
    width: auto;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 0;
    opacity: 1;
    visibility: visible;
  }

  .nav-list li {
    width: auto;
    margin: 0;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-list a {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
  }

  .nav-list a::after {
    content: "";
    position: absolute;
    bottom: -5px; /* Position below the text */
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    transition: var(--transition);
  }

  .nav-list a:hover,
  .nav-list a:focus {
    background: transparent;
    border-left: none;
    transform: none;
  }

  .nav-list a:hover::after,
  .nav-list a:focus::after {
    background: var(--primary-color);
  }

  .nav-list a i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
    width: auto;
  }

  .nav-list a:hover i,
  .nav-list a:focus i {
    transform: none;
  }
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background-color: transparent;
  transition: var(--transition);
}

.navbar a:hover,
.navbar a:focus {
  color: var(--primary-color);
  outline: none;
}

.navbar a:hover::after,
.navbar a:focus::after {
  background-color: var(--primary-color);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 2rem;
    gap: 2rem;
  }
}

/* Articles and Cards */
article {
  background-color: var(--primary-light);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

article:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

@media (min-width: 768px) {
  article {
    padding: 1.5rem;
  }
}

.character-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid transparent;
  position: relative;
}

.character-card:hover,
.character-card:focus-within {
  transform: translateY(-7px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(107, 44, 245, 0.5);
}

.character-card {
  padding: 0;
}

.character-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  transition: transform 0.5s ease;
}

.character-card:hover img {
  transform: scale(1.03);
}

.character-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.character-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.character-card p {
  margin-bottom: 1.25rem;
  line-height: 1.5;
  flex-grow: 1;
}

@media (min-width: 576px) {
  .character-card img {
    height: 200px;
  }
}

@media (min-width: 768px) {
  .character-card {
    border-radius: 20px;
  }

  .character-card img {
    height: 230px;
    border-radius: 20px 20px 0 0;
  }

  .character-card-content {
    padding: 1.5rem;
  }

  .character-card h3 {
    font-size: 1.5rem;
  }
}

@media (min-width: 992px) {
  .character-card img {
    height: 250px;
  }
}

.read-more-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  margin-top: auto;
  font-weight: bold;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.read-more-btn:hover,
.read-more-btn:focus {
  background-color: #5222d0;
  transform: translateY(-2px);
  outline: none;
}

.read-more-btn:focus {
  outline: var(--focus-outline);
}

.read-more-btn:active {
  transform: translateY(0);
}

/* Lists */
.list-MP li {
  margin-bottom: 0.75rem;
  margin-left: 1.5rem;
  padding: 0.75rem;
  background: var(--primary-light);
  border-radius: 12px;
  transition: var(--transition);
  list-style-type: none;
  position: relative;
}

@media (min-width: 768px) {
  .list-MP li {
    margin-bottom: 1rem;
    margin-left: 3rem;
    padding: 1rem;
  }
}

.list-MP li:hover {
  background: var(--primary-hover);
  transform: translateX(10px);
}

/* Typography Elements */
strong {
  color: var(--primary-color);
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  strong {
    font-size: 1.1rem;
  }
}

.powers-section p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .powers-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
}

.powers-section li {
  position: relative;
  transition: var(--transition);
}

.powers-section li::before {
  content: "→";
  position: absolute;
  left: -1.5rem;
  top: 0.75rem;
  color: var(--primary-color);
  font-weight: bold;
  transition: var(--transition);
}

.powers-section li:hover::before {
  left: -1rem;
  color: #fff;
}

.character-info {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .character-info {
    margin-top: 1.5rem;
  }
}

.character-info h3 {
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 0.25rem;
}

/* Character Cards Layout */
.character-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 576px) {
  .character-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 992px) {
  .character-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
}

/* Aside Content */
.aside-right {
  background: var(--primary-light);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 2rem;
  position: relative;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .aside-right {
    margin-top: 3rem;
    padding: 1.5rem;
  }
}

.aside-right h3 {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .aside-right h3 {
    font-size: 1.3rem;
  }
}

.aside-right ul {
  list-style: none;
  margin-top: 1rem;
}

.aside-right li {
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .aside-right li {
    margin-bottom: 1rem;
  }
}

.aside-right img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .aside-right img {
    height: 200px;
  }
}

/* Footer Styles */
.footer {
  background: #161926;
  background-color: #161926;
  padding-top: 3rem;
  padding-bottom: 1rem;
  margin-top: 5rem;
  border-top: 1px solid rgba(107, 44, 245, 0.3);
  clear: both;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-section p {
  color: var(--text-light);
  opacity: 0.8;
  line-height: 1.5;
}

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

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
}

.social-icon {
  color: #fff;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(107, 44, 245, 0.1);
  background-color: #161926;
}

.footer-bottom p {
  color: var(--text-light);
  opacity: 0.7;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Ensure proper spacing for the last item before footer */
.container > *:last-child {
  margin-bottom: 5rem;
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
}

.theme-switch {
  display: inline-block;
  height: 28px;
  position: relative;
  width: 56px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #1a1f2e;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid rgba(107, 44, 245, 0.5);
}

.slider:before {
  background-color: var(--primary-color);
  bottom: 4px;
  content: "";
  height: 20px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 20px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #efefef;
}

input:checked + .slider:before {
  transform: translateX(28px);
}

.slider .fa-moon {
  color: white;
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.slider .fa-sun {
  color: #ffcc00;
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.light-theme .slider .fa-moon {
  color: #333;
}

.light-theme .slider .fa-sun {
  color: #ff9900;
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
  font-size: 1.3rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.scroll-top.active {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: #5222d0;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Loading indicator */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.loading.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(107, 44, 245, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility improvements */
:focus {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100px; /* Move it completely off-screen until focused */
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  z-index: 1001;
  transition: top 0.3s ease;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
}

.modal-content {
  background: var(--dark-secondary);
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(107, 44, 245, 0.3);
  animation: modal-appear 0.3s ease-out;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 0.75rem;
  right: 1.25rem;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
  transition:
    color 0.3s ease,
    transform 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.close-modal:focus {
  outline: var(--focus-outline);
  color: var(--primary-color);
}
#modalContent {
  padding: 1rem 0;
}

#modalContent h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

#modalContent img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#modalContent p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

#modalContent ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

#modalContent li {
  margin-bottom: 0.5rem;
}

/* Animations for AOS fallback */
.fade-in {
  animation: fadeIn 1s;
}

.fade-up {
  animation: fadeUp 1s;
}

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

/* Floating animation for images */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Slightly faster floating animation variant */
@keyframes floatFast {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Powers Section */
.powers-section {
  padding-bottom: 4rem;
  margin-bottom: 3rem;
}

.powers-section article {
  margin-bottom: 2rem;
}

/* Avoid overlap with the footer */
main.container {
  min-height: calc(100vh - 500px);
  padding-bottom: 6rem;
}
