/*
Theme Name: SwampBrain
Author: Jeff
Description: Custom theme for SwampBrain.com.
Version: 1.0.1
Text Domain: swampbrain
*/

/* ========================================
   1. RESET & BASE
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #004499;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   2. PAGE STRUCTURE
======================================== */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  background: #fff;
}

/* 3-column layout: 200 / 960 / 200 */
.content-container {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 0;
}

/* Center content area */
.content-area {
  padding: 30px;
  background: #fff;
}

/* Sidebars */
.sidebar-left,
.sidebar-right {
  width: 200px;
  padding: 20px;
  background: #f9f9f9;
}

/* ========================================
   3. HEADER
======================================== */
.site-header {
  background: #fff;
  border-bottom: 3px solid #0066cc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0;
}

.header-image img {
  width: 100%;
  height: auto;
}

/* ========================================
   4. SIDEBARS & AD SLOTS
======================================== */
.widget-area {
  background: #f9f9f9;
  height: 100%;
}

.sidebar-title {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
  color: #333;
}

/* EyeOutAds 160x600 sidebar placement */
.sidebar-ad-160x600 {
  width: 160px;
  height: 600px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: hidden;
}

/* ========================================
   5. MAIN CONTENT
======================================== */
.entry-title {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}

.entry-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.entry-summary {
  font-size: 16px;
}

/* Latest post block */
.latest-post {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.latest-post .post-thumbnail {
  margin-bottom: 15px;
}

/* EyeOutAds 728x90 leaderboard placements */
.homepage-banner-ad,
.single-post-banner-ad,
.page-banner-ad {
  width: 728px;
  max-width: 100%;
  min-height: 90px;
  margin: 30px auto;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: center;
  overflow: hidden;
}

/* EyeOutAds 320x50 mobile placement. PHP uses wp_is_mobile(), and CSS keeps it hidden unless mobile-width. */
.mobile-content-ad {
  display: none;
  width: 320px;
  max-width: 100%;
  min-height: 50px;
  margin: 24px auto;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: center;
  overflow: hidden;
}

/* ========================================
   6. 3x3 GRID OF NEXT 9 POSTS
======================================== */
.post-grid-wrapper {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.grid-item {
  border: 1px solid #e0e0e0;
  padding: 15px;
  background: #fafafa;
  border-radius: 4px;
}

.grid-item .entry-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.grid-thumbnail {
  margin-bottom: 10px;
}

.grid-thumbnail img {
  width: 100%;
  height: auto;
}

/* ========================================
   7. FOOTER
======================================== */
.site-footer {
  background: #333;
  color: #fff;
  padding: 30px 0;
  margin-top: 40px;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: #fff;
}

/* ========================================
   8. RESPONSIVE
======================================== */
@media (max-width: 1200px) {
  .content-container {
    grid-template-columns: 180px 1fr 180px;
  }
}

@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 1fr 250px;
  }
  .sidebar-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .content-container {
    grid-template-columns: 1fr;
  }
  .sidebar-right {
    display: none;
  }

  .homepage-banner-ad,
  .single-post-banner-ad,
  .page-banner-ad {
    display: none;
  }

  .mobile-content-ad {
    display: block;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   9. UTILITIES
======================================== */
.text-center {
  text-align: center;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}


/* Mobile containment cleanup for long forms and ad/content overflow */
.content-container,
.content-area {
  min-width: 0;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .content-container,
  .content-area,
  .site-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .content-area {
    padding: 18px 14px;
  }
}
/* ========================================
   SWAMPBRAIN STATIC HOMEPAGE
   HOMEPAGE ONLY
======================================== */

body.home {
  background: #0b1f16;
}

body.home .site-header {
  background: #0b1f16;
}

body.home .site-content {
  background: #0b1f16;
}

/* Override normal 3-column layout on homepage only */
body.home .content-container {
  display: block;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 42px 32px 55px;
  background: #0b1f16;
}

/* Homepage main area */
body.home .swampbrain-front-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Six navigation tiles */
body.home .swampbrain-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

/* Individual tile */
body.home .swampbrain-home-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

/* Tile images */
body.home .swampbrain-home-card {
  aspect-ratio: 1 / 1;
}

body.home .swampbrain-home-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop hover */
body.home .swampbrain-home-card:hover {
  transform: translateY(-5px) scale(1.012);
  text-decoration: none;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(110, 145, 125, 0.16);
}

/* Keyboard accessibility */
body.home .swampbrain-home-card:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 5px;
}

/* Remove normal footer gap */
body.home .site-footer {
  margin-top: 0;
}

/* ========================================
   HOMEPAGE TABLET
======================================== */

@media (max-width: 900px) {

  body.home .content-container {
    padding: 32px 24px 45px;
  }

  body.home .swampbrain-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

/* ========================================
   HOMEPAGE MOBILE
======================================== */

@media (max-width: 600px) {

  body.home .content-container {
    padding: 24px 16px 36px;
  }

  body.home .swampbrain-home-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.home .swampbrain-home-card {
    border-radius: 14px;
  }

  body.home .swampbrain-home-card:hover {
    transform: none;
  }
}

/* ========================================
   SWAMPBRAIN BIOGRAPHIES INDEX
======================================== */

.swampbrain-biographies-index {
  width: 100%;
}

/* A-Z jump navigation */
.swampbrain-biography-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 12px 14px;
  background: #0b1f16;
  border-radius: 8px;
}

.swampbrain-biography-alphabet a {
  display: inline-block;
  min-width: 28px;
  padding: 5px 7px;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
}

.swampbrain-biography-alphabet a:hover {
  background: rgba(255,255,255,0.14);
  text-decoration: none;
}

/* Individual letter sections */
.swampbrain-biography-section {
  margin: 0 0 34px;
}

/* Louisiana/swamp-style letter heading */
.swampbrain-biography-section h2 {
  margin: 0 0 14px;
  padding: 7px 12px;
  background: #0b1f16;
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  border-left: 5px solid #496b55;
}

/* Biography names */
.swampbrain-biography-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.swampbrain-biography-list li {
  margin: 0;
  padding: 0 0 8px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.swampbrain-biography-list strong {
  font-weight: 700;
}

/* Tablet and phone */
@media (max-width: 700px) {

  .swampbrain-biography-list {
    grid-template-columns: 1fr;
  }

  .swampbrain-biography-alphabet {
    gap: 4px;
    padding: 10px;
  }

  .swampbrain-biography-alphabet a {
    min-width: 25px;
    padding: 4px 6px;
  }
}
.swampbrain-biography-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 700px) {
    .swampbrain-biography-list {
        grid-template-columns: 1fr !important;
    }
}
/* ========================================
   SWAMPBRAIN HISTORICAL EVENTS INDEX
======================================== */

.swampbrain-historical-events-index {
  width: 100%;
}

/* Decade jump navigation */
.swampbrain-event-decades {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 12px 14px;
  background: #0b1f16;
  border-radius: 8px;
}

.swampbrain-event-decades a {
  display: inline-block;
  padding: 5px 8px;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
}

.swampbrain-event-decades a:hover {
  background: rgba(255,255,255,0.14);
  text-decoration: none;
}

/* Individual decade sections */
.swampbrain-event-section {
  margin: 0 0 34px;
}

.swampbrain-event-section h2 {
  margin: 0 0 14px;
  padding: 7px 12px;
  background: #0b1f16;
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  border-left: 5px solid #496b55;
}

/* Historical event list */
.swampbrain-event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.swampbrain-event-list li {
  margin: 0;
  padding: 0 0 8px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.swampbrain-event-list strong {
  font-weight: 700;
}

/* Mobile */
@media (max-width: 700px) {

  .swampbrain-event-list {
    grid-template-columns: 1fr;
  }

  .swampbrain-event-decades {
    gap: 4px;
    padding: 10px;
  }

  .swampbrain-event-decades a {
    padding: 4px 6px;
  }
}
/* =========================================================
   SWAMPBRAIN MAPS INDEX
   ========================================================= */

.swampbrain-maps-index {
    width: 100%;
}

.swampbrain-map-section {
    margin: 0 0 40px;
}

.swampbrain-map-section > h2 {
    margin: 0 0 14px;
    padding: 12px 18px;
    background: #0b1f16;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.25;
}

.swampbrain-map-section > p {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.6;
}


/* MULTI-PARISH MAP LINKS */

.swampbrain-map-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.swampbrain-map-links > a,
.swampbrain-map-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid #d7ddd9;
    border-radius: 5px;
    background: #ffffff;
    text-decoration: none;
    box-sizing: border-box;
}

.swampbrain-map-links > a {
    color: #222222;
    transition: transform 0.15s ease,
                box-shadow 0.15s ease,
                border-color 0.15s ease;
}

.swampbrain-map-links > a:hover {
    transform: translateY(-2px);
    border-color: #0b1f16;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.swampbrain-map-links strong,
.swampbrain-map-info strong {
    color: #0b1f16;
    font-size: 1.08rem;
    line-height: 1.3;
}

.swampbrain-map-links span,
.swampbrain-map-info span {
    font-size: 0.95rem;
    line-height: 1.45;
}

.swampbrain-map-info a {
    color: #0b1f16;
    font-weight: 600;
    text-decoration: underline;
}


/* PARISH DROPDOWN */

.swampbrain-parish-select {
    display: block;
    width: 100%;
    max-width: 520px;
    padding: 14px 16px;
    border: 2px solid #0b1f16;
    border-radius: 5px;
    background: #ffffff;
    color: #222222;
    font-size: 1rem;
    cursor: pointer;
}


/* MOBILE */

@media (max-width: 700px) {

    .swampbrain-map-links {
        grid-template-columns: 1fr;
    }

    .swampbrain-map-section > h2 {
        font-size: 1.35rem;
    }

    .swampbrain-parish-select {
        max-width: 100%;
    }
}
/* =========================================================
   SWAMPBRAIN CONTACT ELECTED OFFICIALS
   ========================================================= */

.swampbrain-officials-index {
    width: 100%;
}

.swampbrain-officials-intro,
.swampbrain-legislature-note,
.swampbrain-officials-source-note {
    line-height: 1.65;
}

.swampbrain-officials-section {
    margin: 0 0 42px;
}

.swampbrain-officials-section > h2 {
    margin: 0 0 18px;
    padding: 12px 18px;
    background: #0b1f16;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.25;
}

.swampbrain-official-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.swampbrain-official-card {
    padding: 20px;
    border: 1px solid #d7ddd9;
    border-radius: 5px;
    background: #ffffff;
    box-sizing: border-box;
}

.swampbrain-official-card h3 {
    margin: 0 0 15px;
    color: #0b1f16;
    font-size: 1.16rem;
    line-height: 1.35;
}

.swampbrain-official-card p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.swampbrain-office-label {
    margin-top: 15px !important;
    margin-bottom: 4px !important;
    color: #0b1f16;
    font-weight: 700;
}

.swampbrain-official-card a {
    color: #0b1f16;
}

.swampbrain-official-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 16px !important;
    padding-top: 14px;
    border-top: 1px solid #e1e5e2;
}

.swampbrain-official-actions a {
    font-weight: 700;
    text-decoration: underline;
}

.swampbrain-special-contact {
    margin: 15px 0;
    padding: 13px 15px;
    border-left: 4px solid #0b1f16;
    background: #f4f7f5;
}

.swampbrain-special-contact strong,
.swampbrain-special-contact span,
.swampbrain-special-contact a {
    display: block;
}

.swampbrain-special-contact strong {
    margin-bottom: 4px;
    color: #0b1f16;
}

.swampbrain-special-contact span {
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.swampbrain-special-contact a {
    font-size: 1.08rem;
    font-weight: 800;
}

.swampbrain-special-contact-alert {
    border-left-width: 6px;
    padding: 16px;
    background: #eef3f0;
}

.swampbrain-special-contact-alert strong {
    font-size: 1.06rem;
}

.swampbrain-special-contact-alert a {
    font-size: 1.35rem;
}

.swampbrain-official-card-featured {
    border-width: 2px;
    border-color: #0b1f16;
}

.swampbrain-service-list {
    margin-top: 12px;
}

.swampbrain-officials-source-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-top: 1px solid #d7ddd9;
    font-size: 0.9rem;
}

@media (max-width: 700px) {

    .swampbrain-official-grid {
        grid-template-columns: 1fr;
    }

    .swampbrain-officials-section > h2 {
        font-size: 1.35rem;
    }

    .swampbrain-official-card {
        padding: 17px;
    }
}

/* =========================================================
   SWAMPBRAIN IMPORTANT DOCUMENTS INDEX
   ========================================================= */

.swampbrain-documents-index {
    width: 100%;
}

.swampbrain-documents-intro,
.swampbrain-documents-section-intro,
.swampbrain-documents-source-note {
    line-height: 1.65;
}

.swampbrain-documents-section {
    margin: 0 0 42px;
}

.swampbrain-documents-section > h2 {
    margin: 0 0 18px;
    padding: 12px 18px;
    background: #0b1f16;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.25;
}

.swampbrain-documents-section-intro {
    margin: -4px 0 20px;
}

.swampbrain-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.swampbrain-document-card {
    padding: 20px;
    border: 1px solid #d7ddd9;
    border-radius: 5px;
    background: #ffffff;
    box-sizing: border-box;
}

.swampbrain-document-card h3 {
    margin: 5px 0 10px;
    color: #0b1f16;
    font-size: 1.12rem;
    line-height: 1.35;
}

.swampbrain-document-card h3 a {
    color: #0b1f16;
    text-decoration: none;
}

.swampbrain-document-card h3 a:hover {
    text-decoration: underline;
}

.swampbrain-document-card p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.swampbrain-document-year {
    display: inline-block;
    margin: 0 0 2px;
    padding: 3px 8px;
    border-radius: 3px;
    background: #eef3f0;
    color: #0b1f16;
    font-size: 0.82rem;
    font-weight: 800;
}

.swampbrain-document-featured {
    border-width: 2px;
    border-color: #0b1f16;
}

.swampbrain-document-actions {
    margin-top: 15px !important;
    padding-top: 13px;
    border-top: 1px solid #e1e5e2;
}

.swampbrain-document-actions a {
    color: #0b1f16;
    font-weight: 700;
    text-decoration: underline;
}

.swampbrain-documents-source-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-top: 1px solid #d7ddd9;
    font-size: 0.9rem;
}

@media (max-width: 700px) {

    .swampbrain-document-grid {
        grid-template-columns: 1fr;
    }

    .swampbrain-documents-section > h2 {
        font-size: 1.35rem;
    }

    .swampbrain-document-card {
        padding: 17px;
    }
}