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

:root {
  --primary-color: #2c5f41;
  --secondary-color: #4a7c59;
  --accent-color: #8fb3a0;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--white);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.3s;
  font-weight: 500;
}

.nav-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  aspect-ratio: 1;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.gallery-item--video {
  cursor: pointer;
}

.gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.4rem;
  padding-left: 0.3rem;
  pointer-events: none;
  transition: background 0.2s ease;
}

.gallery-item--video:hover .gallery-play {
  background: rgba(0, 0, 0, 0.8);
}

/* Downloads List */
.downloads-list {
  list-style: none;
  margin-top: 2rem;
}

.download-item {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.download-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-hover);
}

.download-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.download-item a:hover {
  text-decoration: underline;
}

.download-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

.download-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.download-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.download-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

.download-tag {
  background: var(--primary-color, #3a7d44);
  color: var(--white, #fff);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* News Section */
.news-list {
  list-style: none;
  margin-top: 2rem;
}

.news-item {
  background: var(--white);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.news-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.news-content {
  line-height: 1.8;
  color: var(--text-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s, transform 0.2s;
  font-weight: 500;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-danger {
  background: #e74c3c;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-secondary {
  background: var(--text-light);
}

.btn-secondary:hover {
  background: #5a6c7d;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Admin Dashboard */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-section {
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.admin-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

/* Login Page */
.login-container {
  max-width: 400px;
  margin: 5rem auto;
  background: var(--white);
  padding: 3rem;
  border-radius: 10px;
  box-shadow: var(--shadow-hover);
}

.login-container h1 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal-content {
  background-color: var(--white);
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-hover);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.close {
  color: var(--text-light);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: none;
}

.close:hover {
  color: var(--text-dark);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--accent-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  transition: border-color 0.3s;
}

.file-upload:hover {
  border-color: var(--primary-color);
}

.file-upload input[type="file"] {
  margin-top: 1rem;
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

/* Nav active state */
.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.site-footer .admin-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-light);
  opacity: 0.4;
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.2s ease;
}

.site-footer .admin-link:hover {
  opacity: 1;
}

/* Area map on home page */
.area-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Quick links grid (home page) */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Form helpers */
.form-error {
  color: #e74c3c;
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.form-input--spaced {
  margin-top: 0.5rem;
}

/* Button modifiers */
.btn--block { width: 100%; }
.btn--inline { margin-left: 0.5rem; }
.btn--spaced { margin-top: 1rem; }

/* Login */
.login-back {
  text-align: center;
  margin-top: 1rem;
}

.login-back a {
  color: var(--primary-color);
  text-decoration: none;
}

/* News on home page */
.news-item--compact {
  margin-bottom: 1rem;
}

.news-thumb {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.news-hero {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.news-readmore {
  color: var(--primary-color);
  text-decoration: none;
  margin-top: 0.5rem;
  display: inline-block;
}

/* Gallery sections */
.gallery-event {
  margin-bottom: 3rem;
}

.gallery-event__title {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.gallery-item img,
.gallery-item video {
  cursor: pointer;
}

/* Lightbox */
.modal--lightbox {
  text-align: center;
}

.modal--lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--white);
  font-size: 3rem;
  z-index: 2001;
}

.modal-content--image {
  max-width: 90%;
  max-height: 90vh;
  margin: 5vh auto;
  display: block;
  border-radius: 10px;
  background: transparent;
  width: auto;
  padding: 0;
  box-shadow: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: var(--white);
  border: none;
  font-size: 2rem;
  width: 3rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2001;
  transition: background 0.2s ease;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-nav--prev {
  left: 1rem;
  border-radius: 0 6px 6px 0;
}

.lightbox-nav--next {
  right: 1rem;
  border-radius: 6px 0 0 6px;
}

/* Board */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.board-card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.board-card__photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-color);
  background: #f0f0f0;
}

.board-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-light);
}

.board-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.board-card__role {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.board-card__bio {
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.board-card__contact p {
  margin: 0.25rem 0;
}

.board-card__contact a {
  color: var(--primary-color);
}

/* Admin dashboard */
.admin-title { color: var(--primary-color); }
.admin-list { margin-top: 2rem; }

.admin-board-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-board-row__photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-color);
  flex-shrink: 0;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-light);
}

.admin-board-row__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-board-row__body { flex: 1; }
.admin-board-row__body h3 { color: var(--primary-color); margin-bottom: 0.25rem; }
.admin-board-row__role { color: var(--secondary-color); font-weight: 600; margin-bottom: 0.5rem; }

.image-preview { margin-top: 1rem; }
.image-preview img {
  max-width: 300px;
  border-radius: 5px;
  border: 2px solid var(--accent-color);
}
.image-preview--avatar img {
  max-width: 150px;
  border-radius: 50%;
}

.upload-message { margin-top: 1rem; }
.upload-message--success { color: green; }
.upload-message--error { color: red; }

.gallery-item--admin { position: relative; }
.gallery-item__delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
