/* General Styles */
body {
  background-color: #111;
  color: #fff;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

/* Header Styles */
header {
  background-color: #222;
  padding: 20px;
  border-bottom: 2px solid #555;
  position: relative;
  z-index: 1000;
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 a {
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
}

nav {
  flex: 1; /* Allow the nav to take available space */
  text-align: right; /* Align nav items to the right */
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
  display: flex;
  gap: 20px;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
  pointer-events: auto;
}

nav ul li a:hover,
nav ul li.active a {
  color: #d2b266;
}

/* Section Styles */
section {
  padding: 40px 20px;
  margin-bottom: 40px; /* Space between sections */
  border-radius: 10px;
}

/* Training Section Styles */
#training {
  background: linear-gradient(135deg, #333, #444);
  border: 2px solid #555;
}

.training-card {
  background-color: #222;
  border-radius: 10px;
  display: flex; /* Use flexbox to align image and details side by side */
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Shadow effect */
  transition: box-shadow 0.3s ease;
}

.training-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* Enhanced shadow on hover */
}

.card-imag {
  flex: 1; /* Allow image to take up equal space */
}

.card-imag img {
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  object-fit: cover; /* Ensure image covers container */
}

.card-detail {
  flex: 2; /* Allow text to take up more space */
  padding: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.7); /* Background with some transparency */
}

.card-descriptio {
  font-size: 1rem;
  margin: 0;
}

/* Achievements Section Styles */
#achievements {
  background: linear-gradient(135deg, #444, #555);
  border: 2px solid #666;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

h2 {
  display: inline-block;
  background-color: #333;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px #d2b266; /* Glowing shadow effect */
  color: #fff;
  font-size: 2rem;
}

/* Achievement Card Styles */
.achievement-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.achievement-card {
  background-color: #222;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  width: 300px;
  height: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px #d2b266; /* Glowing effect on hover */
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-details {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  text-align: center;
}

.achievement-card:hover .card-details {
  opacity: 1;
}

.card-description {
  font-size: 1rem;
  margin: 0;
}

/* Project Card Styles */
#projects {
  background: linear-gradient(135deg, #555, #666);
  border: 2px solid #777;
}

.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.project-card {
  background-color: #222;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  width: 300px;
  height: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.project-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .card-details {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  text-align: center;
}

.project-card:hover .card-details {
  opacity: 1;
}

.project-card .card-description {
  font-size: 1rem;
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    align-items: center; /* Center-align items in mobile view */
  }

  nav {
    text-align: center; /* Center-align nav items in mobile view */
    margin-top: 20px; /* Space between header title and nav */
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li {
    display: block;
  }

  .achievement-card,
  .project-card {
    width: 100%;
    height: auto;
  }

  .card-detail,
  .card-descriptio {
    font-size: 0.9rem;
  }

  #training .training-card {
    flex-direction: column;
  }

  .card-imag {
    flex: none; /* Allow image to adjust with its container */
  }

  .card-imag img {
    width: 100%; /* Ensure the image covers the width */
    height: auto; /* Maintain aspect ratio */
  }

  .card-detail {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  header h1 a {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .achievement-card,
  .project-card {
    width: 100%;
    height: auto;
  }

  .card-detail,
  .card-descriptio {
    font-size: 0.8rem;
  }
}
