﻿/* ============================================================
   learn-post.css
   Shared single-post styles for learn/ blog post pages.
   Used by:
     learn/pole-barn-porches/index.php
     learn/pole-barn-vs-metal-building/index.php
   ============================================================ */

/* ============================================================
   BACKGROUND
   ============================================================ */
body {
  background: url('/images/pattern1.png') repeat #fff;
  overflow-x: hidden;
}

/* ============================================================
   HERO — #singlecontainer / #box1 / .box1single
   ============================================================ */
#singlecontainer {
  overflow: hidden;
  margin-bottom: 0;
  padding-bottom: 0;
}

#singlecontainer #box1 {
  background-position: center center;
  background-attachment: scroll;
  height: 446px;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  border-bottom: 8px solid #f2f2f2;
}

.box1single {
  height: 446px !important;
  position: relative !important;
  overflow: visible !important;
  background-size: cover;
}

/* Allow nav arrows to overflow hero boundaries */
#singlecontainer #box1.box1single {
  overflow: visible !important;
}

/* Suppress any blue gradient overlay injected by main styles */
#singlecontainer #box1::before {
  content: none !important;
  display: none !important;
}

/* --- Box1 title content — vertically centered at 58% --- */
.box1single .box1content {
  position: relative !important;
  top: 58% !important;
  -webkit-transform: translateY(-50%) !important;
  transform: translateY(-50%) !important;
  text-align: center;
  z-index: 2 !important;
}

.box1single h1 {
  font-size: 46px !important;
  line-height: 54px !important;
  text-transform: none !important;
  font-family: "Oswald", sans-serif;
  color: #fff;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  margin: 0 129.788px !important;
  padding: 0 45.6125px !important;
}

#dateauthor {
  text-align: center;
  padding-top: 10px;
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  padding-bottom: 0;
  margin: 0;
}
#dateauthor span {
  padding-left: 10px;
  padding-right: 10px;
}
#dateauthor a {
  color: #fff !important;
  font-weight: 400;
  font-size: 14px;
  text-decoration: none;
  border-bottom: none !important;
}
#dateauthor a:hover {
  color: #f7232b !important;
  text-decoration: none;
}

/* --- Nav Prev / Next arrows --- */
#nav-prev img,
#nav-next img,
#nav-prev span.nextprev,
#nav-next span.nextprev {
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

#nav-prev,
#nav-next {
  height: 60px;
  width: 148px;
  display: block;
  background: none;
  position: absolute;
  top: 50%;
  text-decoration: none;
  -webkit-transition: 0.3s all;
  transition: 0.3s all;
  z-index: 10;
  border-bottom: 4px solid rgba(247, 35, 43, 0);
}
#nav-prev { left: -85px; }
#nav-next { right: -85px; }

#nav-prev img,
#nav-next img {
  opacity: 1;
  -webkit-transition: 0.3s all;
  transition: 0.3s all;
  display: block;
}
#nav-prev img { float: right; margin-right: 20px; }
#nav-next img { float: left;  margin-left: 20px; }

#nav-prev:hover {
  background: rgba(46, 111, 155, 0.8);
  left: 0;
  border-bottom: 4px solid rgba(255, 255, 255, 0.8);
}
#nav-next:hover {
  background: rgba(46, 111, 155, 0.8);
  right: 0;
  border-bottom: 4px solid rgba(255, 255, 255, 0.8);
}
#nav-prev:hover img,
#nav-next:hover img {
  -webkit-filter: brightness(1);
  filter: brightness(1);
  opacity: 1;
}

#nav-prev span.nextprev,
#nav-next span.nextprev {
  opacity: 0;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: none;
  display: block;
  -webkit-transition: 0.3s all;
  transition: 0.3s all;
}
#nav-prev span.nextprev { float: right; margin-right: 11px; }
#nav-next span.nextprev { float: left;  margin-left: 17px; }
#nav-prev:hover span.nextprev,
#nav-next:hover span.nextprev { opacity: 1; }

/* ============================================================
   PAGE + CONTENT LAYOUT
   ============================================================ */
#page {
  position: relative;
  width: 100%;
  padding: 0;
  min-width: 100%;
}

#content {
  display: block;
  left: 0;
  float: none;
  width: 100%;
  margin: 0 auto;
  margin-top: 0;
  padding-top: 0;
  position: relative;
  padding-bottom: 0;
}

.sitewidthblogbody {
  position: relative;
}

/* ============================================================
   SOCIAL SHARE BAR
   ============================================================ */
#socialhomecontainer {
  /* intentionally empty — .rsocial uses absolute positioning */
}

/* The bar sits 49 px above .sitewidthblogbody, overlapping the bottom of the hero */
.rsocial {
  position: absolute;
  top: -49px;
  left: 50%;
  height: 41px;
  background: #f7232b;
  border-radius: 0;
  overflow: hidden;
  margin-left: -98px;
  z-index: 5;
}
.rsocial .shareproject {
  float: left;
  padding-left: 15px;
  padding-right: 15px;
  text-align: center;
  background: #2a648c;
}
.rsocial .shareproject span.shareprojectspan {
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  line-height: 41px;
  cursor: default;
  font-family: "Oswald", sans-serif;
}
.rsocialshare {
  background: #337aab;
  height: 100%;
  float: left;
}
.rsocialshare a {
  float: left;
  width: 35px;
  height: 41px;
  display: block;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  border-bottom: none !important;
  text-decoration: none !important;
}
.rsocialshare a.rsocial-m {
  background-image: url(/learn/wp-content/themes/diy-img/images/social-m.png);
}
.rsocialshare a.rsocial-f {
  background-image: url(/learn/wp-content/themes/diy-img/images/social-f.png);
  width: 30px;
}
.rsocialshare a.rsocial-t {
  background-image: url(/learn/wp-content/themes/diy-img/images/social-t.png);
}
.rsocialshare a.rsocial-i {
  background-image: url(/learn/wp-content/themes/diy-img/images/social-i.png);
}
.rsocialshare a:hover {
  background-color: #3d8dc5;
}

/* ============================================================
   BLOG LAYOUT — #blogleft + #sidebar
   ============================================================ */
#blogleft {
  width: 71%;
  float: left;
}
@media screen and (max-width: 1336px) {
  #blogleft { margin-left: 1%; }
}
@media screen and (max-width: 1260px) {
  #blogleft { width: 68%; margin-left: 2%; }
}
@media screen and (max-width: 1012px) {
  #blogleft { float: none; width: 100%; margin: 0; }
}

#primary {
  border-right: 0;
}

#main {
  padding: 30px 0 60px 0;
  margin-top: 0;
  width: 100%;
  min-width: 100%;
}
@media screen and (max-width: 1650px) { #main { padding: 30px 0 50px 0; } }
@media screen and (max-width: 1260px) { #main { padding: 30px 0 40px 0; } }
@media screen and (max-width: 1012px) { #main { padding: 5px 0 10px 0; } }

/* ============================================================
   SIDEBAR
   ============================================================ */
.single #sidebar {
  margin: 45px 0 0 0;
}
#sidebar {
  margin: 15px 0 0 0;
  padding: 0;
  position: relative !important;
  float: right;
  margin-right: 0;
  width: 254px;
  background: none;
  text-align: left;
  top: 0 !important;
}
#sidebar a {
  display: block;
  line-height: 26px;
  color: #f7232b;
  text-decoration: underline;
  font-weight: normal;
}
#sidebar a:hover {
  color: #005f9c !important;
  text-decoration: underline;
}

/* Mobile masthead — hidden on desktop */
#masthead,
.site-title a,
.site-description { display: none; }

/* ============================================================
   SIDEBAR TOGGLE BUTTON (hamburger — mobile only)
   ============================================================ */
.sidebar-toggle {
  display: none;
}

@media screen and (max-width: 1012px) {
  .sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 28px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0;
    margin: 12px 0 0 auto;
    padding: 0;
    flex-shrink: 0;
  }
  .sidebar-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  /* Animate bars into an X when open */
  #sidebar.sidebar-open .sidebar-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  #sidebar.sidebar-open .sidebar-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  #sidebar.sidebar-open .sidebar-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Sidebar content hidden until opened */
  #sidebar #secondary {
    display: none;
  }
  #sidebar.sidebar-open #secondary {
    display: block;
  }
}

/* ============================================================
   WIDGETS
   ============================================================ */
.widget {
  padding: 0 0 200px 0 !important;
  width: 100%;
  margin-bottom: 0;
  position: relative;
  line-height: 22px;
}
.widget-title {
  color: #000 !important;
  font-family: "Oswald", sans-serif;
  margin: 0;
  background: none;
  width: 100%;
  text-align: left;
  text-transform: none;
  line-height: 50px;
  font-size: 24px;
  letter-spacing: 0;
}
.widget ul { width: 90%; }
.widget li {
  padding: 0;
  margin-left: 0;
  margin-bottom: 7px;
  list-style-type: none;
  color: #f7232b;
  border: 0;
}
.widget li a {
  font-size: 14px;
  text-decoration: none !important;
  line-height: 18px !important;
  position: relative;
  z-index: 10;
  display: block;
}
.widget li a:hover { color: #005f9c !important; }
#widget-area p { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; }

@media screen and (max-width: 1260px) {
  .single #sidebar { margin: 45px 2% 0 0; }
  #sidebar { margin-right: 2%; width: 224px; }
}
@media screen and (max-width: 1012px) {
  .sitewidthblogbody { display: flex; flex-direction: column; }
  #blogleft { order: 1; }
  .single #sidebar { margin: 0; }
  #sidebar {
    order: 0;
    padding: 0;
    position: relative !important;
    margin: 0 auto;
    width: 100%;
    margin-right: 0;
    float: none;
  }
  #secondary { padding: 0; background: none; margin-top: 2px !important; }
  .widget { padding: 0 0 5px 0 !important; margin-bottom: 5px; text-align: left; }
  .widget-title { margin: 0 0 5px 0; text-align: left; }
  .widget ul { width: 100%; }
  .widget li { list-style-type: none; }
  #masthead { display: block; background: transparent; }
  .site-title a, .site-description { display: none !important; }
  .secondary-toggle {
    margin-top: 6px;
    background: #fff !important;
    border: 1px solid #ccc !important;
    width: 40px;
    height: 40px;
  }
}

/* ============================================================
   SUBSCRIBE WIDGET
   ============================================================ */
#s2_form_widget-2 br,
label[for="s2email"] { display: none; }

#s2_form_widget-2 .search,
#s2_form_widget-2 .s2_message,
#s2_form_widget-2 .s2_message a {
  font-size: 14px !important;
  line-height: 20px;
}
#s2_form_widget-2 .s2_message { padding-top: 13px; color: #000; }
#s2_form_widget-2 .s2_message a { display: inline; }
#s2_form_widget-2 form p { margin: 0; padding: 0; }

#s2_form_widget-2 input[type="email"] {
  border: 1px solid #ddd;
  background: #fafafa;
  width: 100%;
  padding: 9px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  line-height: normal;
  margin-top: 20px;
  font-size: 16px !important;
  box-sizing: border-box;
}
#s2_form_widget-2 input[type="submit"] {
  display: block;
  background: #d9272e;
  width: 140px;
  height: 55px;
  font-size: 25px;
  line-height: 53px;
  font-family: "Oswald", sans-serif;
  color: #fff !important;
  font-weight: normal;
  text-decoration: none !important;
  padding: 0;
  text-align: center;
  border-radius: 2px;
  float: right;
  margin: 10px 0 20px 0;
  text-transform: capitalize;
  cursor: pointer;
  border: none;
}
#s2_form_widget-2 input[type="submit"]:hover {
  background: #f83c43 !important;
  color: #fff !important;
}
#s2_form_widget-2 input[type="text"] {
  border: 1px solid #ddd;
  background: #fafafa;
  width: 97%;
  padding: 4px 0 5px 3%;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  line-height: normal;
  font-size: 16px !important;
  box-sizing: border-box;
}

/* ============================================================
   SINGLE POST ARTICLE
   ============================================================ */
#singlepost .post {
  padding: 30px 3% 30px 3%;
  margin-top: 10px !important;
  border-radius: 0;
  overflow: hidden;
  border-bottom: 0 solid #ddd;
  width: 94%;
  left: 0;
  margin-left: 0;
  background: #fff;
  box-shadow: none;
}

.entry-content {
  padding: 10px 2% 0 2%;
  margin: 0;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}
@media screen and (max-width: 1200px) {
  .entry-content { padding: 0 2% 0 2%; }
}

.entry-content b,
.entry-content strong {
  font-weight: 600;
}

/* --- Headings inside article --- */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-weight: 600;
  color: #f7232b !important;
}
.entry-content h1,
.entry-content h1.wp-block-heading {
  font-size: 40px;
  line-height: 45px;
  margin-top: 18px;
  margin-bottom: 10px;
}
.entry-content h2,
.entry-content h2.wp-block-heading {
  font-size: 30px;
  line-height: 34px;
  margin-top: 18px;
  margin-bottom: 10px;
}
.entry-content h3,
.entry-content h3.wp-block-heading {
  font-size: 22px;
  line-height: 27px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-size: 18px;
  line-height: 24px;
  margin-top: 14px;
  margin-bottom: 6px;
}

/* Post reset — links, paragraphs, lists */
.post a { text-decoration: underline; border: 0; }
.post a:hover { color: #f9545a !important; }
.post ol,
.post ul { list-style: inherit; margin-bottom: inherit; padding-left: 30px !important; }
.post li { margin-bottom: 10px; }
.post p { margin-bottom: 0; }
.post p,
.post li { line-height: 24px; }

@media screen and (max-width: 1200px) {
  .post li { font-size: 14px; }
}
@media screen and (max-width: 1012px) {
  .entry-content iframe { width: 100%; height: 300px; }
  #singlepost .post { padding-top: 20px; padding-bottom: 20px; }
}

/* Images inside entry-content */
.entry-content img {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ============================================================
   WP BLOCK — GALLERY
   ============================================================ */
.wp-block-gallery {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.wp-block-gallery .wp-block-image {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
  margin: 0 !important;
}
.wp-block-gallery .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 !important;
}
@media screen and (max-width: 600px) {
  .wp-block-gallery .wp-block-image {
    flex: 1 1 100%;
  }
}

/* ============================================================
   WP BLOCK — COMPARISON TABLE
   ============================================================ */
.wp-block-table {
  overflow-x: auto;
  margin: 10px 0 20px 0;
}
.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}
.wp-block-table table.has-fixed-layout {
  table-layout: fixed;
}
.wp-block-table td,
.wp-block-table th {
  border: none;
  padding: 0.4em 0.9em;
  vertical-align: top;
  word-break: break-word;
  line-height: 1.5;
  font-size: 14px;
}
@media screen and (max-width: 767px) {
  .wp-block-table table.has-fixed-layout {
    table-layout: auto;
  }
  .wp-block-table td {
    font-size: 13px;
    padding: 0.4em 0.5em;
  }
}

/* ============================================================
   WP BLOCK — STANDALONE IMAGE
   ============================================================ */
figure.wp-block-image {
  margin: 10px 0 20px 0;
}
figure.wp-block-image img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

/* ============================================================
   WP BLOCK — LIST
   ============================================================ */
.wp-block-list {
  padding-left: 30px !important;
  margin-bottom: 18px;
  list-style: disc;
}
.wp-block-list li {
  margin-bottom: 10px;
  line-height: 24px;
  list-style-type: disc;
}

/* ============================================================
   SCREEN READER TEXT (accessibility — hide visually)
   ============================================================ */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ============================================================
   POST NAVIGATION
   ============================================================ */
.post-navigation {
  box-shadow: none !important;
  margin-bottom: 20px !important;
  margin-top: 60px !important;
  background: none !important;
  clear: both !important;
}
.post-navigation .nav-links {
  display: block !important;
  overflow: hidden;
  max-width: 692.28px;
  margin-left: auto;
  margin-right: auto;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
  width: 47% !important;
  flex: none !important;
  background-color: #282828 !important;
  height: 210px !important;
  min-height: 0 !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  border: 0 !important;
  background-size: cover !important;
}
.post-navigation .nav-previous { float: left !important; }
.post-navigation .nav-next     { float: right !important; }

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background-image: none !important;
  background-size: auto !important;
  padding: 3.8461% 7.6923% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  transition: none !important;
  text-decoration: none !important;
  position: relative !important;
}

.post-navigation .nav-previous a::before,
.post-navigation .nav-next a::before {
  content: "" !important;
  display: block !important;
  height: 100% !important;
  width: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
}
.post-navigation .nav-previous a:hover::before,
.post-navigation .nav-previous a:focus::before,
.post-navigation .nav-next a:hover::before,
.post-navigation .nav-next a:focus::before {
  opacity: 1 !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
}

.post-navigation .nav-previous span,
.post-navigation .nav-next span {
  font-family: "Oswald", sans-serif !important;
  text-shadow: -1px 2px 3px rgba(0, 0, 0, 0.8) !important;
  text-align: center !important;
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  color: #fff !important;
}
.post-navigation span.meta-nav {
  font-size: 20px !important;
  color: #f7232b !important;
}
.post-navigation span.post-title {
  font-size: 25px !important;
  color: #fff !important;
}

@media screen and (max-width: 1012px) {
  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    width: 100% !important;
    height: 133.1px !important;
    float: none !important;
  }
  .post-navigation .nav-next { margin-top: 20px !important; }
}

/* ============================================================
   CLEAR FLOAT
   ============================================================ */
.clear {
  clear: both;
  display: block;
  height: 0;
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE — HERO
   ============================================================ */
@media screen and (max-width: 1200px) {
  .box1single h1 { font-size: 42px !important; line-height: 50px !important; }
}
@media screen and (max-width: 1012px) {
  .box1single { height: 446px !important; }
  #nav-prev, #nav-next { top: 47%; }
  .rsocial .shareproject { display: none; }
  .rsocial { margin-left: -70px; }
}
@media screen and (max-width: 767px) {
  .box1single h1 { font-size: 25px !important; line-height: 33px !important; margin: 0 !important; padding: 0 10% !important; }
  #box1.box1single { margin: 0 !important; }
  #dateauthor span { display: none; }
  #dateauthor a { display: block; }
  #singlepost .post { padding-top: 20px; padding-bottom: 20px; }
  .entry-content { padding: 0 2% 0 2%; }
}
