﻿/* ==========================================================
   index-only.css
   Rebuilt to preserve desktop look while improving mobile
   behavior for the index page only.
   Includes 2-per-row event layout on desktop/tablet.
   Includes mobile fix for Community / Devotional section.
   ========================================================== */

/* ----------------- reset / base ----------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  font-size: 100%;
  line-height: 1em;
  background: url(images/bg.gif);
}

html, input, textarea {
  font-family: Arial, Helvetica, sans-serif;
  color: #b0a18b;
}

img {
  border: 0;
  vertical-align: top;
  max-width: 100%;
  height: auto;
}

a {
  color: #766a64;
  text-decoration: underline;
  outline: none;
}

a:hover { text-decoration: none; }

.clear { clear: both; }

.container:after,
.indent:after,
.indent-main:after {
  content: "";
  display: block;
  clear: both;
}

:root {
  --desktop-width: 1001px;
  --side-gap: 33px;
  --col-gap: 11px;
  --nav-col: 234px;
  --hero-col: 690px;
}

/* ----------------- main wrapper ----------------- */
.main {
  width: 100%;
  max-width: var(--desktop-width);
  margin: 0 auto;
  text-align: left;
  background: url(images/bg1.gif);
  overflow: hidden;
}

/* keep generic container safer than old overflow:hidden everywhere */
div.container {
  width: 100%;
}

/* ----------------- header ----------------- */
#header {
  font-size: 0.75em;
  color: #867250;
  padding-bottom: 10px;
}

#header .indent {
  padding: 38px 0 0 var(--side-gap);
}

#header .header-row {
  display: flex;
  align-items: stretch;
  gap: var(--col-gap);
  width: calc(100% - var(--side-gap));
}

#header .header-row .col-1,
#header .header-row .col-2 {
  float: none !important;
}

#header .header-row .col-1 {
  flex: 0 0 var(--nav-col);
  width: var(--nav-col);
}

#header .header-row .col-2 {
  flex: 0 0 var(--hero-col);
  width: var(--hero-col);
}

#header .logo {
  display: block;
  margin: 0;
  padding: 0;
}

/* ----------------- top nav ----------------- */
.auto-style2 {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
}

#header .nav-panel {
  height: auto;
}

#header .nav-panel p.auto-style3 {
  background: #556b0a url(images/m1.gif) no-repeat left top;
  width: 234px;
  height: 42px;
  line-height: 42px;
  padding-left: 15px;
  text-transform: uppercase;
  text-align: left;
  margin: 0;
}

#header .nav-panel p.auto-style3 a {
  display: block;
  width: 100%;
  height: 42px;
  line-height: 42px;
  color: #ffffff;
  text-decoration: none;
}

#header .nav-gap {
  height: 0;
}

/* ----------------- slideshow + welcome ----------------- */
.hero-panel {
  display: flex;
  flex-direction: column;
}

.home-slideshow-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#njb-slideshow {
  width: 100%;
  flex: 1 1 auto;
  min-height: 360px;
  background: #222;
  overflow: hidden;
  position: relative;
}

#njb-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #222;
}

.welcome-strip {
  width: 100%;
  min-height: 54px;
  background: #efe8db;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  flex: 0 0 auto;
}

.welcome-strip img.title {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
  display: block;
}

.welcome-strip .txt1 {
  flex: 1 1 auto;
  color: #7a6a5b;
  font-size: 0.92em;
  line-height: 1.2em;
  margin: 0;
}

/* ----------------- content area ----------------- */
#content {
  font-size: 0.75em;
  width: 100%;
  text-align: left;
}

#content .indent-main {
  padding: 0 var(--side-gap) 13px var(--side-gap);
}

.bg-1 {
  background: #31373c url(images/bg-1.gif) repeat-x top;
  color: #dedad4;
  width: 100%;
}

.bg-2 {
  background: #3d3732 url(images/bg-2.gif) repeat-x top;
  color: #978f8a;
  width: 100%;
}

.bg-3 {
  background: url(images/bg-3.gif);
  color: #766a64;
  width: 100%;
}

/* desktop content columns */
#page1 #content .col-1 {
  float: left;
  width: 234px;
  margin-right: 11px;
}

#page1 #content .col-2 {
  float: left;
  width: 690px;
}

#page1 #content .col-3 {
  float: left;
  width: 300px;
  margin-right: 37px;
}

#page1 #content .col-4 {
  float: left;
  width: 296px;
}

#page1 #content .bg {
  background: url(images/tail1.gif) repeat-y 317px top;
}

#content .title {
  background: url(images/tail2.gif) repeat-x bottom;
  margin-bottom: 16px;
}

#content h2 {
  color: #d3c3ab;
  font-size: 1.5em;
  font-weight: normal;
  line-height: 1.44em;
  padding-bottom: 18px;
}

#content h2 strong {
  color: #dedad4;
  font-size: 1.66em;
  font-weight: normal;
  line-height: 1em;
}

#content h5 {
  color: #dadada;
  font-size: 1.33em;
  margin-bottom: 13px;
}

#content .h2-1 {
  background: url(images/icon1.jpg) no-repeat top left;
  padding-left: 85px;
}

#content .h2-2 {
  background: url(images/icon2.jpg) no-repeat top left;
  padding-left: 102px;
}

#content .indent-col {
  padding: 37px 30px 30px 20px;
  text-align: right;
}

#content .indent-col1 {
  padding: 21px 20px 1px 29px;
}

#content .indent-col3 {
  padding: 25px 20px 0 29px;
}

#content .indent1 { padding: 0 0 0 5px; }
#content .indent2 { padding: 0 0 0 12px; }
#content .indent3 { padding: 45px 0 0 0; }

/* ----------------- second nav ----------------- */
.ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ul li {
  background: url(images/marker1.gif) center right no-repeat;
  margin: 0;
  padding-right: 18px;
}

.ul li a {
  display: block;
  color: #dedad4;
  text-decoration: none;
  font-weight: bold;
  line-height: 2em;
  font-family: "Arial Narrow", Helvetica, sans-serif;
  font-size: 1.5em;
  text-transform: uppercase;
}

.ul li a:hover {
  text-decoration: underline;
}

/* ----------------- links ----------------- */
.link {
  color: #cdcbab;
  background: url(images/marker.gif) no-repeat 0 5px;
  padding-left: 11px;
  text-decoration: none;
  font-weight: bold;
}

.link:hover { text-decoration: underline; }

.link-1 {
  display: inline-block;
  background: url(images/link_bg.gif) left top repeat-x;
  color: #282320;
  text-decoration: none;
}

.link-1 em {
  display: block;
  background: url(images/link_left.gif) no-repeat left top;
}

.link-1 b {
  display: block;
  background: url(images/link_right.gif) no-repeat right top;
  padding: 2px 13px 3px 20px;
  font-style: normal;
}

.link-1:hover {
  text-decoration: none;
  color: #fff;
}

.feature-link-wrap {
  margin-top: 10px;
}

/* ----------------- top content row ----------------- */
.content-top-row {
  overflow: hidden;
}

.feature-panel {
  min-height: 247px;
}

.feature-row {
  min-height: 164px;
}

.feature-box p {
  line-height: 1.35em;
}

/* ----------------- calendar + events ----------------- */
#content > .indent-main > .indent {
  padding: 0;
  margin: 0;
}

.calendar-panel {
  width: 100%;
  min-height: 245px;
  margin-top: 11px;
  clear: both;
}

.calendar-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.calendar-left {
  flex: 0 0 289px;
}

.calendar-highlight {
  width: 96%;
  min-height: 145px;
  margin-top: 0;
}

.event-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 14px;
  align-items: start;
}

.event-box {
  width: 100%;
  min-width: 0;
}

.event-card {
  width: 100%;
  min-height: 159px;
  overflow: hidden;
}

.event-card p {
  line-height: 1.3em;
}

.event-thumb {
  float: left;
  width: 110px;
  height: 110px;
  margin-right: 10px;
  margin-bottom: 6px;
  background: #222;
  overflow: hidden;
}

.event-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* ----------------- footer ----------------- */
#footer {
  height: 61px;
  color: #746963;
  font-size: 0.75em;
  background: url(images/bot.gif) repeat-x top;
  position: relative;
}

#footer .bg-bot {
  background: url(images/tail.gif) repeat-x top;
  margin: 0 33px;
}

#footer .indent-footer {
  padding: 19px 8px 0 11px;
}

#footer span {
  color: #978a79;
  float: right;
}

#footer .icon {
  margin: 22px 0 0 764px;
  position: absolute;
}

/* ==========================================================
   Tablet / smaller desktop
   Keep layout centered and proportional before full stack
   ========================================================== */
@media screen and (max-width: 1024px) {
  .main {
    width: 100%;
    max-width: 1001px;
  }

  #header .indent,
  #content .indent-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  #header .header-row {
    width: 100%;
  }

  #header .header-row .col-2 {
    flex: 1 1 auto;
    width: auto;
  }

  .home-slideshow-wrap,
  #njb-slideshow,
  .welcome-strip {
    width: 100%;
  }

  #njb-slideshow {
    min-height: 300px;
  }

  #page1 #content .col-1 {
    width: 234px;
  }

  #page1 #content .col-2 {
    width: calc(100% - 245px);
  }

  .calendar-row {
    gap: 16px;
  }

  .calendar-left {
    flex: 0 0 260px;
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================
   Mobile
   Prevent squeeze-left behavior and stack cleanly
   ========================================================== */
@media screen and (max-width: 768px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  .main {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    overflow: visible;
  }

  #header {
    padding-bottom: 0;
  }

  #header .indent {
    padding: 12px 10px 0 10px;
  }

  #header .header-row {
    display: block;
    width: 100%;
  }

  #header .header-row .col-1,
  #header .header-row .col-2 {
    float: none !important;
    display: block;
    width: 100% !important;
    margin: 0 auto;
  }

  #header .header-row .col-1.nav-panel {
    max-width: 234px;
  }

  #header .nav-gap {
    height: 10px;
  }

  .hero-panel,
  .home-slideshow-wrap {
    width: 100%;
    display: block;
    height: auto;
  }

  #njb-slideshow {
    width: 100%;
    min-height: 0;
    position: relative;
    flex: none;
  }

  #njb-slideshow::before {
    content: "";
    display: block;
    padding-top: 52.1739%;
  }

  #njb-slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .welcome-strip {
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }

  .welcome-strip img.title {
    height: 28px;
    width: auto;
  }

  #content .indent-main {
    padding: 0 10px 13px 10px;
  }

  #content,
  #footer,
  .container,
  .bg-1,
  .bg-2,
  .bg-3,
  .calendar-panel,
  .feature-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  #content .col-1,
  #content .col-2,
  #content .col-3,
  #content .col-4,
  #page1 #content .col-1,
  #page1 #content .col-2,
  #page1 #content .col-3,
  #page1 #content .col-4 {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    height: auto !important;
  }

  #page1 #content .bg,
  .feature-panel .bg,
  .feature-row.bg {
    background: none !important;
  }

  .feature-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  .feature-row {
    display: block !important;
    width: 100% !important;
    min-height: 0;
    background: none !important;
  }

  .feature-row .col-3,
  .feature-row .col-4,
  .feature-box {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    clear: both !important;
  }

  .feature-box:last-child {
    margin-bottom: 0 !important;
  }

  .feature-box .title,
  .feature-box .indent1,
  .feature-box .indent2 {
    width: 100% !important;
  }

  .feature-box .indent1,
  .feature-box .indent2 {
    padding: 0 !important;
  }

  #content .indent-col {
    padding: 18px 12px;
    text-align: left;
  }

  #content .indent-col1,
  #content .indent-col3 {
    padding: 18px 12px;
  }

  .ul li {
    background: none;
    padding-right: 0;
  }

  .ul li a {
    font-size: 1.25em;
    line-height: 1.8em;
  }

  .feature-row {
    min-height: 0;
  }

  .feature-box p {
    line-height: 1.45em;
  }

  .calendar-row {
    flex-direction: column;
    gap: 14px;
  }

  .calendar-left {
    flex: none;
    width: 100%;
  }

  .calendar-highlight {
    width: 100%;
    min-height: 0;
  }

  .event-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .event-box {
    width: 100%;
  }

  .event-card {
    min-height: 0;
  }

  #footer {
    height: auto;
  }

  #footer .icon {
    display: none;
  }

  #footer .bg-bot {
    margin: 0 10px;
  }

  #footer .indent-footer {
    padding: 16px 8px 14px 11px;
    line-height: 1.4em;
  }

  #footer span {
    float: none;
    display: block;
    margin-top: 6px;
  }
}