
/* ================================
   Base Stylesheet
   ================================ */
:root {
  --primary-green: #3A6B35;
  --primary-green-dark: #2A4F27;
}

/* Base reset */
html, body {
    margin: 0;
    padding: 20px;   /* Added padding for breathing room */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: #f9fafb;
    color: #333;
    line-height: 1.5;
}


/* Headings */
h1, h2, h3, h4 {
    margin: 0.5em 0;
    font-weight: 600;
    color: #222;
}
h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }

/* Paragraphs */
p {
    margin: 0.5em 0;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    margin: 0.5em 0;
    padding-left: 1.2em;
}
li {
    margin: 0.3em 0;
    list-style: none;
}
/* Normal clickable links */
li.clickable a {
    font-weight: normal;
}

/* Clickable items that are also parents */
li.clickable-parent > a {
    font-weight: 600; /* heavier font */
}
/* Target any UL that is inside another UL */
ul ul li:last-child::after {
    content: "";
    display: block;
    border-bottom: 1px solid #ccc; /* subtle separator line */
    margin-top: 4px;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
th, td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}
th {
    background-color: #f0f0f0;
    font-weight: 600;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Forms */
form {
    margin: 0.5em 0;
}
input, select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font: inherit;
}
input:focus, select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Buttons */
button {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 3px;
    background-color: #0066cc;
    color: #fff;
    font: inherit;
    cursor: pointer;
}
button:hover {
    background-color: #005bb5;
}
button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Inline elements */
span {
    display: inline-block;
    margin-right: 4px;
}

/* ================================
   Admin Portal Styling (Green Theme)
   ================================ */
.adminPortalHeader {
  display: flex;
  justify-content: center;  /* center the row */
  align-items: center;      /* vertically align logo and text */
  gap: 15px;                /* space between logo and heading */
  margin-bottom: 20px;
}

.adminPortalIMG {
  height: 60px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Main heading */
.adminPortalH1 {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;      /* ensure centered */
  color: var(--primary-green);
  margin: 0.5rem auto 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--primary-green-dark);
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* Subheading */
.adminPortalH2 {
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;      /* ensure centered */
  color: var(--primary-green-dark);
  margin-bottom: 1.5rem;
}

/* Navigation list */
.adminPortalUL {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  max-width: 600px;
  background: #fdfbff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

/* List items */
.adminPortalLI {
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 1rem;
  transition: background 0.3s ease;
}
.adminPortalLI:last-child {
  border-bottom: none;
}
.adminPortalLI:hover {
  background: rgba(58,107,53,0.08); /* primary green tint */
}

/* Links */
.adminPortalA {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary-green-dark);
  display: block;
  transition: color 0.3s ease;
}
.adminPortalA:hover {
  color: var(--primary-green);
}

/* Paragraphs / notes */
.adminPortalP {
  font-size: 0.95rem;
  color: #444;
  text-align: center;
  margin-top: 1rem;
  line-height: 1.6;
  background: #f7fdf8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(58,107,53,0.1);
}
/* ================================
   Image Manager Styling (Green Theme)
   ================================ */
/* Page body */
.imageManagerBody {
  font-family: Arial, sans-serif;
  background: #f7fdf8;
  color: #333;
  padding: 2rem;
}

/* Header */
.imageManagerHeader {
  text-align: center;
  margin-bottom: 2rem;
}
.imageManagerTitle {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-green);
  border-bottom: 3px solid var(--primary-green-dark);
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* Messages */
.imageManagerMessage {
  text-align: center;
  font-weight: 600;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 600px;
}
.imageManagerMessage:contains("✅") {
  background: #eaf7ea;
  color: var(--primary-green-dark);
}
.imageManagerMessage:contains("❌") {
  background: #fdeaea;
  color: #b00;
}

/* Gallery */
.imageManagerGallery {
  margin-bottom: 2rem;
}
.imageManagerGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.imageManagerItem {
  width: 140px;
  text-align: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.imageManagerItem:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.imageManagerThumb {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.imageManagerFilename {
  font-size: 0.85rem;
  color: var(--primary-green-dark);
  font-weight: 600;
}

/* Upload form */
.imageManagerUpload {
  text-align: center;
}
.imageManagerForm {
  display: inline-block;
  background: #fff;
  padding: 1rem 1.5rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.imageManagerLabel {
  font-weight: 600;
  color: var(--primary-green-dark);
}
.imageManagerInput {
  margin: 0.75rem 0;
}
.imageManagerButton {
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.imageManagerButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58,107,53,0.25);
}

/* Footer */
.imageManagerFooter {
  text-align: center;
  margin-top: 2rem;
}
.imageManagerBackLink {
  color: var(--primary-green-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}
.imageManagerBackLink:hover {
  color: var(--primary-green);
}
.imageManagerIcon {
  width: 64px;   /* or whatever size you want */
  height: 64px;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* ================================
   Editor Index Page (Card-Based Layout)
   ================================ */
.editorIndex {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
.editorIndex__header {
  text-align: center;
  margin-bottom: 3rem;
}

.editorIndex__title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-green);
  margin: 0.5rem auto 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--primary-green-dark);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.editorIndex__subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-top: 0.75rem;
}

/* Section grouping */
.editorIndex__sections {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.editorIndex__section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e5e5e5;
}

.editorIndex__sectionTitle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green-dark);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e5e5;
}

/* Card grid */
.editorIndex__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Individual card */
.editorIndex__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fdfbff;
  border: 2px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 160px;
}

.editorIndex__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(58,107,53,0.15);
  border-color: var(--primary-green);
  background: #f7fdf8;
}

.editorIndex__cardIcon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
}

.editorIndex__cardIcon img {
  width: 100%;
  height: 100%;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  display: block;
}

.editorIndex__card:hover .editorIndex__cardIcon {
  transform: scale(1.1);
}

.editorIndex__cardTitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-green-dark);
  margin: 0.5rem 0 0.5rem;
  text-align: center;
}

.editorIndex__cardPath {
  font-size: 0.8rem;
  color: #888;
  font-family: 'Courier New', monospace;
  margin: 0.25rem 0;
  text-align: center;
  word-break: break-all;
}

.editorIndex__cardBreadcrumb {
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0 0;
  text-align: center;
  font-style: italic;
}

/* Footer */
.editorIndex__footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e5e5;
}

.editorIndex__backLink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-green-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: #f7fdf8;
  border: 2px solid var(--primary-green);
  transition: all 0.3s ease;
}

.editorIndex__backLink:hover {
  background: var(--primary-green);
  color: white;
  transform: translateX(-4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .editorIndex__cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .editorIndex__card {
    padding: 1.25rem;
    min-height: 140px;
  }

  .editorIndex__cardIcon {
    font-size: 2.5rem;
    width: 48px;
    height: 48px;
  }

  .editorIndex__cardIcon img {
    max-width: 48px;
    max-height: 48px;
  }

  .editorIndex__title {
    font-size: 1.8rem;
  }
}
