/* Base styles */
:root {
    --primary-color: blueviolet;
    --secondary-color: #333;
    --text-color: #333;
    --background-color: #f4f4f4;
    --border-color: #ccc;
    --link-color: blue;
    --link-color-hover: darkblue;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* General styling for header and footer */
header, footer {
    padding: 1rem 0;
    background-color: var(--primary-color);
    color: #fff;
    align-items: center;
    text-align: center;
}

/* Header navigation styles */
header nav {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

/* Logo styles */
.logo h1 {
    margin: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    float: left;
}

.nav-links{
    display: flex;
    flex: 1;
    justify-content: flex-end; 
    list-style: none;
    gap: 5px;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background-color: var(--primary-color);
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #555;
}

.nav-links a.active {
    background-color: var(--secondary-color);
    text-decoration: underline;
    font-weight: bold;
}

/* Hamburger menu (initially hidden) */
.hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    display: none;
}

/* Main Content Styling */
main {
  padding: 2rem;
  text-align: center;
  margin: 0 auto;
  max-width: 1200px;
}

.titled-container {
  margin: 20px 0;
}

/* Responsive Grid Layout */
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.res-grid section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease-in-out;
}

.res-grid section:hover {
  transform: scale(1.05);
}

.res-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 10px;
}

.res-grid .label {
  color: var(--primary-color);
  font-weight: bold;
}

/*  Media Query for Smaller Screens */
@media (max-width: 768px) { 
    .nav-links {
      display: none; 
      flex-direction: column;  
      position: absolute;
      top: 0;  
      right: 0;
      background-color: rgba(var(--primary-color-rgb),0.95);
      width: auto;
      text-align: right;
      padding: 1rem;
      margin-top: 0;
      z-index: 10;
      border-radius: 0 0 0 10px;
    }
  
    .nav-links.active {  
      display: flex !important;
    }

    .nav-links li {
      margin: 0.5rem 0;
    }
  
    .hamburger {
      display: block;
    }
  
    header nav {
      padding: 0.5rem;
    }
  
    .logo h1 {
      font-size: 1.2rem;
    }
  }

/* Accessibility styles */
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}
  
/* Footer styles */
footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    padding: 10px;
    margin-top: 10px;
}

footer div {
    margin: 5px 0;
    visibility: visible;
    display: block;
}