/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  font-size: 12px;
}

/* Container for consistent width */
.container {
  width: 80%; /* Adjusted for smaller screens */
  max-width: 1200px;
  margin: 0 auto;
}

/* About Page Container */
.about-container {
  width: 80%; /* Adjusted for smaller screens */
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 0px;
}

/* Header and Menu */
header {
  background-color: #308716;
  color: #fff;
  padding: 1em;
}

.title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Wrap items on smaller screens */
}

.top-right-menu {
  display: flex;
  gap: 15px;
}

.top-right-menu a {
  color: #fff;
  text-decoration: none;
}

.top-right-menu a:hover {
  text-decoration: underline;
}

/* Justify all paragraphs */
p {
  text-align: justify;
}

/* Banner Section */
.banner {
  position: relative;
  height: 300px;
  overflow: hidden;
  margin-top: 1em;
}

.banner-image {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease-in-out;
  opacity: 0;
}

#banner1 {
  background-image: url('https://sergiovidalluengo.github.io/MyWebsite/images/banner/Magnetosphere_rendition.jpg');
}
#banner2 {
  background-image: url('https://sergiovidalluengo.github.io/MyWebsite/images/banner/Church_of_light.jpg');
}
#banner3 {
  background-image: url('https://sergiovidalluengo.github.io/MyWebsite/images/banner/gicindustry.png');
}

/* Main Content Panels */
main {
  display: flex;
  gap: 1em;
  max-width: 1200px;
  margin: 2em auto;
  padding: 1em;
}

.left-panel, .center-panel, .right-panel {
  padding: 1em;
  background-color: #f0faf0;
  border-radius: 5px;
}

.left-panel, .right-panel {
  flex: 0.7;
}
.center-panel {
  flex: 2.6;
}

/* About Page Layout */
.about-content {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.main-text {
  flex: 3; /* Larger space for main text */
  text-align: justify;
}

.about-right-panel {
  flex: 1; /* Smaller space for side content */
  padding: 1em;
  background-color: #f9f9f9;
  border-left: 2px solid #ddd; /* Optional separator line */
  font-size: 0.9em; /* Slightly smaller text size */
  line-height: 1.4;
  color: #555; /* Subtle text color */
}

.about-right-panel p {
  margin-bottom: 1em;
}

/* Footer */
footer {
  margin-top: 2em;
  padding: 1em;
  background-color: #308716;
  color: #fff;
  text-align: center;
}

/* RESPONSIVE DESIGN */

/* Adjust layout for smaller screens */
@media (max-width: 768px) {
  .container,
  .about-container {
    width: 95%; /* Full width with slight padding */
  }

  .title-section {
    flex-direction: column; /* Stack title and menu vertically */
    align-items: center;
  }

  .top-right-menu {
    flex-direction: column; /* Stack menu items vertically */
    gap: 10px;
    align-items: center;
  }

  .banner {
    height: 200px; /* Reduce banner height */
  }

  main {
    flex-direction: column; /* Stack panels vertically */
  }

  .left-panel, .center-panel, .right-panel {
    flex: unset; /* Remove flex growth */
    width: 100%; /* Full width */
  }

  .about-content {
    flex-direction: column; /* Stack content vertically */
  }

  .main-text, .about-right-panel {
    width: 100%; /* Full width for each section */
    flex: unset; /* Remove flex growth */
  }
}
