/**
 * Ranlo CPT Archive & Template Styles
 * Restores layout CSS for sandbox-driven templates.
 * Town of Ranlo - David Turner Designs
 */

/* === SHARED SINGLE LAYOUT === */
.ranlo-dept-main {
  min-width: 0;
}

.ranlo-dept-content {
  line-height: 1.65;
  color: var(--ranlo-dark);
}

.ranlo-dept-content p {
  margin-bottom: 1rem;
}

.ranlo-sidebar-recruit {
  border-left: 4px solid var(--ranlo-sage);
}

.ranlo-doc-ext {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ranlo-muted);
  text-transform: uppercase;
}

.ranlo-doc-list--full {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ============================================
   STAFF DIRECTORY (/staff-directory/)
   ============================================ */

.ranlo-staff-dept-group {
  margin-bottom: 48px;
}

.ranlo-staff-dept-group:last-child {
  margin-bottom: 0;
}

.ranlo-staff-dept-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ranlo-sage);
}

.ranlo-staff-dept-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ranlo-staff-dept-header h2 a {
  color: var(--ranlo-burgundy);
  text-decoration: none;
}

.ranlo-staff-dept-header h2 a:hover {
  color: var(--ranlo-burgundy-dark);
  text-decoration: underline;
}

.ranlo-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.ranlo-staff-dir-card {
  background: #fff;
  border: 1px solid var(--ranlo-border);
  border-radius: var(--ranlo-radius);
  box-shadow: var(--ranlo-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranlo-staff-dir-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(95, 24, 18, 0.15);
}

.ranlo-staff-dir-photo-link {
  display: block;
  text-decoration: none;
}

.ranlo-staff-dir-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center top;
  background-color: var(--ranlo-cream);
}

.ranlo-staff-dir-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ranlo-burgundy);
  background: linear-gradient(135deg, var(--ranlo-cream) 0%, var(--ranlo-border) 100%);
}

.ranlo-staff-dir-body {
  padding: 18px 20px 20px;
  flex: 1;
}

.ranlo-staff-dir-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.ranlo-staff-dir-body h3 a {
  color: var(--ranlo-burgundy);
  text-decoration: none;
}

.ranlo-staff-dir-body h3 a:hover {
  text-decoration: underline;
}

.ranlo-staff-dir-title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ranlo-sage-dark);
}

.ranlo-staff-dir-contact {
  margin: 0 0 4px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.ranlo-staff-dir-contact a {
  color: var(--ranlo-dark);
  text-decoration: none;
}

.ranlo-staff-dir-contact a:hover {
  color: var(--ranlo-burgundy);
  text-decoration: underline;
}

/* Staff single profile */
.ranlo-staff-profile-card {
  margin-bottom: 32px;
}

.ranlo-staff-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ranlo-burgundy);
  background: var(--ranlo-cream);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ranlo-staff-dept {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.ranlo-staff-dept a {
  color: var(--ranlo-sage-dark);
  font-weight: 600;
  text-decoration: none;
}

.ranlo-staff-dept a:hover {
  color: var(--ranlo-burgundy);
  text-decoration: underline;
}

/* ============================================
   PROJECT STATUS BADGES (archive + single)
   ============================================ */

.ranlo-proj-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ranlo-ps-active { background: #d4edda; color: #155724; }
.ranlo-ps-complete { background: #cce5ff; color: #004085; }
.ranlo-ps-pending { background: #fff3cd; color: #856404; }
.ranlo-ps-planning { background: #e2d9f3; color: #4a235a; }
.ranlo-ps-on-hold { background: #f8d7da; color: #721c24; }

.rpw {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.rpb {
  flex: 1;
  background: #e9ecef;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.rpf {
  height: 100%;
  background: var(--ranlo-burgundy);
  border-radius: 999px;
}

.rpl {
  font-weight: 700;
  color: var(--ranlo-burgundy);
  white-space: nowrap;
  font-size: 0.85rem;
}

.ranlo-pu {
  background: var(--ranlo-cream-light);
  border-left: 4px solid var(--ranlo-burgundy);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--ranlo-radius) var(--ranlo-radius) 0;
}

.ranlo-pu h2 { margin-top: 0; }
.ranlo-pu h2 small { font-size: 0.7em; font-weight: 400; color: var(--ranlo-muted); }

.rml {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rm {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: var(--ranlo-radius);
  background: var(--ranlo-cream-light);
}

.rm-complete { background: #f0faf3; }
.rm-active { background: #fff8e6; }
.rmi { flex-shrink: 0; margin-top: 2px; }
.rm-complete .rmi { color: #28a745; }
.rm-active .rmi { color: #f0a500; }
.rm-pending .rmi { color: #aaa; }
.rmb { display: flex; flex-direction: column; gap: 0.2rem; }
.rmd { font-size: 0.82rem; color: var(--ranlo-muted); }
.rmn { margin: 0.25rem 0 0; font-size: 0.88rem; color: var(--ranlo-dark); }

/* ============================================
   FORMS & DOCUMENTS PAGE (/documents/)
   ============================================ */

.ranlo-fd-page {
  padding-bottom: 48px;
}

.ranlo-fd-body {
  padding: 32px 0 48px;
}

.ranlo-fd-filters {
  background: #fff;
  border: 1px solid var(--ranlo-border);
  border-radius: var(--ranlo-radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--ranlo-shadow);
}

.ranlo-fd-filter-summary {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--ranlo-muted);
}

.ranlo-fd-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.ranlo-fd-filter-group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ranlo-burgundy);
  min-width: 160px;
}

.ranlo-fd-filter-group select,
.ranlo-fd-filter-group input[type="search"] {
  padding: 8px 12px;
  border: 1px solid var(--ranlo-border);
  border-radius: var(--ranlo-radius);
  font-size: 0.9rem;
  background: #fff;
}

.ranlo-fd-filter-submit,
.ranlo-fd-clear {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--ranlo-radius);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.ranlo-fd-filter-submit {
  background: var(--ranlo-burgundy);
  color: var(--ranlo-cream);
}

.ranlo-fd-filter-submit:hover {
  background: var(--ranlo-burgundy-dark);
}

.ranlo-fd-clear {
  background: transparent;
  color: var(--ranlo-burgundy);
  border: 1px solid var(--ranlo-border);
}

.ranlo-fd-clear:hover {
  background: var(--ranlo-cream-light);
}

.ranlo-fd-section {
  margin-bottom: 40px;
}

.ranlo-fd-section h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  color: var(--ranlo-burgundy);
  border-bottom: 3px solid var(--ranlo-sage);
  padding-bottom: 8px;
}

.ranlo-fd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ranlo-fd-card {
  background: #fff;
  border: 1px solid var(--ranlo-border);
  border-left: 4px solid var(--ranlo-burgundy);
  border-radius: var(--ranlo-radius);
  padding: 20px;
  box-shadow: var(--ranlo-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranlo-fd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(95, 24, 18, 0.12);
}

.ranlo-fd-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ranlo-fd-card-icon {
  flex-shrink: 0;
  color: var(--ranlo-burgundy);
  margin-top: 2px;
}

.ranlo-fd-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.ranlo-fd-card-title a {
  color: var(--ranlo-burgundy);
  text-decoration: none;
}

.ranlo-fd-card-title a:hover {
  text-decoration: underline;
}

.ranlo-fd-card-count {
  font-size: 0.8rem;
  color: var(--ranlo-muted);
}

.ranlo-doc-dept {
  font-size: 0.78rem;
  color: var(--ranlo-sage-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ranlo-fd-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--ranlo-muted);
  background: var(--ranlo-cream-light);
  border: 1px dashed var(--ranlo-border);
  border-radius: var(--ranlo-radius);
}

.ranlo-fd-viewall {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ranlo-sage-dark);
  text-decoration: none;
}

.ranlo-fd-viewall:hover {
  color: var(--ranlo-burgundy);
  text-decoration: underline;
}

/* ============================================
   BLOG POST SINGLE
   ============================================ */

.ranlo-post-single .ranlo-post-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 48px 24px;
  align-items: start;
}

.ranlo-post-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 12px;
}

.ranlo-post-entry {
  line-height: 1.7;
}

.ranlo-post-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ranlo-border);
}

.ranlo-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ranlo-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--ranlo-cream);
  border: 1px solid var(--ranlo-border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--ranlo-burgundy);
  text-decoration: none;
}

.ranlo-tag:hover {
  background: var(--ranlo-burgundy);
  color: var(--ranlo-cream);
  border-color: var(--ranlo-burgundy);
}

/* ============================================
   BIRTHDAY FEATURE
   ============================================ */

.ranlo-is-birthday {
  position: relative;
}

.ranlo-birthday-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff8e6 0%, #fde8f0 100%);
  border: 2px solid var(--ranlo-sage);
  border-radius: var(--ranlo-radius);
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.ranlo-birthday-banner {
  position: relative;
  z-index: 2;
}

.ranlo-birthday-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: var(--ranlo-burgundy);
}

.ranlo-birthday-sub {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--ranlo-dark);
}

.ranlo-birthday-name {
  font-weight: 700;
  color: var(--ranlo-burgundy);
}

.ranlo-birthday-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ranlo-muted);
}

.ranlo-birthday-cakes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 1.5rem;
}

.ranlo-confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.ranlo-confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.7;
  animation: ranlo-confetti-fall 3s linear infinite;
}

@keyframes ranlo-confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120px) rotate(360deg); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .ranlo-staff-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .ranlo-fd-grid {
    grid-template-columns: 1fr;
  }

  .ranlo-post-single .ranlo-post-body {
    grid-template-columns: 1fr;
  }

  .ranlo-fd-filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .ranlo-fd-filter-group label {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ranlo-staff-grid {
    grid-template-columns: 1fr;
  }
}
