/* ===================================
   HAD CTA Section - Reusable Component
   =================================== */

/* HAD Brand Colors */
:root {
  --had-primary-orange: #FF6600;
  --had-primary-blue: #1E5F99;
  --had-secondary-blue: #2E9BD8;
  --had-accent-orange: #FF8533;
  --had-orange-dark: #E55A00;
  --had-blue-dark: #154A6B;
  --had-text-gray: #6B6B6B;
  --had-white: #FFFFFF;
}

/* Main CTA Section Styling */
.had-cta-section {
  padding: 80px 0;
}

.had-cta-background {
  background: linear-gradient(135deg, var(--had-primary-blue) 0%, var(--had-secondary-blue) 100%) !important;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(30, 95, 153, 0.2);
}

/* CTA Background Pattern */
.had-cta-background::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><circle cx="200" cy="200" r="150" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/><circle cx="200" cy="200" r="100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/><circle cx="200" cy="200" r="50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0.3;
  z-index: 0;
}

/* Shape overlay styling */
.had-cta-background .shape {
  position: absolute;
  bottom: 0;
  right: 0;
  opacity: 0.1;
  z-index: 0;
}

.had-cta-background .shape img {
  filter: brightness(0) invert(1);
  opacity: 0.2;
}

/* Content styling */
.had-cta-section .heading {
  position: relative;
  z-index: 2;
}

.had-cta-section h2 {
  color: var(--had-white) !important;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.had-cta-section p {
  color: var(--had-white) !important;
  max-width: 600px;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Button Styling */
.had-btn-primary {
  background-color: var(--had-primary-orange) !important;
  color: var(--had-white) !important;
  border: 2px solid var(--had-primary-orange) !important;
  padding: 16px 32px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

.had-btn-primary:hover {
  background-color: var(--had-orange-dark) !important;
  border-color: var(--had-orange-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 102, 0, 0.3);
}

.had-btn-outline {
  background-color: transparent !important;
  color: var(--had-white) !important;
  border: 2px solid var(--had-white) !important;
  padding: 16px 32px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

.had-btn-outline:hover {
  background-color: var(--had-white) !important;
  color: var(--had-primary-blue) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

/* Arrow animation */
.had-btn-primary .arrow-all,
.had-btn-outline .arrow-all {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.had-btn-primary .arrow1,
.had-btn-primary .arrow2,
.had-btn-outline .arrow1,
.had-btn-outline .arrow2 {
  position: absolute;
  transition: transform 0.3s ease;
}

.had-btn-primary .arrow2,
.had-btn-outline .arrow2 {
  transform: translateX(-30px);
}

.had-btn-primary:hover .arrow1,
.had-btn-outline:hover .arrow1 {
  transform: translateX(30px);
}

.had-btn-primary:hover .arrow2,
.had-btn-outline:hover .arrow2 {
  transform: translateX(0);
}

/* Alternative CTA Styles */
/* Style 2: Orange Background */
.had-cta-section.cta-orange .had-cta-background {
  background: linear-gradient(135deg, var(--had-primary-orange) 0%, var(--had-accent-orange) 100%) !important;
}

.had-cta-section.cta-orange .had-btn-primary {
  background-color: var(--had-primary-blue) !important;
  border-color: var(--had-primary-blue) !important;
}

.had-cta-section.cta-orange .had-btn-primary:hover {
  background-color: var(--had-blue-dark) !important;
  border-color: var(--had-blue-dark) !important;
}

/* Style 3: Dark Background */
.had-cta-section.cta-dark .had-cta-background {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

/* Style 4: Light Background */
.had-cta-section.cta-light .had-cta-background {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border: 1px solid #dee2e6;
}

.had-cta-section.cta-light h2 {
  color: var(--had-primary-blue) !important;
  text-shadow: none;
}

.had-cta-section.cta-light p {
  color: var(--had-text-gray) !important;
  opacity: 1;
  text-shadow: none;
}

.had-cta-section.cta-light .had-btn-outline {
  border-color: var(--had-primary-blue) !important;
  color: var(--had-primary-blue) !important;
}

.had-cta-section.cta-light .had-btn-outline:hover {
  background-color: var(--had-primary-blue) !important;
  color: var(--had-white) !important;
}

/* Responsive Design */
@media (max-width: 991px) {
  .had-cta-background {
    padding: 50px 40px;
  }
  
  .cta1-buttons {
    text-align: center !important;
    margin-top: 30px;
  }
  
  .had-cta-section h2 {
    text-align: center;
  }
  
  .had-cta-section p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .had-cta-section {
    padding: 60px 0;
  }
  
  .had-cta-background {
    padding: 40px 30px;
  }
  
  .had-btn-primary,
  .had-btn-outline {
    padding: 14px 28px !important;
    font-size: 16px !important;
    width: 100%;
    justify-content: center;
  }
  
  .cta1-buttons br {
    display: none;
  }
  
  .had-btn-outline {
    margin-top: 15px;
  }
}

/* Dark mode support */
.dark-mode .had-cta-section .had-cta-background {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Additional utility classes for different CTA contexts */
.had-cta-section.no-margin {
  margin: 0;
  padding: 0;
}

.had-cta-section.with-margin {
  margin: 80px 0;
}

.had-cta-section.full-width .container {
  max-width: 100%;
  padding: 0;
}

.had-cta-section.full-width .had-cta-background {
  border-radius: 0 !important;
}

/* Fix for existing theme conflicts */
.cta1.had-cta-section .theme-btn1,
.cta1.had-cta-section .theme-btn6 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Ensure CTA is above other elements */
.had-cta-section {
  position: relative;
  z-index: 10;
}