/* Import Google Poppins font from within the CSS file */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif; /* Now using Google's Poppins font */
  background-color: #f4f6f8; /* Light background for the page */
  color: #333; /* Default text color */
  margin: 0;
  padding: 0;
}

/* Main grid layout */
.layout {
  width: 100%;
  display: grid;
  grid:
    "header body rightSide" auto
    "leftSide body rightSide" 1fr
    "footer footer footer" auto
    / 0.5fr 4fr 1fr;
  gap: 0;
}

/* Header Styling */
.header {
  grid-area: header;
  text-align: center;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #5b83c3 0%, #3b5998 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.header p {
  margin: 8px 0 0;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Left Side Navigation */
.leftSide {
  grid-area: leftSide;
  background: #ffffff;
  padding: 20px;
  border-right: 1px solid #ddd;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05);
}

.leftSide ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.leftSide li {
  margin-bottom: 10px;
}

.leftSide a {
  text-decoration: none;
  color: #3b5998;
  font-weight: 500;
  transition: color 0.3s;
}

.leftSide a:hover {
  color: #5b83c3;
  text-decoration: underline;
}

/* Main Body Section */
.body {
  grid-area: body;
  padding: 20px;
  width: 100%;
  background-color: #fff;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
}

/* Sticky Section Titles */
.body h2 {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 10px;
  z-index: 10;
  border-bottom: 2px solid #ddd;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  font-size: 1.6rem;
}

.section {
  position: relative;
  margin-bottom: 2em;
}

.section h2 {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 10px;
  border-bottom: 2px solid #ddd;
  z-index: 1;
  transition: all 0.3s ease-in-out;
  scroll-margin-top: 20px;
}

/* Right Side (Fixed Image) */
.rightSide {
  grid-area: rightSide;
  position: fixed;
  right: 0;
  top: 0;
  width: auto;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fixed-image {
  max-width: 100%;
  height: 100vh;
  object-fit: cover;
}

/* Footer Styling */
.footer {
  grid-area: footer;
  background: #fff;
  padding: 15px;
  text-align: center;
  border-top: 1px solid #ddd;
}

.footer p {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

/* MEDIA QUERY FOR MOBILE (max-width: 768px) */
@media (max-width: 768px) {
  .layout {
    /* Restructure the grid at smaller screens */
    grid:
      "header body" auto 
      "leftSide body" 1fr
      "leftSide footer" auto
      / 0.5fr 5.5fr; /* Two columns: narrower for leftSide, wider for body */
    column-gap: 10px; /* Space between leftSide and body */
  }

  .rightSide {
    display: none; /* Hide the right side entirely on mobile */
  }

  .body {
    width: 100%;
    max-width: none;
  }

  /* Optional: tweak leftSide for comfort on mobile */
  .leftSide {
    padding-right: 5px;
    position: static; /* Ensure it's no longer sticky on mobile */
    height: auto;     /* Let it size naturally */
    overflow-y: visible; /* Remove scroll if desired */
  }
}
