/* General Reset */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f8fb;
  color: #333;
  line-height: 1.6;
}

/* Header Styling */
header {
  background: #004aad;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p {
  margin: 10px 0 0;
  font-size: 1.2rem;
}

/* Navigation Menu */
nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  justify-content: center;
  gap: 20px; /* Default gap for larger screens */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

nav ul li {
  display: inline;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 5px 15px; /* Increased horizontal padding for better touch targets */
  border-radius: 5px;
  transition: background 0.3s ease;
}

nav ul li a:hover {
  background: #003680;
}

/* Main Content */
main {
  padding: 20px;
}

main h2 {
  color: #004aad;
  border-bottom: 2px solid #004aad;
  padding-bottom: 5px;
  margin-bottom: 20px;
}

.resource {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.citation {
  font-style: normal;
  margin-bottom: 10px;
}

.citation em {
  font-style: italic;
}

.citation a {
  color: #004aad;
  text-decoration: none;
}

.citation a:hover {
  text-decoration: underline;
}

/* Alternative Hanging Indent for Summary Paragraphs */
.summary {
  position: relative;
  padding-left: 2em; /* Space reserved for the hanging indent */
  margin-bottom: 10px;
}

.summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2em; /* Width matching the padding-left */
  height: 100%;
}

/* Optional: Styling links within summaries */
.summary a {
  color: #1a0dab;
  text-decoration: none;
}

.summary a:hover {
  text-decoration: underline;
}

/* Footer Styling */
footer {
  background: #003680;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  margin-top: 20px;
}

/* ===============================
   Responsive Design Enhancements
   =============================== */

/* Media Query for Tablets and Smaller Screens */
@media (max-width: 768px) {
  /* Adjust header font sizes */
  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  /* Navigation Menu Adjustments */
  nav ul {
    gap: 10px; /* Reduce gap between navigation links */
    padding: 0 10px; /* Add horizontal padding to prevent overflow */
  }

  nav ul li a {
    padding: 5px 10px; /* Reduce horizontal padding */
    font-size: 0.9rem; /* Slightly smaller font size */
  }

  /* Main Content Adjustments */
  main {
    padding: 15px;
  }

  main h2 {
    font-size: 1.8rem;
  }

  .resource {
    padding: 10px;
  }

  .summary {
    padding-left: 1.5em; /* Adjust padding for smaller screens */
  }

  .summary::before {
    width: 1.5em; /* Match the adjusted padding */
  }
}

/* Media Query for Mobile Phones */
@media (max-width: 480px) {
  /* Further adjust header font sizes */
  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 0.95rem;
  }

  /* Navigation Menu Adjustments */
  nav ul {
    flex-direction: column; /* Stack navigation links vertically */
    align-items: center;
    gap: 10px; /* Maintain small gaps */
  }

  nav ul li a {
    width: 100%; /* Make links full-width */
    text-align: center;
    padding: 10px; /* Increase padding for better touch targets */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
  }

  /* Main Content Adjustments */
  main {
    padding: 10px;
  }

  main h2 {
    font-size: 1.5rem;
  }

  .resource {
    padding: 10px;
  }

  .summary {
    padding-left: 1em; /* Further adjust padding */
  }

  .summary::before {
    width: 1em; /* Match the adjusted padding */
  }
}
