:root {
  --bg-color: #f6f8fa;
  --text-color: #222;
  --accent-color: #4caf50;
  --toggle-bg: #07710a;
  --toggle-hover: #3cc841;
  --accent-gradient: linear-gradient(90deg, #4caf50, #81c784);
  --bg-gradient: linear-gradient(180deg, #ffffff, #c9c9c9);
  --dmbg-gradient: linear-gradient(180deg, #1c1c1c, #070707);
}

body.dark-mode {
  background: var(--dmbg-gradient);
  --text-color: #e0e0e0;
  --accent-color: #000000;
}

/* ---------- GENERAL ---------- */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
}

/* Smooth section entrance */
main section {
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: none; }
}

/* ---------- HEADER ---------- */
header {
  background: var(--accent-color) url('AlumCreekStatePark.jpg') center/cover no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1rem 2rem;
  position: relative;
  transition: background 0.3s ease;
}

/* Background overlay for readability */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
  z-index: 0;
}

/* keep content above overlay */
.header-content, nav, #theme-toggle {
  position: relative;
  z-index: 1;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo {
  width: 75px;
  height: auto;
}

h3 {
  font-size: 1rem;
}

/* ---------- NAVIGATION ---------- */
nav {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
  color: #c8e6c9;
  transform: scale(1.05);
}

body.dark-mode nav a {
  color: #4caf50;
}
body.dark-mode nav a:hover {
  color: #81c784;
}

/* ---------- THEME TOGGLE ---------- */
#theme-toggle {
  background: var(--toggle-bg);
  border: none;
  border-radius: 24px;
  width: 68px;
  height: 24px;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 2rem;
  transition: background 0.3s ease;
}
#theme-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s ease;
}
body.dark-mode #theme-toggle::before {
  transform: translateX(43px);
}
#theme-toggle:hover {
  background: var(--toggle-hover);
}

/* ---------- DARK-MODE OVERRIDES ---------- */
body.dark-mode header h1,
body.dark-mode h2, body.dark-mode h3 {
  color: #4caf50;
}

body.dark-mode .thumbnail,
body.dark-mode .about-image,
body.dark-mode .collapsible:hover {
  box-shadow: 2px 0px 6px #a2a2a2;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--accent-color) url('BackWoods_Edited.JPG') center/cover no-repeat;
  color: white;
  padding: 1rem;
  text-align: center;
  position: relative;
}
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
  z-index: 0;
}
footer p {
  position: relative;
  z-index: 1;
}
body.dark-mode header::before,
body.dark-mode footer::before {
  background: rgba(0, 0, 0, 0.55);
}

/* ---------- GALLERY SECTION ---------- */
.gallery-section {
  padding: 1.5rem;
  max-width: 1000px;
  margin: auto;
}
h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* ---------- COLLAPSIBLES ---------- */
.collapsible {
  width: 100%;
  color: white;
  background: var(--accent-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  border-radius: 6px;
  margin: 1rem 0;
  padding: 1rem;
  cursor: pointer;
  flex-wrap: wrap;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.collapsible:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex: 1;
  flex-wrap: wrap;
}

/* Animated open/close */
.content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin: 0.5rem 0 1rem;
}
.collapsible.active + .content {
  max-height: 2500px;
}

.sub {
  background: #66bb6a;
  font-size: 1rem;
}
.sub-content { margin-left: 1rem; }

/* ---------- TEXT + IMAGES ---------- */
.text-block {
  flex: 1 1 200px;
}
.text-block p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}
.thumbnail,
.about-image {
  width: 120px;
  border-radius: 6px;
  box-shadow: 2px 0px 6px #001201;
}
.arrow {
  margin-left: 1rem;
  transition: transform 0.3s ease;
}
.collapsible.active .arrow {
  transform: rotate(90deg);
}

.collapsible::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform 0.3s ease;
}
.collapsible.active::after {
  transform: rotate(135deg); /* points down */
}


/* ---------- GALLERY GRID ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
}
.gallery img,
.gallery video {
  width: 100%;
  border-radius: 5px;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.gallery img:hover,
.gallery video:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ---------- ABOUT PAGE ---------- */
.about-section {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
  text-align: center;
}
.about-section h2 {
  margin-bottom: 1.5rem;
}
.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  line-height: 1.6;
  font-size: 1rem;
}
.about-content p {
  max-width: 700px;
  text-align: justify;
}
.about-image {
  width: 100%;
  max-width: 600px;
  margin-top: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  header {
    align-items: center;
    text-align: center;
    padding: 0.8rem 1rem;
  }
  .header-content { justify-content: center; }
  nav { justify-content: center; }
  .logo { width: 65px; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.25rem; margin-top: 0.2rem;   /* tiny gap below h1 if needed */ line-height: 1;}
  h3 { font-size: .80rem; margin-top: 0.2rem;   /* tiny gap below h1 if needed */ line-height: 1;}
  /* force h3 below h1 if they share a flex row */
  .header-content {
    justify-content: flex-start;
    flex-direction: column;      /* stack children vertically */
    align-items: center;         /* optional: center horizontally */
    gap: 0.3rem; /* smaller space between logo and text */
  }
  .logo { width: 60px; }
  .gallery { grid-template-columns: 1fr; }
}
