/**
 * C&S Drainage Corporate Improvements
 * Professional styling enhancements for clean corporate appearance
 * Version: 1.0.0
 */

/* =================================================================
   CSS CUSTOM PROPERTIES - Responsive Spacing System
   ================================================================= */
:root {
  /* Responsive spacing that scales with viewport */
  --csd-space-xs-responsive: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --csd-space-sm-responsive: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --csd-space-md-responsive: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --csd-space-lg-responsive: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --csd-space-xl-responsive: clamp(2rem, 1.6rem + 2vw, 3rem);
  --csd-space-2xl-responsive: clamp(3rem, 2.4rem + 3vw, 4rem);
  --csd-space-3xl-responsive: clamp(4rem, 3.2rem + 4vw, 6rem);
  
  /* Section padding that adapts to screen size */
  --csd-section-padding-responsive: clamp(40px, 5vw, 80px);
  
  /* Improved color contrast for accessibility */
  --csd-accent-accessible: var(--csd-accent-hover); /* Darker yellow for better contrast */
  --csd-text-on-yellow: #2A2A2B; /* Very dark text on yellow backgrounds */
  --csd-link-accessible: #0056B3; /* Darker blue for links */
}

/* =================================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================================= */

/* Better contrast for yellow backgrounds */
.bg-yellow,
.vc_custom_heading.yellow-bg,
[style*="background-color: var(--csd-yellow)"],
[style*="background-color:var(--csd-yellow)"] {
  background-color: var(--csd-accent-accessible) !important;
  color: var(--csd-text-on-yellow) !important;
}

/* Ensure readable text on yellow */
.bg-yellow *,
[style*="background-color: var(--csd-yellow)"] *,
[style*="background-color:var(--csd-yellow)"] * {
  color: var(--csd-text-on-yellow) !important;
}

/* Fix white text on yellow buttons */
.gem-button[style*="background-color: var(--csd-yellow)"],
.csd-button,
.wpcf7-submit {
  color: var(--csd-text-on-yellow) !important;
}

/* =================================================================
   SPACING IMPROVEMENTS
   ================================================================= */

/* Consistent margins for content blocks */
.vc_column-inner {
  padding: var(--csd-space-lg-responsive);
}

/* Better spacing for headings */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  margin-top: var(--csd-space-xl-responsive);
  margin-bottom: var(--csd-space-md-responsive);
}

/* First heading in a section needs less top margin */
.vc_column-inner > *:first-child,
.wpb_text_column > *:first-child {
  margin-top: 0;
}

/* =================================================================
   TYPOGRAPHY REFINEMENTS
   ================================================================= */

/* Remove aggressive text shadows */
.service-hero h1,
.service-hero-description {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Professional paragraph spacing */
p {
  margin-bottom: var(--csd-space-md-responsive);
  line-height: 1.7;
}

/* Lists with better spacing */
ul, ol {
  margin-bottom: var(--csd-space-lg-responsive);
}

ul li, ol li {
  margin-bottom: var(--csd-space-sm-responsive);
  line-height: 1.7;
}

/* =================================================================
   CLEAN CORPORATE STYLING
   ================================================================= */

/* Subtle borders instead of heavy ones */
.vc_separator .vc_sep_holder .vc_sep_line {
  border-width: 1px !important;
  opacity: 0.3;
}

/* Professional card styling */
.service-info-card,
.contact-info-card {
  border-width: 1px !important;
  border-color: #e0e0e0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.service-info-card:hover,
.contact-info-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-2px);
}

/* Clean hover effects */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Professional button styling */
.gem-button,
.csd-button,
.wpcf7-submit {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 12px 30px !important;
  transition: all 0.2s ease !important;
}

/* =================================================================
   REDUCE !IMPORTANT OVERRIDES
   ================================================================= */

/* Target specific elements with higher specificity instead of !important */
body .site-content .vc_custom_heading {
  text-transform: none;
  letter-spacing: 0;
}

body .site-content .gem-list li {
  font-size: inherit;
  line-height: 1.7;
}

/* =================================================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ================================================================= */

@media (max-width: 768px) {
  /* Better mobile spacing */
  .vc_column-inner {
    padding: var(--csd-space-md-responsive);
  }
  
  /* Readable font sizes on mobile */
  body {
    font-size: 16px !important;
  }
  
  h1, .h1 { font-size: 28px !important; }
  h2, .h2 { font-size: 24px !important; }
  h3, .h3 { font-size: 20px !important; }
  h4, .h4 { font-size: 18px !important; }
  h5, .h5 { font-size: 16px !important; }
  h6, .h6 { font-size: 16px !important; }
}

/* =================================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================================= */

/* Reduce excessive animations */
* {
  animation-duration: 0.3s !important;
}

/* Optimize transitions */
.vc_row,
.vc_column,
.wpb_wrapper {
  transition: none !important;
}

/* =================================================================
   FOCUS STATES FOR ACCESSIBILITY
   ================================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--csd-link-accessible);
  outline-offset: 2px;
}

/* Skip unnecessary focus outlines on click */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
  /* Clean print layout */
  .site-header,
  .site-footer,
  .mobile-menu-toggle,
  .back-to-top {
    display: none !important;
  }
  
  /* Ensure text is black for printing */
  body, h1, h2, h3, h4, h5, h6, p, li, a {
    color: #000 !important;
  }
  
  /* Remove backgrounds for print */
  * {
    background: transparent !important;
  }
}