/* 
 * Section Element Styles
 * Created for USFleetTracking.com
 */

/* Base Section Styles */
section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

/* Section Size Variants */
section.section-sm {
  padding: 3rem 0;
}

section.section-lg {
  padding: 8rem 0;
}

/* Section with Background */
section.bg-gray-50 {
  background-color: var(--color-bg-light);
  position: relative;
}

section.bg-gray-50::before,
section.bg-gray-50::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.05;
  z-index: 0;
}

section.bg-gray-50::before {
  top: -150px;
  left: -150px;
}

section.bg-gray-50::after {
  bottom: -150px;
  right: -150px;
}

/* Section Title */
.section-title {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

/* Section Heading */
.section-heading {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
}

.section-base {   
  margin: 0; 
  padding: 1em;
}

/* Design System Variables */
:root {
  --section-padding: 1rem 0;
  --section-gap: 2rem;
  --card-padding: 2rem;
  --card-radius: 8px;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --primary-color: #0a4275;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
}

/* Standardized Section Layout */
.section-base {
  padding: var(--section-padding);
  margin-bottom: 1rem;
}

.section-base.bg-gray-50 {
  background-color: var(--gray-50);
}

/* High specificity to override card flex-direction */
article.card .section-row,
.container.card .section-row,
.card .section-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--section-gap);
  width: 100%;
}

/* Ensure flex items work properly within cards */
article.card .article-flex-content,
article.card .article-flex-image,
.container.card .article-flex-content,
.container.card .article-flex-image,
.card .article-flex-content,
.card .article-flex-image {
  flex: 1;
  min-width: 0;
  width: auto;
}

/* Standardized Card Styling */
.card {
  background: white;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--card-padding);
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .article-flex-content,
  .article-flex-image {
    flex: none;
    width: 100%;
  }
}

/* Responsive Adjustments */
@media only screen and (max-width: 768px) {
  section {
    background-color: white;
    padding: 4rem 0;
  }

  section.section-sm {
    padding: 2rem 0;
  }

  section.section-lg {
    padding: 6rem 0;
  }

  .section-row {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .article-flex-content,
  .article-flex-image {
    width: 100%;
    flex: none;
  }
}
