/*
Theme Name: Total Child
Theme URI: https://www.eventtentsforsales.com/
Description: Child theme for the Total WordPress theme used by Event Tents For Sale. Includes article-page component styles (fact-strip, spec/timeline tables, FAQ cards, end CTA, YARPP cards, sidebar widgets) based on the article-restaurant-prototype design.
Author: Event Tents For Sale
Author URI: https://www.eventtentsforsales.com/
Template: total
Version: 1.2.0
Requires PHP: 7.2
Text Domain: total-child
*/

/*
 * Article-page enhancement styles.
 * Scope: .entry-content (article body) and #secondary (sidebar) only.
 * Brand color follows the Total theme variable --total-template-color (#2d83b4).
 * Rollback: remove this block or deactivate the child theme.
 */

/* ---------- 1. Article body basics ---------- */

.entry-content figure {
  margin: 26px 0 34px;
}

.entry-content figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #edf0f1;
  border-radius: 3px;
}

.entry-content figcaption {
  padding-top: 8px;
  color: #7b848a;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.entry-content h2 {
  border-left: 4px solid var(--total-template-color, #2d83b4);
  padding-left: 13px;
}

.entry-content table:not(.tablepress):not(.wp-block-table) {
  width: 100%;
  margin: 24px 0 30px;
  border-collapse: collapse;
  border: 1px solid #e2e6e8;
  font-size: 15px;
}

.entry-content table:not(.tablepress):not(.wp-block-table) th,
.entry-content table:not(.tablepress):not(.wp-block-table) td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e6e8;
  text-align: left;
  vertical-align: top;
}

.entry-content table:not(.tablepress):not(.wp-block-table) tr:last-child th,
.entry-content table:not(.tablepress):not(.wp-block-table) tr:last-child td {
  border-bottom: 0;
}

.entry-content table:not(.tablepress):not(.wp-block-table) th {
  width: 35%;
  color: #3d484e;
  background: #f7f8f8;
  font-weight: 650;
}

/* ---------- 2. Article summary block ---------- */

.entry-content .article-summary {
  margin: 0 0 28px;
  padding: 20px 22px;
  color: #39464d;
  background: #f3f9fb;
  border-left: 4px solid var(--total-template-color, #2d83b4);
  font-size: 17px;
  line-height: 1.72;
}

/* ---------- 3. Fact strip (key figures bar) ---------- */

.entry-content .fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 28px 0 32px;
  border: 1px solid #e2e6e8;
}

.entry-content .fact-strip .fact {
  padding: 17px 12px;
  text-align: center;
  border-right: 1px solid #e2e6e8;
}

.entry-content .fact-strip .fact:last-child { border-right: 0; }

.entry-content .fact-strip .fact strong {
  display: block;
  color: #34434a;
  font-size: 20px;
  line-height: 1.25;
}

.entry-content .fact-strip .fact span {
  display: block;
  margin-top: 4px;
  color: #7b848a;
  font-size: 12px;
  line-height: 1.35;
}

/* ---------- 4. Specification / timeline tables ---------- */

.entry-content .specification-table,
.entry-content .timeline-table {
  width: 100%;
  margin: 24px 0 30px;
  border-collapse: collapse;
  border: 1px solid #e2e6e8;
  font-size: 15px;
}

.entry-content .specification-table th,
.entry-content .specification-table td,
.entry-content .timeline-table th,
.entry-content .timeline-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e6e8;
  text-align: left;
  vertical-align: top;
}

.entry-content .specification-table tr:last-child th,
.entry-content .specification-table tr:last-child td,
.entry-content .timeline-table tr:last-child th,
.entry-content .timeline-table tr:last-child td {
  border-bottom: 0;
}

.entry-content .specification-table th,
.entry-content .timeline-table th {
  width: 35%;
  color: #3d484e;
  background: #f7f8f8;
  font-weight: 650;
}

/* ---------- 5. Engineering note ---------- */

.entry-content .article-note {
  margin: 28px 0;
  padding: 18px 20px;
  color: #4c575d;
  background: #fafafa;
  border: 1px solid #e2e6e8;
  border-left: 4px solid #8aa4af;
}

.entry-content .article-note strong {
  display: block;
  margin-bottom: 4px;
  color: #334148;
}

.entry-content .article-note p {
  margin: 0;
  font-size: 14px;
}

/* ---------- 6. FAQ cards ---------- */

.entry-content .faq-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.entry-content .faq-list .faq-item {
  padding: 16px 18px;
  background: #fbfbfb;
  border: 1px solid #e2e6e8;
}

.entry-content .faq-list .faq-item h3 {
  margin: 0 0 6px;
  color: #3c474d;
  font-size: 16px;
  font-weight: 700;
  border-left: 0;
  padding-left: 0;
}

.entry-content .faq-list .faq-item p {
  margin: 0;
  color: #596268;
  font-size: 14px;
}

/* ---------- 7. End-of-article CTA ---------- */

.entry-content .article-end-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 36px 0 34px;
  padding: 22px 24px;
  background: #f2f8fa;
  border: 1px solid #d4e8ee;
}

.entry-content .article-end-cta strong {
  display: block;
  margin-bottom: 3px;
  color: #34434a;
  font-size: 18px;
}

.entry-content .article-end-cta p {
  margin: 0;
  color: #657078;
  font-size: 14px;
}

.entry-content .theme-button,
.entry-content .article-end-cta .theme-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 17px;
  color: #fff;
  background: var(--total-template-color, #2d83b4);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.entry-content .theme-button:hover,
.entry-content .article-end-cta .theme-button:hover {
  color: #fff;
  background: #147b9d;
}

/* ---------- 8. YARPP related posts as cards ---------- */

.entry-content .yarpp-related {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid #e2e6e8;
}

.entry-content .yarpp-related h3 {
  margin: 0 0 6px;
  color: #3f474c;
  font-size: 20px;
}

.entry-content .yarpp-thumbnails-horizontal {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail {
  display: block;
  color: #41494e;
  border: 1px solid #e2e6e8;
  text-decoration: none;
}

.entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail:hover {
  color: #147b9d;
  border-color: #b9d9e3;
}

.entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

.entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail-title {
  display: block;
  padding: 11px 12px 13px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

/* ---------- 9. Sidebar widgets ---------- */

#secondary .widget {
  margin-bottom: 28px;
}

#secondary .widget-title,
#secondary .widget h2,
#secondary .widget h3 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  color: #3f474c;
  border-bottom: 1px solid #e2e6e8;
  font-size: 20px;
  line-height: 1.3;
}

/* Content Views latest posts: cards (4:3 image + caption below, matching prototype related-card) */
#secondary .pt-cv-wrapper .pt-cv-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

#secondary .pt-cv-wrapper .pt-cv-content-item {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e2e6e8 !important;
}

#secondary .pt-cv-wrapper .pt-cv-thumb-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

#secondary .pt-cv-wrapper .pt-cv-thumb-wrapper img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  max-width: 100% !important;
}

#secondary .pt-cv-wrapper .pt-cv-remain-wrapper {
  margin: 0 !important;
  padding: 11px 12px 13px !important;
}

#secondary .pt-cv-wrapper .pt-cv-title {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
}

/* Search widget */
#secondary .widget_search form,
#secondary .search-form {
  display: flex;
  align-items: stretch;
}

#secondary .widget_search form label,
#secondary .search-form label {
  flex: 1 1 auto;
  margin: 0;
  display: block;
}

#secondary .widget_search input.search-field,
#secondary .search-form input.search-field,
#secondary .widget_search input[type="search"],
#secondary .search-form input[type="search"] {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  height: 44px;
  padding: 8px 11px;
  border: 1px solid #d8dddf;
  border-right: 0;
  font-size: 13px;
  display: block;
}

#secondary .widget_search input.search-submit,
#secondary .search-form input.search-submit,
#secondary .widget_search input[type="submit"],
#secondary .search-form input[type="submit"],
#secondary .widget_search button,
#secondary .search-form button {
  flex: 0 0 auto;
  min-width: 76px;
  height: 44px;
  padding: 0 14px;
  color: #fff;
  background: var(--total-template-color, #2d83b4);
  border: 1px solid var(--total-template-color, #2d83b4);
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
}

/* Quote / contact form widget */
#secondary .quote-widget {
  padding: 24px;
  background: #fafafa;
  border: 1px solid #e2e6e8;
}

#secondary .quote-widget .form-field {
  margin-bottom: 13px;
}

#secondary .quote-widget label {
  display: block;
  margin-bottom: 5px;
  color: #596268;
  font-size: 13px;
  font-weight: 600;
}

#secondary .quote-widget input,
#secondary .quote-widget select,
#secondary .quote-widget textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d9dee0;
  font-size: 14px;
}

#secondary .quote-widget textarea {
  min-height: 96px;
  resize: vertical;
}

#secondary .quote-widget button {
  width: 100%;
  min-height: 42px;
  color: #fff;
  background: var(--total-template-color, #2d83b4);
  border: 0;
  font-weight: 650;
  cursor: pointer;
}

/* Topic list widget */
#secondary .topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#secondary .topic-list li {
  border-bottom: 1px solid #e2e6e8;
}

#secondary .topic-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 3px;
  color: #4a5358;
  text-decoration: none;
  font-size: 14px;
}

#secondary .topic-list a::after {
  color: #9aa2a6;
  content: ">";
}

/* Featured topic cards */
#secondary .featured-topics {
  display: grid;
  gap: 12px;
}

#secondary .featured-topic {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  display: block;
  color: #fff;
  background: #35434a;
  text-decoration: none;
}

#secondary .featured-topic img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  opacity: 0.64;
}

#secondary .featured-topic span {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

#secondary .featured-topic:hover { color: #fff; }
#secondary .featured-topic:hover img { opacity: 0.76; }

/* Recent projects list */
#secondary .recent-projects {
  display: grid;
  gap: 14px;
}

#secondary .recent-project {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #424b50;
  text-decoration: none;
}

#secondary .recent-project img {
  width: 92px;
  height: 70px;
  object-fit: cover;
}

#secondary .recent-project span {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

/* ---------- 10. Responsive ---------- */

@media (max-width: 720px) {
  .entry-content .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .entry-content .fact-strip .fact:nth-child(2) { border-right: 0; }
  .entry-content .fact-strip .fact:nth-child(-n+2) { border-bottom: 1px solid #e2e6e8; }
  .entry-content .article-end-cta { display: block; }
  .entry-content .article-end-cta .theme-button { margin-top: 14px; }
  .entry-content .yarpp-thumbnails-horizontal { grid-template-columns: 1fr; }
  .entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
  }
  .entry-content .yarpp-thumbnails-horizontal .yarpp-thumbnail > img {
    height: 100%;
    aspect-ratio: 1;
  }
  .entry-content .specification-table th,
  .entry-content .specification-table td,
  .entry-content .timeline-table th,
  .entry-content .timeline-table td { padding: 10px; }
  #secondary .pt-cv-wrapper .pt-cv-view { grid-template-columns: repeat(2, 1fr); }
}
