/* ==========================================================================
   RRCHNM Custom Styles
   Replaces Elementor page-builder layouts with CSS-only equivalents.
   Layout styles for rrchnm-hugo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --rrchnm-red: #C32A26;
  --rrchnm-bg-light: #FAFAFA;
  --rrchnm-text: #525252;
  --rrchnm-black: #1a1a1a;
  --rrchnm-white: #ffffff;
  --rrchnm-font-heading: Georgia, 'Times New Roman', serif;
  --rrchnm-font-body: system-ui, -apple-system, sans-serif;
  --rrchnm-max-width: 1400px;
  --rrchnm-section-padding: 100px;
}

/* --------------------------------------------------------------------------
   Base / Typography overrides
   -------------------------------------------------------------------------- */
body {
  font-family: var(--rrchnm-font-body);
  color: var(--rrchnm-text);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--rrchnm-font-heading);
  color: var(--rrchnm-black);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.rrchnm-btn {
  display: inline-block;
  font-family: var(--rrchnm-font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding: 14px 38px;
  background-color: var(--rrchnm-red);
  color: var(--rrchnm-white);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.rrchnm-btn:hover {
  background-color: var(--rrchnm-black);
  color: var(--rrchnm-white);
}

/* --------------------------------------------------------------------------
   Section Components
   -------------------------------------------------------------------------- */
.rrchnm-section {
  padding: var(--rrchnm-section-padding) 0;
}

.rrchnm-section-header {
  text-align: center;
  margin-bottom: 60px;
}

.rrchnm-section-tagline {
  display: block;
  font-family: var(--rrchnm-font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--rrchnm-red);
  margin-bottom: 12px;
}

.rrchnm-section-title {
  font-size: 50px;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
}

.rrchnm-section-cta {
  text-align: center;
  margin-top: 50px;
}

/* --------------------------------------------------------------------------
   Two-Column Layout
   -------------------------------------------------------------------------- */
.rrchnm-two-col {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.rrchnm-col-30-70 .rrchnm-col-left {
  flex: 0 0 30%;
  max-width: 30%;
}

.rrchnm-col-30-70 .rrchnm-col-right {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Red Left Border Accent
   -------------------------------------------------------------------------- */
.rrchnm-red-left-border {
  border-left: 2px solid var(--rrchnm-red);
  padding-left: 30px;
}

/* --------------------------------------------------------------------------
   Homepage Hero
   -------------------------------------------------------------------------- */
.rrchnm-hero {
  background-color: var(--rrchnm-black);
  color: var(--rrchnm-white);
  padding: 120px 0;
  text-align: center;
}

.rrchnm-hero-title {
  font-size: 60px;
  font-weight: 400;
  color: var(--rrchnm-white);
  margin-bottom: 24px;
  line-height: 1.15;
}

.rrchnm-hero-subtitle {
  font-size: 18px;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Homepage About Section
   -------------------------------------------------------------------------- */
.rrchnm-about-section .rrchnm-about-image {
  width: 100%;
  box-shadow: 0 0 40px -17px rgba(0, 0, 0, 0.16);
}

/* --------------------------------------------------------------------------
   Portfolio Grid
   -------------------------------------------------------------------------- */
.project-list .card-media {
  overflow: hidden;
}

.project-list .card-media img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.project-list .:hover .card-media img {
  transform: scale(0.96);
}

.project-list .card-content {
  padding: 20px 0;
}

.project-list .card-title {
  font-size: 22px;
  margin: 0 0 5px;
}

.project-list .card-title a {
  color: var(--rrchnm-black);
  text-decoration: none;
}

.project-list .meta-category {
  font-size: 12px;
  color: var(--rrchnm-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   Blog / Posts
   -------------------------------------------------------------------------- */
.post-item {
  margin-bottom: 40px;
}

.post-item .card-inner {
  display: flex;
  flex-direction: column;
}

.post-item .card-media img {
  width: 100%;
  height: auto;
  box-shadow: 0 0 40px -17px rgba(0, 0, 0, 0.16);
}

.post-item .card-content {
  padding: 25px 0;
}

.post-item .meta-top {
  margin-bottom: 12px;
}

.post-item .meta-date {
  font-family: var(--rrchnm-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rrchnm-text);
  margin-right: 15px;
}

.post-item .meta-category {
  font-family: var(--rrchnm-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rrchnm-red);
  text-decoration: none;
}

.post-item .card-title {
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 15px;
  line-height: 1.3;
}

.post-item .card-title a {
  color: var(--rrchnm-black);
  text-decoration: none;
}

.post-item .card-title a:hover {
  color: var(--rrchnm-red);
}

.post-item .card-excerpt {
  color: var(--rrchnm-text);
  margin-bottom: 15px;
}

.post-item .read-more {
  font-family: var(--rrchnm-font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--rrchnm-black);
  text-decoration: none;
  position: relative;
}

.post-item .read-more::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background-color: var(--rrchnm-black);
  vertical-align: middle;
  margin-left: 10px;
  transition: width 0.3s ease;
}

.post-item .read-more:hover::after {
  width: 50px;
}

.post-item .meta-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
}

.post-item .meta-tag {
  font-size: 12px;
  color: var(--rrchnm-text);
  text-decoration: none;
  margin-right: 8px;
}

.post-item .meta-author {
  font-size: 12px;
  color: var(--rrchnm-text);
  margin-left: 15px;
}

/* --------------------------------------------------------------------------
   Staff Directory
   -------------------------------------------------------------------------- */
.staff-group {
  margin-bottom: 60px;
}

.staff-group h2 {
  font-size: 36px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
}

.staff-card a {
  text-decoration: none;
  color: inherit;
}

.staff-card img {
  width: 100%;
  height: auto;
  display: block;
}

.staff-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background-color: #e0e0e0;
}

.staff-card-info {
  padding: 0.75rem 0;
  text-align: center;
}

.staff-card-info h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.staff-card-info h3 a {
  color: var(--rrchnm-black);
  text-decoration: none;
}

.staff-card-info p {
  font-size: 0.8rem;
  color: var(--rrchnm-text);
  margin: 0;
}

/* Staff single */
.rrchnm-staff-single .rrchnm-staff-photo {
  width: 100%;
  box-shadow: 0 0 40px -17px rgba(0, 0, 0, 0.16);
}

.rrchnm-staff-single .rrchnm-staff-name {
  font-size: 42px;
  margin: 0 0 10px;
}

.rrchnm-staff-single .rrchnm-staff-job-title {
  font-size: 16px;
  color: var(--rrchnm-red);
  font-weight: 500;
}

.rrchnm-staff-single .rrchnm-staff-bio {
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   Portfolio Single
   -------------------------------------------------------------------------- */
.project-single .card-media img {
  width: 100%;
  height: auto;
  box-shadow: 0 0 40px -17px rgba(0, 0, 0, 0.16);
}

.project-single .card-intro {
  font-size: 18px;
  line-height: 1.8;
  margin: 30px 0;
}

.project-single .project-link {
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   Essay
   -------------------------------------------------------------------------- */
.rrchnm-essay-single .meta-pub {
  display: block;
  font-style: italic;
  color: var(--rrchnm-text);
  margin-top: 5px;
}

/* --------------------------------------------------------------------------
   Page Title Area
   -------------------------------------------------------------------------- */
.page-title-banner {
  padding: 80px 0;
  background-color: var(--rrchnm-bg-light);
}

.page-title-banner .page-title-heading {
  font-size: 50px;
  font-weight: 400;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
#site-header {
  position: relative;
  z-index: 100;
  background-color: var(--rrchnm-black);
}

#site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 90px;
  max-width: var(--rrchnm-max-width);
  margin: 0 auto;
}

.header-logo-link img {
  max-height: 60px;
  width: auto;
}

.header-nav ul.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.header-nav ul.menu > li {
  position: relative;
}

.header-nav ul.menu > li > a {
  display: block;
  padding: 0 18px;
  font-family: var(--rrchnm-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--rrchnm-white);
  text-decoration: none;
  line-height: 90px;
  letter-spacing: 0.5px;
}

.header-nav ul.menu > li > a:hover {
  color: var(--rrchnm-red);
}

/* Dropdown */
.header-nav ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--rrchnm-white);
  min-width: 220px;
  padding: 15px 0;
  list-style: none;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
  z-index: 200;
}

.header-nav li:hover > ul.sub-menu {
  display: block;
}

.header-nav ul.sub-menu li a {
  display: block;
  padding: 8px 25px;
  font-family: var(--rrchnm-font-body);
  font-size: 13px;
  color: var(--rrchnm-text);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav ul.sub-menu li a:hover {
  color: var(--rrchnm-red);
}

/* --------------------------------------------------------------------------
   Mobile Header
   -------------------------------------------------------------------------- */
#site-header-mobile {
  display: none;
  position: relative;
  z-index: 100;
  background-color: var(--rrchnm-black);
}

#site-header-mobile-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}

.mobile-logo-link img {
  max-height: 45px;
  width: auto;
}

.mobile-menu-toggle {
  display: block;
  width: 30px;
  height: 30px;
  color: var(--rrchnm-white);
}

.mobile-menu-toggle svg {
  width: 100%;
  height: 100%;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--rrchnm-white);
  border-top: 1px solid #e0e0e0;
  z-index: 200;
  max-height: 80vh;
  overflow-y: auto;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav ul li a {
  display: block;
  padding: 12px 20px;
  font-family: var(--rrchnm-font-body);
  font-size: 14px;
  color: var(--rrchnm-black);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav ul.sub-menu li a {
  padding-left: 40px;
  font-size: 13px;
  color: var(--rrchnm-text);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
#site-footer {
  background-color: var(--rrchnm-black);
  color: var(--rrchnm-white);
}

#site-footer a {
  color: var(--rrchnm-white);
  text-decoration: none;
}

#site-footer a:hover {
  color: var(--rrchnm-red);
}

#site-footer-top {
  padding: 80px 0 40px;
}

#site-footer-top-inner {
  max-width: var(--rrchnm-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.widget-title {
  font-family: var(--rrchnm-font-heading);
  font-size: 22px;
  font-weight: 400;
  color: var(--rrchnm-white);
  margin-bottom: 20px;
}

#site-footer .textwidget {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

#site-footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#site-footer-bottom-inner {
  max-width: var(--rrchnm-max-width);
  margin: 0 auto;
  padding: 0 40px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Footer grid */
#site-footer .grid-inner {
  display: flex;
  gap: 40px;
}

#site-footer .grid-item {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Content Grid
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--rrchnm-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

#site-main {
  padding: 60px 0;
}

/* Grid system */
.grid .grid-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.grid-cols-2 .grid-item { flex: 0 0 calc(50% - 15px); max-width: calc(50% - 15px); }
.grid-cols-3 .grid-item { flex: 0 0 calc(33.333% - 20px); max-width: calc(33.333% - 20px); }
.grid-cols-4 .grid-item { flex: 0 0 calc(25% - 22.5px); max-width: calc(25% - 22.5px); }

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
.card-media img,
.page-content img {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
  padding: 0;
  list-style: none;
}

.pagination .page-item a,
.pagination .page-item span {
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--rrchnm-font-body);
  font-size: 13px;
  color: var(--rrchnm-black);
  text-decoration: none;
  border: 1px solid #e0e0e0;
}

.pagination .page-item.active span,
.pagination .page-item a:hover {
  background-color: var(--rrchnm-red);
  color: var(--rrchnm-white);
  border-color: var(--rrchnm-red);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  #site-header {
    display: none;
  }

  #site-header-mobile {
    display: block;
  }

  .rrchnm-hero-title {
    font-size: 40px;
  }

  .rrchnm-section-title,
  .page-title-banner .page-title-heading {
    font-size: 36px;
  }

  .grid-cols-3 .grid-item {
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
  }

  .grid-cols-4 .grid-item {
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
  }

  :root {
    --rrchnm-section-padding: 60px;
  }
}

@media (max-width: 768px) {
  .rrchnm-two-col {
    flex-direction: column;
  }

  .rrchnm-col-30-70 .rrchnm-col-left {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .rrchnm-hero {
    padding: 80px 0;
  }

  .rrchnm-hero-title {
    font-size: 32px;
  }

  .grid-cols-3 .grid-item,
  .grid-cols-4 .grid-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #site-footer .grid-inner {
    flex-direction: column;
  }

  .container {
    padding: 0 20px;
  }

  #site-header-inner,
  #site-footer-top-inner,
  #site-footer-bottom-inner {
    padding: 0 20px;
  }

  .post-item .card-title {
    font-size: 24px;
  }

  .rrchnm-staff-single .rrchnm-staff-name {
    font-size: 30px;
  }
}

/* =====================
   Staff Modal
   ===================== */
#staff-modal {
  border: none;
  border-radius: 4px;
  padding: 0;
  max-width: 760px;
  width: calc(100% - 40px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

#staff-modal::backdrop {
  background: rgba(0,0,0,0.55);
}

.staff-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--rrchnm-text);
  padding: 0 4px;
  z-index: 1;
}

.staff-modal-close:hover {
  color: var(--rrchnm-red);
}

.staff-modal-inner {
  display: flex;
  gap: 2rem;
  padding: 2rem;
}

.staff-modal-photo-wrap {
  flex: 0 0 180px;
}

.staff-modal-photo-wrap img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
}

.staff-modal-body {
  flex: 1;
}

#staff-modal-name {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

#staff-modal-job-title {
  color: var(--rrchnm-red);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

#staff-modal-bio {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* hide photo column when no photo */
#staff-modal-photo[src=""] {
  display: none;
}

.staff-card-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
}

.staff-card-name-btn {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rrchnm-black);
  font-family: inherit;
}

.staff-card-name-btn:hover {
  color: var(--rrchnm-red);
}

@media (max-width: 600px) {
  .staff-modal-inner {
    flex-direction: column;
  }

  .staff-modal-photo-wrap {
    flex: none;
  }

  .staff-modal-photo-wrap img {
    width: 120px;
    height: 120px;
  }
}
