
/* CSS Variables for easy theme management */
:root {
  --emerald: #38a169;
  --emerald-dark: #276749;
  --emerald-light: #a7f3d0;
  --text-color: #234e52;
  --text-color-light: #c6f6d5;
  --bg-light: #f0f6f5;
  --bg-white: #fff;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-fast: 0.25s ease;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
  background-color: var(--emerald);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  user-select: none;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.nav-logo {
  color: white;
  font-size: 28px;
  font-weight: 700;
  cursor: default;
}
.nav-logo:focus {
  outline: 3px solid var(--emerald-light);
  outline-offset: 3px;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.nav-links a {
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  font-weight: 600;
  border-radius: 4px;
  transition: background-color var(--transition-fast);
}
.nav-links a:hover,
.nav-links a:focus {
  background-color: var(--emerald-dark);
  outline: none;
  box-shadow: 0 0 5px var(--emerald-light);
}
.nav-links a[aria-current="page"] {
  background-color: var(--emerald-dark);
  pointer-events: none;
  cursor: default;
}

/* Hamburger menu */
#nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  width: 30px;
  height: 24px;
  justify-content: space-between;
}
.nav-toggle-label span {
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease;
}

/* Responsive nav */
@media (max-width: 768px) {
  .nav-toggle-label {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: var(--emerald);
    transition: max-height 0.3s ease;
    margin-top: 10px;
    border-radius: 0 0 8px 8px;
  }
  #nav-toggle:checked + .nav-toggle-label + .nav-links {
    max-height: 320px; /* Enough for all links */
  }
  .nav-links a {
    padding: 12px 20px;
    border-top: 1px solid var(--emerald-dark);
  }
  /* Animate hamburger to X */
  #nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  #nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Main content wrapper */
.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  display: flex;
  gap: 30px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Info Box */
.info-box {
  flex: 3;
  background-color: var(--bg-white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.1);
  min-height: 320px;
  font-size: 1.1rem;
  color: var(--text-color);
}
.info-box h2 {
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 18px;
}
.info-box ul {
  list-style: disc inside;
  margin-top: 15px;
}
.info-box ul li {
  margin-bottom: 12px;
}

/* Sidebar */
.sidebar {
  flex: 1;
  background-color: var(--emerald-dark);
  color: var(--emerald-light);
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.1);
  min-height: 320px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}
.sidebar h3 {
  font-size: 1.7rem;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--emerald-light);
  padding-bottom: 8px;
  font-weight: 700;
}
.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 25px;
}
.sidebar ul li {
  margin-bottom: 14px;
}
.sidebar ul li a {
  color: var(--text-color-light);
  text-decoration: none;
  font-size: 1.15rem;
  transition: color var(--transition-fast);
}
.sidebar ul li a:hover,
.sidebar ul li a:focus {
  color: var(--emerald);
  outline: none;
  text-decoration: underline;
}

/* Sidebar toggle label */
#sidebar-toggle {
  display: none;
}
#sidebar-toggle-label {
  display: none;
  background-color: var(--emerald);
  color: white;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  margin: 20px auto 0;
  width: 90%;
  max-width: 350px;
  text-align: center;
  user-select: none;
  transition: background-color var(--transition-fast);
  user-select: none;
}
#sidebar-toggle-label:hover,
#sidebar-toggle-label:focus {
  background-color: var(--emerald-dark);
  outline: none;
}

/* Responsive sidebar toggle */
@media (max-width: 900px) {
  #sidebar-toggle-label {
    display: block;
  }
  /* Sidebar hidden by default on small */
  .sidebar {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
  }
  /* Show sidebar on toggle */
  #sidebar-toggle:checked + #sidebar-toggle-label + main .sidebar {
    max-height: 600px;
    opacity: 1;
    overflow-y: auto;
    margin-top: 20px;
  }
  /* Stack main content vertically */
  .main-content {
    flex-direction: column;
  }
}

/* Hero Section */
.hero {
  width: 100%;
  height: 80vh;
  background-image: url('https://images.unsplash.com/photo-1613376023733-0a73315d9b06?q=80&w=1740&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 20px;
  box-sizing: border-box;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.3);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  border-radius: 12px;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  user-select: none;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
}
.hero-content p {
  font-size: 1.4rem;
  line-height: 1.5;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

/* Responsive hero text */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
}
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}

/* Headings */
h1, h2, h3 {
  color: var(--emerald);
  font-weight: 700;
}

/* Footer */
.footer {
  background-color: var(--emerald);
  color: white;
  text-align: center;
  padding: 15px 10px;
  font-size: 0.9rem;
  width: 100%;
  margin-top: auto;
  user-select: none;
  box-shadow: 0 -2px 8px rgb(0 0 0 / 0.15);
}

/* Form Styling (Contact Page) */
form {
  margin-top: 20px;
  font-size: 1.1rem;
}
form label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: var(--emerald-dark);
}
form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--emerald-light);
  border-radius: 6px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color var(--transition-fast);
}
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
  border-color: var(--emerald);
  outline: none;
  box-shadow: 0 0 5px var(--emerald-light);
}
form button {
  background-color: var(--emerald);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  margin-top: 10px;
  user-select: none;
}
form button:hover,
form button:focus {
  background-color: var(--emerald-dark);
  outline: none;
  box-shadow: 0 0 10px var(--emerald-light);
}

/* Focus outline for keyboard users everywhere */
a:focus,
button:focus,
input:focus,
textarea:focus,
label:focus,
#sidebar-toggle-label:focus,
.nav-toggle-label:focus {
  outline: 3px solid var(--emerald-light);
  outline-offset: 2px;
}

/* Scrollbar styling for sidebar on desktop and toggled */
.sidebar::-webkit-scrollbar {
  width: 10px;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--emerald-light);
  border-radius: 10px;
}
.sidebar::-webkit-scrollbar-track {
  background-color: var(--emerald-dark);
}

/* Smooth transitions */
.sidebar,
.nav-links a,
form input,
form textarea,
form button {
  transition: all 0.3s ease;
}
