/* ===== ROOT TOKENS ===== */
:root {
  --bs-primary: #193A18;
  --bs-dark: #137D0F;
  --bs-light: #F5F9F0;
  --bs-body: #2C3E2C;
  --bs-secondary: #77797D;
  --bs-accent: #CEC66D;
  --bs-white: #FFFFFF;
  --bs-muted: #84A65C;
  --bs-soft-green: #D9E798;
}


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

body {
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  background: var(--bs-light);
  color: var(--bs-body);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
} */

/* ========== SIDEBAR ========== */
.sidebar-menu-rail04 {
  width: 260px;
  flex-shrink: 0;
  padding: 2rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 900;
  background: transparent;
}
.sidebar-menu-rail04::-webkit-scrollbar { width: 4px; }
.sidebar-menu-rail04::-webkit-scrollbar-thumb {
  background: rgba(25,58,24,0.15);
  border-radius: 4px;
}
.sidebar-buttons04 {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.menu-btn04 {
  display: flex;
  align-items: center;
  justify-content: left;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  background: var(--bs-muted);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: none;
  cursor: pointer;
  text-align: center;
}
.menu-btn04:hover {
  background: var(--bs-primary);
  color: var(--bs-accent);
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(25,58,24,0.25);
}
.menu-btn04.active04 {
  background: var(--bs-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(19,125,15,0.4);
  transform: translateX(4px);
}

/* ========== BREADCRUMB ========== */
.breadcrumb-custom04 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.breadcrumb-custom04 .home-link04 {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb-custom04 .home-link04:hover { color: var(--bs-accent); }
.breadcrumb-custom04 .separator04 {
  color: #fff; opacity: 0.8; margin: 0 0.2rem;
}
.breadcrumb-custom04 .current-page04 {
  color: #45c467; font-weight: 500;
}

/* ========== MAIN ========== */

.breadcrumb-bar04 {
  background: var(--bs-primary);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-title04 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.35rem;
}
.page-subtitle04 {
  color: var(--bs-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ========== CONTENT PANEL + CARD ========== */
.content-panel04 { display: none; animation: fadeIn04 0.25s ease; }
.content-panel04.active04 { display: block; }
@keyframes fadeIn04 {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-custom04 {
  background: var(--bs-light);
  border-radius: 18px;
  padding: 1.75rem;
  /* box-shadow: 0 6px 24px rgba(0,0,0,0.06); */
  margin-bottom: 1.5rem;
  /* border-left: 5px solid var(--bs-primary); */
}
.card-custom04 h2 {
  font-size: 1.35rem;
  color: var(--bs-primary);
  margin-bottom: 0.25rem;
}

/* ========== TABLE ========== */
.doc-table-wrap04 { overflow-x: auto; margin-top: 1rem; }
.doc-table04 {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--bs-white);

}
.doc-table04 thead th {
  background: #e2e6e0;
  color: var(--bs-primary);
  border-bottom: 2px solid var(--bs-accent);
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.doc-table04 tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bs-soft-green);
  vertical-align: middle;
}
.doc-table04 tbody tr:hover { background: var(--bs-light); }
.doc-table04 .actions04 {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-view04,
.btn-download04 {
  all: unset;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--bs-soft-green);
  transition: all 0.15s;
  display: inline-block;
  text-decoration: none;
}
.btn-view04 {
  background: var(--bs-white);
  color: var(--bs-primary);
}
.btn-view04:hover { background: var(--bs-soft-green); }
.btn-download04 {
  background: var(--bs-primary);
  color: var(--bs-white);
  border-color: var(--bs-primary);
}
.btn-download04:hover {
  background: var(--bs-dark);
  border-color: var(--bs-dark);
}
.doc-empty04 {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--bs-secondary);
  font-size: 0.92rem;
}

/* ========== PROJECTS GRID ========== */
.projects-grid04 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.project-card04 {
  background: var(--bs-white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  border: 1px solid var(--bs-soft-green);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.project-card04:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(25,58,24,0.15);
}
.project-card04 .pc-body04 {
  padding: 1rem 1.15rem 1.25rem;
}
.project-card04 h3 {
  color: var(--bs-primary);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.project-card04 p {
  color: var(--bs-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ==========================================
   GALLERY GRID (INSIDE FOLDERS)
   ========================================== */
.gallery-grid04 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px; /* Slight gap for neatness */
  padding: 10px 0;
}

.gallery-grid04 img {
  width: 100%;
  height: 170px; /* Fixed height so the grid is perfectly aligned */
  object-fit: cover; /* Maintains aspect ratio without stretching/squashing */
  border-radius: 8px;
  cursor: pointer;
  background: var(--bs-soft-green);
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-grid04 img:hover { 
  transform: scale(1.03); /* Slight zoom effect on hover */
  opacity: 0.9; 
}

/* Responsive adjustments for gallery */
@media (max-width: 860px) {
  .gallery-grid04 { 
    grid-template-columns: repeat(2, 1fr); 
  }
}


/* ========== PAGINATION ========== */
.pagination04 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem 0.75rem;
  flex-wrap: wrap;
}
.page-btn04 {
  all: unset;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--bs-soft-green);
  background: var(--bs-white);
  color: var(--bs-primary);
  transition: all 0.15s;
}
.page-btn04:hover { background: var(--bs-soft-green); }
.page-btn04.active04 {
  background: var(--bs-primary);
  color: var(--bs-white);
  border-color: var(--bs-primary);
}
.page-btn04:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info04 {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  margin-left: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar-menu-rail04 {
    width: 100%; min-width: unset; height: auto;
    position: relative; flex-direction: row;
    align-items: center; padding: 1rem;
    overflow-x: auto;
  }
  .sidebar-buttons04 { flex-direction: row; }
  .main-wrap04 { padding: 1.25rem; }
  .gallery-grid04 { grid-template-columns: repeat(2, 1fr); }
}



/* ==========================================
   FOLDER CARDS (MATCHING DESIGN)
   ========================================== */
.projects-folders04 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.folder-card04 {
  background: var(--bs-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #E5E5E5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.folder-card04:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(25,58,24,0.1);
}

/* Cover Image */
.folder-cover04 {
  width: 100%;
  height: 200px; /* Fixed height for uniformity */
  background: #f0f0f0;
  overflow: hidden;
}

.folder-cover04 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folder-no-image04 {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary);
  font-weight: 600;
}

/* Body & Text */
.folder-body04 {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.folder-body04 h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 1.5rem 0;
}

/* Footer (Badge + View Button) */
.folder-footer04 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.folder-badge04 {
  background: #E8EFE8;
  color: #4A6A4A;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.btn-view-gallery04 {
  color: #1E6B25;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.btn-view-gallery04:hover {
  color: var(--bs-dark);
  text-decoration: underline;
}

/* Utility Classes used in the view */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-3 { margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }
.ml-3 { margin-left: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Pagination disabled state for PHP links */
.page-btn04.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================
   LAYOUT CONTAINER & FIX FOR GAP
   ========================================== */
.rsw-container04 {
  max-width: 1550px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

.rsw-page-layout04 {
  display: flex;
  align-items: flex-start; /* Aligns sidebar and content at the top */
  width: 100%;
  gap: 2rem; /* Adds space between sidebar and content */
  margin-top: 1.5rem; /* Space between hero banner and flex layout */
}

/* Ensure main content takes remaining space */
.main-wrap04 {
  flex: 1;
  min-width: 0;
  padding: 0;
}


/* Responsive adjustments for folders */
@media (max-width: 1024px) {
  .projects-folders04 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .projects-folders04 { 
    grid-template-columns: repeat(2, 1fr); 
  }
}



.back-to-folder-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  
  /* Base State Colors */
  background-color: var(--bs-secondary); 
  color: var(--bs-white);
  border: 1px solid var(--bs-primary);
  
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(25, 58, 24, 0.2); /* Slight tinted shadow */
  transition: all 0.25s ease-in-out;
  cursor: pointer;
  white-space: nowrap; 
}

/* Hover State */
.back-to-folder-btn:hover {
  background-color: var(--bs-dark);
  color: var(--bs-white);
  border-color: var(--bs-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(25, 58, 24, 0.15);
  text-decoration: none; 
}

/* Active/Click State */
.back-to-folder-btn:active {
  transform: translateY(1px);
  box-shadow: none;
  background-color: var(--bs-soft-green); /* A nice soft green flash on click */
}

/* SVG Arrow Animation */
.back-to-folder-btn svg {
  transition: transform 0.25s ease-in-out;
}

.back-to-folder-btn:hover svg {
  transform: translateX(-4px); /* Arrow slides left on hover */
}

/* Layout Fixes */
.d-flex.align-center {
  display: flex;
  align-items: center;
  flex-wrap: wrap; 
}