/**
 * Seaplast Theme Main Layout & Typography Stylesheet
 */

/* -------------------------------------------------------------
 * CONTAINER & LAYOUT UTILITIES
 * ------------------------------------------------------------- */
.sp-site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sp-site-content {
  flex: 1 0 auto;
}

.sp-page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 24px;
}

.sp-main-content {
  background-color: transparent;
  min-height: 500px;
}

.text-center {
  text-align: center;
}

/* -------------------------------------------------------------
 * POST & PAGE TYPOGRAPHY
 * ------------------------------------------------------------- */
.sp-page-header,
.sp-post-header,
.sp-archive-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #E2E8F0;
}

/* -------------------------------------------------------------
 * BREADCRUMBS STYLING (YOAST SEO, RANK MATH & NATIVE)
 * ------------------------------------------------------------- */
.sp-breadcrumb-nav {
  margin-bottom: 20px;
  font-size: 14px;
}

.sp-breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sp-breadcrumbs-list a,
.sp-yoast-breadcrumbs a,
.rank-math-breadcrumb a {
  color: var(--sp-brand-teal);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sp-breadcrumbs-list a:hover,
.sp-yoast-breadcrumbs a:hover,
.rank-math-breadcrumb a:hover {
  color: #00849c;
  text-decoration: underline;
}

.sp-crumb-sep,
.rank-math-breadcrumb .separator {
  color: #94A3B8;
  margin: 0 4px;
}

.sp-breadcrumbs-list .is-active,
.rank-math-breadcrumb .last {
  color: #64748B;
  font-weight: 500;
}

.sp-page-title,
.sp-post-title,
.sp-archive-title {
  font-size: 36px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 12px 0;
  line-height: 1.25;
}

.sp-post-meta {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
}

.sp-entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.sp-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* -------------------------------------------------------------
 * POST GRID CARDS
 * ------------------------------------------------------------- */
.sp-grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.sp-card-post {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sp-card-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.sp-card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.sp-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sp-card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.sp-card-title a {
  color: #0F172A;
  text-decoration: none;
}

.sp-card-title a:hover {
  color: var(--sp-brand-teal);
}

.sp-card-excerpt {
  color: #64748B;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.sp-card-link {
  font-weight: 700;
  color: var(--sp-brand-teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* 404 Styling */
.sp-404-title {
  font-size: 96px;
  font-weight: 900;
  color: var(--sp-brand-teal);
  margin: 0;
  line-height: 1;
}

.sp-404-subtitle {
  font-size: 28px;
  font-weight: 700;
  color: #0F172A;
  margin: 16px 0;
}

.sp-404-text {
  color: #64748B;
  font-size: 16px;
}

/* Utility Helpers */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.py-5 { padding-top: 48px; padding-bottom: 48px; }

/* Teal Accent Text */
.sp-text-teal {
  color: var(--sp-brand-teal);
}

/* Search Form Wrapper */
.sp-search-form-wrapper .search-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.sp-search-form-wrapper .search-field {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--sp-font-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.sp-search-form-wrapper .search-field:focus {
  border-color: var(--sp-brand-teal);
}

.sp-search-form-wrapper .search-submit {
  padding: 12px 24px;
  background: var(--sp-brand-teal);
  color: #FFF;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sp-search-form-wrapper .search-submit:hover {
  background: #0090a8;
}

/* Featured Image on Single Post */
.sp-post-featured-image {
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
}

.sp-post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Logo Styling in Header & Footer */
.sp-logo-wrapper {
  display: flex;
  flex-direction: column;
}

.sp-logo-text {
  font-size: 28px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.sp-logo-reg {
  font-size: 14px;
  vertical-align: super;
  opacity: 0.7;
}

.sp-logo-subtext {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--sp-brand-teal);
  text-transform: uppercase;
}

.sp-logo-link {
  text-decoration: none;
}

/* -------------------------------------------------------------
 * ELEMENTOR FULL-WIDTH & CONTAINER COMPATIBILITY
 * ------------------------------------------------------------- */
.sp-page-container.sp-elementor-content-container,
.sp-full-width-content-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sp-main-elementor,
.sp-main-full-width {
  background-color: transparent !important;
}

body.sp-built-with-elementor #sp-content,
body.sp-full-width-layout #sp-content {
  width: 100%;
  overflow-x: hidden;
}

/* Fix Elementor stretched sections and Flexbox containers when inside theme wrapper */
.elementor-section-stretched,
.elementor-section-full_width,
.e-con.e-parent,
.e-con-full {
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Zero out default Elementor container padding & margins for ALL Seaplast Widgets */
.elementor-widget-seaplast_hero_widget,
.elementor-widget-seaplast_hero_widget > .elementor-widget-container,
.elementor-widget-seaplast_showcase_widget,
.elementor-widget-seaplast_showcase_widget > .elementor-widget-container,
.elementor-widget-seaplast_industries_widget,
.elementor-widget-seaplast_industries_widget > .elementor-widget-container,
.elementor-widget-seaplast_stats_widget,
.elementor-widget-seaplast_stats_widget > .elementor-widget-container,
.elementor-widget-seaplast_certifications_widget,
.elementor-widget-seaplast_certifications_widget > .elementor-widget-container,
.elementor-widget-seaplast_facility_widget,
.elementor-widget-seaplast_facility_widget > .elementor-widget-container,
.elementor-widget-seaplast_configurator_widget,
.elementor-widget-seaplast_configurator_widget > .elementor-widget-container,
.elementor-widget-seaplast_global_map_widget,
.elementor-widget-seaplast_global_map_widget > .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Reset Elementor Parent Container padding for full-bleed Seaplast widgets */
.e-con:has(.sp-hero-section),
.e-con:has(.sp-showcase-section),
.e-con:has(.sp-industries-section),
.e-con:has(.sp-stats-section),
.e-con:has(.sp-certs-section),
.e-con:has(.sp-facility-section),
.e-con:has(.sp-config-section),
.e-con:has(.sp-map-section),
.e-con-full:has(.sp-hero-section),
.e-con-full:has(.sp-showcase-section),
.e-con-full:has(.sp-industries-section),
.e-con-full:has(.sp-stats-section),
.e-con-full:has(.sp-certs-section),
.e-con-full:has(.sp-facility-section),
.e-con-full:has(.sp-config-section),
.e-con-full:has(.sp-map-section),
.e-con.e-parent {
  --padding-top: 0px !important;
  --padding-bottom: 0px !important;
  --padding-left: 0px !important;
  --padding-right: 0px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.sp-canvas-template #sp-page {
  min-height: 100vh;
}
