/* 
  levelupdigitaldiscoveries.com - Screen Stylesheet
  Updated: October 08, 2024
  
  Original Design by Andreas Viklund (http://andreasviklund.com)
  Adapted for Binary Logic SA by [Your Name or Team]
  Licensed under [Specify License if applicable]
*/

/* General Styles */
body {
  margin: 0 auto;
  padding: 0;
  font-size: 1em; /* Base font size */
  font-family: Verdana, Tahoma, Arial, sans-serif;
  background: #f4f4f4 url(bg.gif) top center repeat-y;
  color: #303030; /* Dark gray for better contrast */
}

#wrap {
  background: #ffffff;
  color: #303030;
  margin: 0 auto;
  width: 760px; /* Consistent width across all pages */
}

/* Header Styles */
#header {
  clear: both;
  margin: 20px 0 0 0;
  padding: 0;
  height: 45px; /* Adjusted height */
}

#header h1 {
  width: 300px; /* Adjusted width */
  margin: 0 0 10px 0; /* Adjusted margin */
  float: left;
  font-size: 1.5em; /* Adjusted font size */
}

#header p {
  width: 400px; /* Adjusted width */
  float: right;
  text-align: center;
  color: #606060; /* Darker gray for better contrast */
  margin: 0 0 10px 0; /* Adjusted margin */
  font-size: 0.9em; /* Adjusted font size */
  line-height: 1.2em; /* Adjusted line height */
}

/* Front Photo Styles */
#frontphoto {
  margin: 0 0 10px 0; /* Adjusted margin */
  border: 0;
  width: 760px; /* Consistent width */
  height: auto; /* Maintains aspect ratio */
}

/* Navigation Menu Styles */
#avmenu, #avmenu-ar {
  margin: 0 0 10px 0; /* Adjusted margin */
  padding: 0;
  font-size: 1em; /* Adjusted font size */
}

#avmenu {
  float: left;
  width: 150px; /* Adjusted width */
}

#avmenu-ar {
  float: right;
  width: 150px; /* Adjusted width */
  padding-left: 10px; /* Adjusted padding */
}

#avmenu ul, #avmenu-ar ul {	
  list-style: none;
  margin: 0 0 20px 0; /* Adjusted margin */
  padding: 0;
  font-size: 1.1em; /* Adjusted font size */
}

#avmenu li, #avmenu-ar li {
  margin-bottom: 4px; /* Adjusted margin */
}

#avmenu li a, #avmenu-ar li a {
  font-weight: bold;
  text-decoration: none;
  color: #286ea0; /* Link color */
  display: block;
  padding: 0.375em 0 0 0.625em; /* Adjusted padding */
  background: #f4f4f4;
  border-left: 0.25em solid #cccccc; /* Adjusted border */
  transition: background 0.3s, border-left 0.3s, color 0.3s;
}

/* Hover and Focus States for Navigation Links */
#avmenu li a:hover, #avmenu-ar li a:hover,
#avmenu li a:focus, #avmenu-ar li a:focus {
  background: #eaeaea;
  color: #1a73e8; /* Brighter blue for better visibility */
  border-left: 0.25em solid #1a73e8; /* Adjusted border */
  outline: none; /* Remove default outline */
}

/* Announcements Section */
.announce {
  margin: 10px 0 10px 0; /* Adjusted margin */
  padding: 10px; /* Adjusted padding */
  width: 130px; /* Adjusted width */
  color: #505050;
  background-color: #f4f4f4;
  line-height: 1.3em; /* Adjusted line height */
  font-size: 0.9em; /* Adjusted font size */
  border: 1px solid #dddddd; /* Adjusted border */
}

/* Extras Section */
#extras, #extras-ar {
  float: right;
  width: 100px; /* Adjusted width */
  margin: 0 0 10px 0; /* Adjusted margin */
  padding: 0;
  font-size: 0.9em; /* Adjusted font size */
  line-height: 1.5em; /* Adjusted line height */
}

#extras p, #extras-ar p {
  margin: 0 0 1.5em 0; /* Adjusted margin */
}

/* Content Styles */
#content, #content-ar, #gallery, #downloads, #about {
  margin-left: 160px; /* Added white space between menu and content */
  padding-left: 20px; /* Additional padding */
}

#content, #gallery, #downloads, #about {
  margin: 0 110px 20px 160px; /* Adjusted margin */
  padding: 0 10px; /* Adjusted padding */
  line-height: 1.6em; /* Adjusted line height */
}

#content {
  text-align: left; /* Ensure left alignment */
}

#gallery {
  text-align: left; /* Left justify text paragraphs */
}

#downloads {
  text-align: left; /* Ensure text in Downloads is left-aligned */
}

#about {
  text-align: left; /* Ensure text in About is left-aligned */
}

#content p, #gallery p, #downloads p, #about p {
  text-align: left; /* Ensure all paragraphs are left-aligned */
}

/* Justify Text in Gallery Page */
#gallery figcaption {
  text-align: justify; /* Justify figcaptions */
  line-height: 1.5em; /* Increased line height for better readability */
  margin-top: 10px; /* Space between image and caption */
}

#gallery figcaption ul {
  margin-left: 20px; /* Indent bullet points */
}

#gallery figcaption li {
  margin-bottom: 5px; /* Space between list items */
}

/* Headings */
#content h2, #gallery h2, #downloads h2, #about h2 {
  font-size: 1.5em; /* Adjusted font size */
  margin: 0 0 0.5em 0; /* Adjusted margin */
}

h3 {
  font-size: 1.3em; /* Adjusted font size */
  margin: 0 0 10px 0; /* Adjusted margin */
}

/* Image Styles */
#content img, #gallery img, #downloads img, #about img {
  padding: 5px; /* Adjusted padding */
  background: #ffffff;
  border: 1px solid #696969; /* Adjusted border */
}

/* Link Styles */
a {
  text-decoration: underline; /* Persistent underline for links */
  color: #286ea0;
}

a:hover, a:focus {
  text-decoration: underline; /* Ensures underline on hover/focus */
  color: #1a73e8; /* Brighter blue for better visibility */
  font-weight: bold; /* Adds an additional visual cue */
}

a img {
  border: 0;
}

/* Footer Styles */
#footer {
  clear: both;
  margin: 0 auto;
  padding: 10px 0 20px 0; /* Adjusted padding */
  border-top: 4px solid #f0f0f0; /* Adjusted border */
  width: 760px; /* Consistent width */
  text-align: center;
  color: #606060; /* Darker gray for better contrast */
  font-size: 0.8em; /* Original font size */
}

#footer a {
  color: #286ea0;
  text-decoration: none;
}

#footer a:hover, #footer a:focus {
  text-decoration: underline;
  color: #1a73e8;
}

/* Utility Classes */
.left {
  margin: 10px 10px 5px 0; /* Adjusted margin */
  float: left;
}

.right {
  margin: 10px 0 5px 10px; /* Adjusted margin */
  float: right;
}

.center {
  text-align: center;
}

.textright {
  text-align: right;
}

.centered {
  display: block;
  margin: 0 auto;
}

.figure-reversed {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the content horizontally */
  text-align: center; /* Center text within the figure */
}

.figure-reversed figcaption {
  margin-bottom: 10px; /* Adjusted margin */
}

.figure-reversed img.center {
  float: none;
  margin: 0;
  width: 450px; /* Adjusted width */
  height: auto; /* Maintain aspect ratio */
}

/* Ensure that centered images do not float */
img.center {
  display: block;
  margin: 0 auto 10px auto; /* Adjusted margin */
}

/* Clear floats after articles if necessary */
article::after {
  content: "";
  display: table;
  clear: both;
}

/* Table Styles */
table {
  font-family: Arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 20px; /* Adjusted margin */
}

table caption {
  caption-side: top;
  font-weight: bold;
  margin-bottom: 10px; /* Adjusted margin */
  font-size: 1.2em; /* Adjusted font size */
}

td, th {
  border: 1px solid #dddddd; /* Adjusted border */
  text-align: center;
  padding: 0.5em; /* Adjusted padding */
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #eeeeee; /* Lighter gray for better readability */
}

/* Focus Styles for Accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid #1a73e8; /* High-contrast outline for visibility */
  outline-offset: 2px;
}

/* Justify Links to the Right */
.right-links {
  text-align: right;
  margin: 10px 0; /* Adjust margin as needed */
}

.right-links a {
  margin-left: 10px; /* Space between links */
  font-size: 1em; /* Ensure readability */
  color: #286ea0; /* Link color */
  text-decoration: none;
}

/* Updated .right-links CSS to exclude .skip-link */
.right-links a:not(.skip-link) {
  color: #1A73E8; /* Blue text */
  background-color: #FFFFFF; /* White background */
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
}

/* Style for Back Links */
.back-link {
  /* Inherits styles from .right-links a */
  /* Additional styles if needed */
  font-size: 1em; /* Ensure readability */
  color: #286ea0; /* Match link color */
  text-decoration: none;
}

.back-link:hover, .back-link:focus {
  text-decoration: underline;
  color: #1a73e8; /* Brighter blue on hover/focus */
}

/* Style for Reveal/Hide Buttons */
.reveal-button {
  background-color: #286ea0;
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9em;
  margin: 10px 0;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.reveal-button:hover, .reveal-button:focus {
  background-color: #1a73e8;
}

/* Answer Sections */
.answer {
  margin-top: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border-left: 4px solid #286ea0;
}

/* Enhanced Figcaption Styles */
#gallery figcaption {
  text-align: justify; /* Justify text for neat alignment */
  line-height: 1.5em; /* Increased line height for better readability */
  margin-top: 10px; /* Space between image and caption */
}

#gallery figcaption ul {
  margin-left: 20px; /* Indent bullet points */
}

#gallery figcaption li {
  margin-bottom: 5px; /* Space between list items */
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  #wrap {
    width: 90%;
  }

  #header h1, #header p {
    width: 100%;
    float: none;
    text-align: center;
  }

  #avmenu, #avmenu-ar, #extras, #extras-ar {
    float: none;
    width: 100%;
    margin: 10px 0; /* Adjusted margin */
  }

  #content, #content-ar, #gallery, #downloads, #about {
    margin: 0 0 20px 0; /* Adjusted margin */
    padding: 0 10px; /* Adjusted padding */
  }

  table, th, td {
    font-size: 0.9em; /* Adjusted font size */
  }

  /* Adjust figure layout for smaller screens */
  #gallery figure {
    flex-direction: column;
    align-items: center;
  }

  #gallery figure img {
    margin: 0 0 10px 0;
  }

  /* Specific White Space for About Page */
  #about {
    margin-left: 180px; /* Increased from 160px to 180px for more white space */
    padding-left: 20px; /* Additional padding */
    text-align: left; /* Ensure left alignment */
  }

  /* Adjust .skip-link for better visibility on smaller screens */
  .skip-link {
    display: block;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
}

/* Updated .skip-link CSS */
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  /* Other styles as needed */
  background-color: #1A73E8; /* Blue background */
  color: #FFFFFF; /* White text for contrast */
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 1000; /* Ensure it appears above other elements */
}

.skip-link:focus {
  position: absolute;
  left: 10px; /* Bring into view */
  top: 10px;  /* Adjust as needed */
  background-color: #1A73E8; /* Retain blue background */
  color: #FFFFFF; /* Ensure white text */
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.5); /* Optional: Add a focus ring */
}