/* --- Basic Reset and Body Styles --- */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background-color: #EDFFE4;
  color: #333;
}

/* --- Mobile-First Layout (Default) --- */

/* Main container is now a simple block element by default */
.website-container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white; /* Changed from #fff as it conflicts with the palette */
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Sidebar becomes a top navigation bar on mobile */
.sidebar {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex; /* Arrange links horizontally */
  justify-content: space-around; /* Distribute links evenly */
}

.sidebar ul li {
  margin-bottom: 0;
}

.sidebar ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1.1em;
  padding: 10px;
  display: block;
}

.sidebar ul li a.active {
    color: #488F22;
    font-weight: bold;
}

.sidebar .nav-icon {
  width: 20px;
  height: 20px;
  /* Aligns the icon nicely with the link text */
  vertical-align: text-bottom;
  margin-right: 8px;
}

/* Adjust padding for main content on mobile */
.main-content {
  padding: 20px; /* Adjust padding as needed */
}

/* Handwritten font for the site title */
.site-header h1 {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    font-size: 2.2em;
    color: #2A3A21;
    margin-bottom: 20px;
}

/* --- Homepage Specific Mobile Styles --- */
.logo-placeholder img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

/* Stack profile picture and text vertically on mobile */
.intro-section {
  display: flex;
  flex-direction: column; /* Stack vertically */
  align-items: center;   /* Center items */
  text-align: center;
  gap: 20px;
}

.profile-picture {
  border-radius: 50%;
  border: 3px solid #ddd;
  width: 150px;
  height: 150px;
  object-fit: cover;
  object-position: top;
}

.intro-text h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 2em;
  margin-top: 0;
}

.intro-text p {
  line-height: 1.6;
  color: #2A3A21;
}


/* --- Gallery and Lightbox Styles --- */
#gallery-grid {
  display: grid;
  /* On mobile, columns are at least 150px wide */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.gallery-item img {
  width: 100%;
  height: 150px; /* Smaller height for mobile thumbnails */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

/* Modal Content (The Image) */
.modal-content {
  display: block;
  max-width: 90%;
  max-height: 85vh;
  animation-name: zoom;
  animation-duration: 0.4s;
}

@keyframes zoom {
  from {transform: scale(0.5)}
  to {transform: scale(1)}
}

/* The Close Button */
.close-button {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #f1f1f1;
  font-size: 35px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

/* Slideshow Navigation Buttons */
.prev-button, .next-button {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 12px;
  margin-top: -30px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.4s ease;
  user-select: none;
}

.next-button { right: 0; border-radius: 3px 0 0 3px; }
.prev-button { left: 0; border-radius: 0 3px 3px 0; }
.prev-button:hover, .next-button:hover { background-color: rgba(0,0,0,0.4); }


/* --- Tablet and Desktop Styles (min-width: 768px) --- */
@media (min-width: 768px) {
  /* Re-apply the two-column grid layout */
  .website-container {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

  /* Restore sidebar styles */
  .sidebar {
    padding: 40px 20px;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
  }

  .sidebar ul {
    flex-direction: column; /* Stack links vertically again */
    justify-content: flex-start;
  }

  .sidebar ul li {
    margin-bottom: 20px;
  }
  
  .sidebar ul li a {
    font-size: 1.2em;
  }

  /* Restore main content padding */
  .main-content {
    padding: 40px;
  }
  
  /* Restore homepage intro section layout */
  .intro-section {
    flex-direction: row; /* Side-by-side */
    align-items: flex-start;
    text-align: left;
    gap: 30px;
  }

  /* Make gallery thumbnails larger on desktop */
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-item img {
    height: 250px;
  }
}
