/* ==========================================================================
   FitTree pSEO — Unified Full-Width & Studio Image Stylesheet v1.2.0
   Fixes Astra container alignment, image cropping (object-fit), and card grids
   ========================================================================== */

/* 0. Unconditional Astra & Theme Full-Width Reset (only loaded on pSEO templates) */
#page #content.site-content,
#content.site-content,
.site-content > .ast-container,
#content > .ast-container,
#page .site-content .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.pseo-template-v3 {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 100% !important;
}

/* 1. Force full-width stretched container in Astra & WooCommerce themes */
body.fpseo-fullwidth-page #content.site-content,
body.post-type-archive-ft_pseo_page #content.site-content,
body.single-ft_pseo_page #content.site-content,
body.tax-pseo_destination #content.site-content,
body.tax-pseo_product_cat #content.site-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
}

body.fpseo-fullwidth-page #content > .ast-container,
body.post-type-archive-ft_pseo_page #content > .ast-container,
body.single-ft_pseo_page #content > .ast-container,
body.tax-pseo_destination #content > .ast-container,
body.tax-pseo_product_cat #content > .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.fpseo-fullwidth-page #secondary,
body.post-type-archive-ft_pseo_page #secondary,
body.single-ft_pseo_page #secondary {
  display: none !important;
}

/* 2. Core Design Tokens & Reset */
.pseo-template-v3 {
  --teal: #0f7c8a;
  --teal-dark: #0b5b66;
  --teal-soft: #e6f4f6;
  --navy: #0b3654;
  --bg-light: #eaf6f7;
  --bg-soft: #f6fafb;
  --text-dark: #12303f;
  --text-muted: #526b77;
  --border: #dcebee;
  --radius: 16px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.65;
  background: #ffffff;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

.pseo-template-v3 *,
.pseo-template-v3 *::before,
.pseo-template-v3 *::after {
  box-sizing: border-box;
}

.pseo-template-v3 a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.pseo-template-v3 ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pseo-template-v3 img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pseo-template-v3 .container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto !important;
  padding: 0 24px;
}

/* 3. Buttons */
.pseo-template-v3 .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 2px solid transparent;
  text-decoration: none !important;
}

.pseo-template-v3 .btn-primary {
  background: var(--teal);
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(15, 124, 138, 0.22);
}

.pseo-template-v3 .btn-primary:hover {
  background: var(--teal-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.pseo-template-v3 .btn-outline {
  border-color: var(--teal);
  color: var(--teal) !important;
  background: #ffffff;
}

.pseo-template-v3 .btn-outline:hover {
  background: var(--teal);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* 4. Hero Section (Singular & Archive) */
.pseo-template-v3 .hero {
  background: linear-gradient(135deg, #eaf6f7 0%, #d8eef1 100%);
  padding: 52px 0 48px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.pseo-template-v3 .hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 44px;
  align-items: center;
}

.pseo-template-v3.pseo-archive-v3 .hero .container {
  display: block;
  max-width: 960px;
  text-align: center;
}

.pseo-template-v3 .crumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pseo-template-v3.pseo-archive-v3 .crumb {
  justify-content: center;
}

.pseo-template-v3 .crumb a {
  color: var(--teal);
  font-weight: 600;
}

.pseo-template-v3 .crumb a:hover {
  text-decoration: underline;
}

.pseo-template-v3 .hero h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.22;
  color: var(--navy);
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.pseo-template-v3 .hero h1 span {
  color: var(--teal);
}

.pseo-template-v3 .hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.pseo-template-v3 .hero .cta-row {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* Studio Hero Image Frame — Uncropped & Centered */
.pseo-template-v3 .hero-img {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 14px 36px rgba(11, 54, 84, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  position: relative;
  overflow: hidden;
}

.pseo-template-v3 .hero-img img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 10px;
}

/* 5. Content Sections */
.pseo-template-v3 section.block {
  padding: 56px 0;
  width: 100%;
}

.pseo-template-v3 section.block.alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pseo-template-v3 .block h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  color: var(--navy);
  font-weight: 700;
  text-align: center;
  margin: 0;
  line-height: 1.3;
}

.pseo-template-v3 .block .dash {
  width: 64px;
  height: 3.5px;
  background: var(--teal);
  margin: 14px auto 22px;
  border-radius: 4px;
}

.pseo-template-v3 .block .lead {
  color: var(--text-muted);
  max-width: 860px;
  margin: 0 auto;
  font-size: 15px;
  text-align: center;
  line-height: 1.7;
}

/* 6. Specification & Compliance Cards (Singular Page) */
.pseo-template-v3 .spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
  align-items: stretch;
}

.pseo-template-v3 .spec-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(11, 54, 84, 0.04);
  height: 100%;
}

.pseo-template-v3 .spec-card h3,
.pseo-template-v3 .spec-card h4 {
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pseo-template-v3 .spec-card h3 i,
.pseo-template-v3 .spec-card h4 i {
  color: var(--teal);
  font-size: 18px;
}

.pseo-template-v3 .spec-card li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 9px 0 9px 26px;
  position: relative;
  margin: 0;
  border-bottom: 1px dashed var(--border);
  line-height: 1.55;
}

.pseo-template-v3 .spec-card li strong {
  color: var(--navy);
  font-weight: 600;
}

.pseo-template-v3 .spec-card li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pseo-template-v3 .spec-card li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 12px;
  top: 12px;
}

/* 7. Filter Chips / Country Pills */
.pseo-template-v3 .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.pseo-template-v3 .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy) !important;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(11, 54, 84, 0.03);
}

.pseo-template-v3 .chip:hover,
.pseo-template-v3 .chip.chip-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 124, 138, 0.2);
}

/* 8. Archive Hub 3-Column Product Card Grid (/export-products/) */
.pseo-archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px 22px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 14px;
}

.pseo-archive-toolbar__count {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}

.pseo-archive-toolbar__search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pseo-archive-toolbar__search input {
  padding: 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 13.5px;
  font-family: inherit;
  min-width: 240px;
  background: #ffffff;
  color: var(--text-dark);
}

.pseo-archive-toolbar__search button {
  padding: 9px 20px;
  border-radius: 50px;
  border: none;
  background: var(--teal);
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.pseo-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.pseo-archive-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 18px rgba(11, 54, 84, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.pseo-archive-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 14px 32px rgba(11, 54, 84, 0.12);
}

/* Studio Image Frame inside Archive Cards — NO Cropping */
.pseo-archive-card__media {
  position: relative;
  height: 220px;
  width: 100%;
  background: linear-gradient(180deg, #f8fcfd 0%, #eef7f8 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pseo-archive-card__media img {
  width: 100% !important;
  height: 188px !important;
  max-width: 100% !important;
  max-height: 188px !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 8px;
  transition: transform 0.35s ease;
}

.pseo-archive-card:hover .pseo-archive-card__media img {
  transform: scale(1.04);
}

.pseo-archive-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--navy);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(11, 54, 84, 0.2);
  z-index: 2;
}

.pseo-archive-card__cat-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 2;
}

.pseo-archive-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.pseo-archive-card__title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  text-align: left !important;
  margin: 0 0 14px !important;
  line-height: 1.38 !important;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pseo-archive-card__title a {
  color: var(--navy) !important;
}

.pseo-archive-card__title a:hover {
  color: var(--teal) !important;
}

/* 2x2 Spec Mini-Grid inside Each Archive Card for Uniform Alignment */
.pseo-archive-card__spec-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 18px;
}

.pseo-archive-card__spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pseo-archive-card__spec-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 600;
}

.pseo-archive-card__spec-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pseo-archive-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-dark) !important;
  font-size: 13.5px;
  font-weight: 700;
  margin-top: auto;
  transition: all 0.2s ease;
}

.pseo-archive-card:hover .pseo-archive-card__cta {
  background: var(--teal);
  color: #ffffff !important;
}

/* 9. Pagination */
.pseo-archive-pagination {
  margin-top: 42px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pseo-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--navy) !important;
  font-weight: 600;
  font-size: 14px;
}

.pseo-archive-pagination .page-numbers.current,
.pseo-archive-pagination .page-numbers:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff !important;
}

/* 10. FAQ Accordion */
.pseo-template-v3 .faq-list {
  max-width: 860px;
  margin: 28px auto 0;
}

.pseo-template-v3 .faq-item {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.pseo-template-v3 .faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pseo-template-v3 .faq-item summary::-webkit-details-marker {
  display: none;
}

.pseo-template-v3 .faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

.pseo-template-v3 .faq-item[open] summary::after {
  content: "\2212";
}

.pseo-template-v3 .faq-item .fa-body {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 11. Bottom CTA Banner */
.pseo-template-v3 .cta-banner {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal-dark) 100%);
  padding: 56px 0;
  text-align: center;
  color: #ffffff;
  width: 100%;
}

.pseo-template-v3 .cta-banner h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  margin: 0 0 12px;
  color: #ffffff !important;
}

.pseo-template-v3 .cta-banner p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 720px;
  margin: 0 auto 26px;
  font-size: 15px;
}

.pseo-template-v3 .cta-banner .btn-primary {
  background: #ffffff;
  color: var(--navy) !important;
}

.pseo-template-v3 .cta-banner .btn-primary:hover {
  background: var(--bg-light);
  color: var(--teal-dark) !important;
}

.pseo-template-v3 .cta-banner .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff !important;
}

.pseo-template-v3 .cta-banner .btn-outline:hover {
  background: #ffffff;
  color: var(--navy) !important;
}

.pseo-template-v3 .cta-banner .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 12. Responsive Breakpoints */
@media (max-width: 1024px) {
  .pseo-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .pseo-template-v3 .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .pseo-template-v3 .crumb {
    justify-content: center;
  }
  .pseo-template-v3 .hero .cta-row {
    justify-content: center;
  }
  .pseo-template-v3 .hero-img {
    height: 280px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
  .pseo-template-v3 .spec-grid {
    grid-template-columns: 1fr;
  }
  .pseo-template-v3 section.block {
    padding: 42px 0;
  }
}

@media (max-width: 640px) {
  .pseo-archive-grid {
    grid-template-columns: 1fr;
  }
  .pseo-archive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .pseo-archive-toolbar__search input {
    width: 100%;
    min-width: 0;
  }
  .pseo-template-v3 .cta-banner .cta-row .btn {
    width: 100%;
  }
}
