/* Nuclear approach to override all Divi layout constraints */
.ecw-template-single {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.et_right_sidebar #main-content .container:before {
  display: none !important;
}

.et_right_sidebar #left-area {
    float: none !important;
    padding-right: 0 !important;
}

/* Override Divi container constraints */
#main-content .container,
#main-content .et_pb_row,
#main-content .et_pb_section,
.et_pb_section .et_pb_row {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide sidebars and force single column */
#sidebar,
.et_pb_sidebar_0,
.et_pb_sidebar_1,
.et_pb_sidebar_2,
.et_pb_sidebar_3 {
  display: none !important;
}

/* Remove Divi separators and borders */
.et_pb_section_separator_top,
.et_pb_section_separator_bottom,
.et_pb_top_inside_divider,
.et_pb_bottom_inside_divider {
  display: none !important;
}

/* Template page specific styles */
.ecw-template-single {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #ffffff;
}

.ecw-template-single * {
  box-sizing: border-box;
}

.ecw-back-link {
  background: #fff;
  padding: 20px 40px;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ecw-back-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.ecw-back-link a:hover {
  color: #764ba2;
}

.ecw-template-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ecw-template-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  z-index: 1;
}

.ecw-template-header-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.ecw-template-header-text {
  flex: 1;
  text-align: left;
}

.ecw-template-header-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ecw-template-header-image img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border: 4px solid rgba(255,255,255,0.2);
  background: white;
  padding: 20px;
}

.ecw-template-header-actions {
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.ecw-template-header-actions .ecw-btn {
  flex: 0 0 auto;
  min-width: 160px;
}

.ecw-template-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ecw-template-title-sub {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ecw-template-title-sub-sub {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  margin-bottom: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ecw-template-description {
  font-size: 1.3rem;
  line-height: 1.6;
  margin: 0;
  color: rgba(255,255,255,0.95);
  font-weight: 300;
}

.ecw-template-intro {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
  background: #f8f9fa;
}

.ecw-template-intro-content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.ecw-template-intro-text {
  flex: 2;
}

.ecw-template-intro-image {
  flex: 1;
  max-width: 400px;
}

.ecw-template-intro-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 2px solid rgba(0,0,0,0.1);
}

.ecw-template-intro h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 30px 0;
  line-height: 1.3;
}

.ecw-template-intro p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #495057;
  margin: 0 0 25px 0;
}

.ecw-template-intro p:last-child {
  margin-bottom: 0;
}

.ecw-promo-intro-content {
  text-align: center;
}

/* Remove link styling from card titles */
.ecw-card-title {
  text-decoration: none !important;
  color: inherit !important;
}

.ecw-card-title:hover {
  text-decoration: none !important;
  color: inherit !important;
}

@media (max-width: 768px) {
  .ecw-template-intro-content {
    flex-direction: column;
    gap: 20px;
  }

  .ecw-template-intro-image {
    max-width: 100%;
  }
}

.ecw-template-features {
  padding: 80px 40px;
  background: white;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.feature-item {
  background: #f8f9fa;
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.feature-item h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 15px 0;
}

.feature-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: #6c757d;
  margin: 0;
}

.ecw-btn {
  display: inline-block;
  padding: 15px 30px;
  margin: 0 10px 10px 0;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  border-color: white;
}

.ecw-btn-primary {
  background: #007bff;
  color: white !important;
}

.ecw-btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.ecw-btn-signup {
  background: #28a745;
  color: white !important;
}

.ecw-btn-signup:hover {
  background: #1e7e34;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40,167,69,0.3);
}

.ecw-template-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ecw-template-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  z-index: 1;
}

.ecw-template-cta-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.ecw-template-cta h2 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 25px 0;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ecw-template-cta p {
  font-size: 1.3rem;
  line-height: 1.6;
  margin: 0 0 40px 0;
  color: rgba(255,255,255,0.95);
  font-weight: 300;
}

.ecw-template-cta .ecw-btn {
  font-size: 1.2rem;
  padding: 18px 40px;
  margin: 0 15px;
}

.ecw-template-more {
  background: #f8f9fa;
  padding: 100px 40px;
}

.ecw-template-more-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.ecw-template-more h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 20px 0;
  line-height: 1.3;
}

.ecw-template-more p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #6c757d;
  margin: 0 0 60px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.ecw-template-more .ecw-cardpromo-container {
  margin-top: 0;
}

/* Global Layout Improvements */
.ecw-template-single {
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ecw-template-header {
    padding: 60px 20px;
  }

  .ecw-template-header-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    align-items: center;
  }

  .ecw-template-header-text {
    text-align: center;
    order: 2;
  }

  .ecw-template-header-right {
    order: 1;
    gap: 25px;
  }

  .ecw-template-header-image img {
    max-width: 220px;
  }

  .ecw-template-header-actions {
    max-width: 220px;
    margin-top: 25px;
    gap: 12px;
  }

  .ecw-template-header-actions .ecw-btn {
    min-width: 140px;
    font-size: 1rem;
    padding: 14px 20px;
  }

  .ecw-template-title {
    font-size: 2.5rem;
  }

  .ecw-template-description {
    font-size: 1.1rem;
  }

  .ecw-template-intro,
  .ecw-template-actions,
  .ecw-template-cta,
  .ecw-template-more {
    padding: 40px 20px;
  }

  .ecw-back-link,
  .ecw-template-categories-header {
    padding: 15px 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ecw-btn {
    display: block;
    margin: 10px 0;
    text-align: center;
  }

  .ecw-template-description {
    font-size: 1.1rem;
  }

  .ecw-template-intro {
    padding: 60px 20px;
  }

  .ecw-template-intro h2 {
    font-size: 2rem;
  }

  .ecw-template-intro p {
    font-size: 1.1rem;
  }

  .ecw-template-features {
    padding: 60px 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .feature-item {
    padding: 30px 25px;
  }

  .ecw-template-cta {
    padding: 80px 20px;
  }

  .ecw-template-cta h2 {
    font-size: 2.2rem;
  }

  .ecw-template-cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }

  .ecw-template-cta .ecw-btn {
    font-size: 1.1rem;
    padding: 16px 30px;
    margin: 0 10px;
  }

  .ecw-template-more {
    padding: 80px 20px;
  }

  .ecw-template-more h2 {
    font-size: 2.2rem;
  }

  .ecw-template-more p {
    font-size: 1.1rem;
    margin-bottom: 50px;
  }

  .ecw-back-link {
    padding: 15px 20px;
  }
}

.ecw-template-categories-header {
  background: rgba(255,255,255,0.15);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-top: 25px;
  display: inline-block;
  backdrop-filter: blur(10px);
  max-width: 370px;
}

.ecw-template-categories-header strong {
  color: white;
}

/* ECW Showcase Specific Styles */
.ecw-showcase-single {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #ffffff;
}

.ecw-showcase-single * {
  box-sizing: border-box;
}

.ecw-showcase-header {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
  color: white;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ecw-showcase-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  z-index: 1;
}

.ecw-showcase-header > * {
  position: relative;
  z-index: 2;
}

.ecw-showcase-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ecw-showcase-description {
  font-size: 1.25rem;
  margin: 0;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

.ecw-showcase-logo-header {
  background: #f8f9fa;
  padding: 40px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.ecw-showcase-logo {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ecw-showcase-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
}

.ecw-showcase-categories {
  background: #f8f9fa;
  padding: 20px 40px;
  border-left: 4px solid #007cba;
  margin: 40px 0;
  font-size: 1.1rem;
}

.ecw-showcase-categories strong {
  color: #007cba;
  font-weight: 600;
}

.ecw-showcase-actions {
  text-align: center;
  margin: 50px 0;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.ecw-showcase-images {
  margin: 50px 0;
  text-align: center;
}

.ecw-showcase-images img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ecw-showcase-images img:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.ecw-btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(108,117,125,0.3);
}


.ecw-btn-secondary {
  background: #000000;
  color: white !important;
}

.ecw-btn-secondary:hover {
  background: #2e2e2e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40,167,69,0.3);
}

.ecw-showcase-templates {
  margin-top: 80px;
  padding: 60px 40px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  text-align: center;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ecw-showcase-templates h3 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.ecw-showcase-templates p {
  color: #6c757d;
  font-size: 1.2rem;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Additional responsive styles for Showcase */
@media (max-width: 768px) {
  .ecw-showcase-header {
    padding: 60px 20px;
  }

  .ecw-showcase-title {
    font-size: 2rem;
  }

  .ecw-showcase-description {
    font-size: 1.1rem;
  }

  .ecw-showcase-content {
    padding: 40px 20px;
  }

  .ecw-showcase-actions {
    padding: 30px 20px;
  }

  .ecw-showcase-templates {
    padding: 40px 20px;
    margin-top: 60px;
  }

  .ecw-showcase-templates h3 {
    font-size: 2rem;
  }
}