/* ========================================
   BASE STYLES & RESET
   ======================================== */

/* ========================================
   CENTRALIZED ICON SYSTEM
   ======================================== */

/* Large icons - Main feature sections (Services, Innovation, Values, Membership) */
.card-icon,
.season-icon-img,
.benefit-icon-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 16px;
  display: block;
}

@media (min-width: 768px) {
  .card-icon,
  .season-icon-img,
  .benefit-icon-img {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }
}

@media (min-width: 1024px) {
  .card-icon,
  .season-icon-img,
  .benefit-icon-img {
    width: 112px;
    height: 112px;
    border-radius: 24px;
  }
}

/* Small icons - Secondary sections (Approach, Technology) */
.icon-small,
.tech-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

@media (min-width: 768px) {
  .icon-small,
  .tech-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

@media (min-width: 1024px) {
  .icon-small,
  .tech-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
}

/* Medium component icons - Decorative elements */
.icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .icon {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }
}

@media (min-width: 1024px) {
  .icon {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }
}

/* CSS Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Aggressive WordPress/Divi Theme Overrides */
html.et_fixed_nav #page-container {
  padding-top: 0 !important;
}

/* Force zero spacing on all Divi containers */
#page-container,
#main-content,
.et-l,
.et-l--post {
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure body has no spacing */
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* Override Divi theme section padding that creates white space */
.et_pb_section,
.et_pb_section_0,
.et_pb_row,
.et_pb_row_0 {
  margin: 0 !important;
  padding: 0 !important;
}

/* Specifically target the first section */
.et_pb_section:first-child,
.et_pb_section_0:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Fix malformed p-style tag that creates white space */
p:has(style) {
  margin: 0 !important;
  padding: 0 !important;
  display: contents !important;
}

/* Alternative fix for older browsers */
p[style*="homepage-v2-mobile-fix"] {
  margin: 0 !important;
  padding: 0 !important;
  display: contents !important;
}

body.admin-bar {
  margin-top: 0 !important;
}

body.admin-bar .site-header {
  top: 32px; /* Account for WordPress admin bar if logged in */
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px; /* Mobile admin bar height */
  }
}

/* Remove ALL top spacing */
body,
#page-container,
#main-header,
#main-content,
.et-main-content,
#et-main-area,
.et_pb_section,
.et_pb_row,
.et_pb_column,
.et_pb_module,
article,
article.et_pb_post,
.entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background: transparent !important;
}

/* Specifically target the hero section */
.hero {
  margin-top: 0 !important;
}

/* Hide Divi's default header if it exists */
#main-header,
.et-fixed-header {
  display: none !important;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-on-white);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 0 !important;
}

/* ============================================
   MOBILE-FIRST TYPOGRAPHY
   Start with mobile sizes, scale up
   ============================================ */

/* Base Typography - Mobile First */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

/* Mobile Typography Sizes */
h1 {
  font-size: var(--text-3xl);  /* 30px on mobile */
  line-height: 1.2;
}

h2 {
  font-size: var(--text-2xl);  /* 24px on mobile */
  line-height: 1.3;
}

h3 {
  font-size: var(--text-xl);   /* 20px on mobile */
  line-height: 1.4;
}

h4 {
  font-size: var(--text-lg);   /* 18px on mobile */
  line-height: 1.4;
}

h5 {
  font-size: var(--text-base); /* 16px on mobile */
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-sm);   /* 14px on mobile */
  font-weight: var(--font-semibold);
}

/* Tablet Typography Sizes */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }  /* 36px */
  h2 { font-size: var(--text-3xl); }  /* 30px */
  h3 { font-size: var(--text-2xl); }  /* 24px */
  h4 { font-size: var(--text-xl); }   /* 20px */
}

/* Desktop Typography Sizes */
@media (min-width: 1024px) {
  h1 { font-size: var(--text-5xl); }  /* 48px */
  h2 { font-size: var(--text-4xl); }  /* 36px */
  h3 { font-size: var(--text-3xl); }  /* 30px */
  h4 { font-size: var(--text-2xl); }  /* 24px */
}

/* Paragraph Styles */
p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
  max-width: 65ch; /* Optimal reading length */
}

/* Lead Paragraph */
.lead {
  font-size: var(--text-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
}

/* Small Text */
.text-sm {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

/* Fix for WordPress/Divi list bullets */
ul {
  list-style: none !important;
  list-style-type: none !important;
}

ul li {
  list-style: none !important;
  list-style-type: none !important;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-subtle: 2px solid var(--color-gray-800);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

/* ========================================
   SECTION HEADERS WITH BACKGROUND IMAGES
   Centralized system for image-based headers
   ======================================== */

.section-header-with-image {
  position: relative;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6);
  margin-bottom: var(--space-8);
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
  transition: var(--transition-base);
  cursor: pointer;
}

.section-header-with-image:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

@media (min-width: 768px) {
  .section-header-with-image {
    padding: var(--space-16) var(--space-10);
    margin-bottom: var(--space-10);
  }
}

.section-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.section-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transform: scale(1.05);
  filter: brightness(1.1) contrast(0.95);
  transition: var(--transition-base);
}

.section-header-with-image:hover .section-header-img {
  opacity: 0.45;
  transform: scale(1.08);
}

/* Improved overlay for better text readability */
.section-header-with-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(248, 250, 252, 0.65) 100%);
  z-index: 2;
}

.section-header-with-image .section-title {
  position: relative;
  z-index: 3;
  color: var(--color-gray-900) !important;
  text-shadow: none;
  margin-bottom: var(--space-4);
}

.section-header-with-image .section-subtitle {
  position: relative;
  z-index: 3;
  color: var(--color-gray-800) !important;
  text-shadow: none;
  max-width: 800px;
  margin: 0 auto;
}