/* Mobile-specific fixes to override problematic styles */

/* Fix header controls spacing in mobile */
@media (max-width: 768px) {
  .header-controls {
    margin-right: 15px !important;
  }
  
  .language-selector {
    margin-right: 10px !important;
  }
  
  .mobile-nav-toggle {
    margin-right: 5px !important;
  }
}

@media (max-width: 480px) {
  .header-controls {
    margin-right: 10px !important;
  }
  
  .language-selector {
    margin-right: 8px !important;
  }
  
  .mobile-nav-toggle {
    margin-right: 3px !important;
  }
}

/* Override min-height for advantages image container on mobile */
@media (max-width: 480px) {
  .advantages-image-container {
    min-height: auto !important;
    padding: 10px !important;
  }
  
  /* Also reduce padding for other image containers on mobile */
  .heatpump-image-container,
  .schema-image-container,
  .savings-image-container,
  .cop-image-container {
    min-height: auto !important;
    padding: 10px !important;
  }
  
  /* Reduce cop-content min-height as well */
  .cop-content {
    min-height: auto !important;
  }
  
  /* Improve text spacing in COP section for mobile */
  .heatpump-cop-section {
    padding: 50px 20px !important;
    margin: 30px 10px !important;
  }
  
  .heatpump-cop-section .heatpump-cop h4 {
    font-size: 10px !important;
    line-height: 1.3 !important;
    margin-bottom: 30px !important;
    margin-top: 20px !important;
    letter-spacing: normal !important;
  }
  
  /* Fix for the main COP title text in mobile */
  .heatpump-cop-section .section-title h2 {
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  /* Fix for energy saving section text alignment in mobile */
  .heatpump-savings-section .section-title {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .heatpump-savings-section .savings-content {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 20px !important;
  }
  
  .heatpump-savings-section .savings-content p {
    text-align: justify !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    line-height: 1.6 !important;
    text-indent: 0 !important;
  }
  
  /* Force container alignment */
  .heatpump-savings-section .container {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  
  .heatpump-savings-section .row {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .heatpump-savings-section .col-lg-6 {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  
  /* Responsive adjustments for savings cards */
  @media (max-width: 768px) {
    .heatpump-savings-section {
      padding: 60px 0;
    }
    
    .heatpump-savings-section .section-title h2 {
      font-size: 1.8rem;
    }
    
    .savings-card {
      padding: 30px 25px;
      margin-bottom: 25px;
    }
    
    .savings-card .card-icon i {
      font-size: 2.5rem;
      padding: 20px;
    }
    
    .savings-card h4 {
      font-size: 1.3rem;
    }
  }
  
  @media (max-width: 480px) {
    .heatpump-savings-section {
      padding: 50px 0;
    }
    
    .heatpump-savings-section .section-title h2 {
      font-size: 1.5rem;
    }
    
    .savings-card {
      padding: 25px 20px;
      margin-bottom: 20px;
    }
    
    .savings-card .card-icon i {
      font-size: 2.2rem;
      padding: 18px;
    }
    
    .savings-card h4 {
      font-size: 1.2rem;
    }
  }
  
  /* Professional Savings Cards Styling */
  .savings-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(23, 90, 148, 0.08);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(23, 90, 148, 0.08);
    position: relative;
    overflow: hidden;
  }
  
  .savings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #175a94, #1e6bb8, #42a5f5);
    border-radius: 20px 20px 0 0;
  }
  
  .savings-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(23, 90, 148, 0.15);
    border-color: rgba(23, 90, 148, 0.15);
  }
  
  .savings-card .card-icon {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
  }
  
  .savings-card .card-icon i {
    font-size: 2.8rem;
    color: #175a94;
    background: linear-gradient(135deg, rgba(23, 90, 148, 0.1), rgba(30, 107, 184, 0.1));
    padding: 25px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(23, 90, 148, 0.15);
    transition: all 0.3s ease;
  }
  
  .savings-card:hover .card-icon i {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(23, 90, 148, 0.25);
  }
  
  .savings-card h4 {
    color: #175a94;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
  }
  
  .savings-card h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #175a94, #42a5f5);
    border-radius: 2px;
  }
  
  .savings-card p {
    color: #4a5568;
    line-height: 1.7;
    text-align: justify;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
  }
  
  /* Enhanced section styling */
  .heatpump-savings-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    padding: 80px 0;
    position: relative;
  }
  
  .heatpump-savings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(23, 90, 148, 0.2), transparent);
  }
  
  .heatpump-savings-section .section-title {
    text-align: center !important;
    margin-bottom: 60px;
  }
  
  .heatpump-savings-section .section-title h2 {
    color: #175a94;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  
  .heatpump-savings-section .section-title p {
    color: #6b7280;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
  }
  
  /* Remove title line */
  .heatpump-savings-section .section-title p::after {
    display: none !important;
  }
  
  /* Remove the horizontal gradient line */
  .heatpump-savings-section::after,
  .heatpump-savings-section::before {
    display: none !important;
  }
  
  .heatpump-savings-section .section-title::after,
  .heatpump-savings-section .section-title::before {
    display: none !important;
  }
  
  /* Remove the specific gradient line from heatpump-savings */
  .heatpump-savings::before {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
  }
  
  .heatpump-savings::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
  }
  
  /* Force removal with higher specificity */
  .heatpump-savings-section .heatpump-savings::before {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
  }
  
  .heatpump-savings-section .heatpump-savings::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
  }
  
  /* Fix for gallery section title to prevent text collapse */
  .portfolio .section-title h2 {
    line-height: 1.3 !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }
  
  .heatpump-cop-section .cop-content p {
    font-size: 1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 20px !important;
    padding: 0 5px !important;
  }
  
  .heatpump-cop-section .cop-content {
    padding: 25px 15px !important;
  }
  
  /* Fix email overflow in contact section */
  .contact .info .email {
    word-wrap: break-word !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
  
  .contact .info p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
  
  .contact .info .address,
  .contact .info .email,
  .contact .info .phone {
    padding: 15px !important;
    margin-bottom: 20px !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Force email text to wrap */
  .contact .info .email p,
  .contact .info .email a {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    display: block !important;
    line-height: 1.3 !important;
  }
  
  /* Additional fix for email overflow */
  .contact .info .email * {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  
  /* Direct fix for the email paragraph */
  .contact .info .email p {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    display: block !important;
    line-height: 1.3 !important;
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Ensure email container has proper width */
  .contact .info .email {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
}

/* Additional mobile optimizations for better spacing */
@media (max-width: 768px) {
  .advantages-image-container {
    min-height: auto !important;
    padding: 15px !important;
  }
  
  .heatpump-image-container,
  .schema-image-container,
  .savings-image-container,
  .cop-image-container {
    min-height: auto !important;
    padding: 15px !important;
  }
  
  .cop-content {
    min-height: auto !important;
  }
  
  /* Improve text spacing in COP section for tablets */
  .heatpump-cop-section {
    padding: 60px 30px !important;
    margin: 35px 15px !important;
  }
  
  .heatpump-cop-section .heatpump-cop h4 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 35px !important;
    margin-top: 25px !important;
  }
  
  .heatpump-cop-section .cop-content p {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    margin-bottom: 18px !important;
  }
  
  .heatpump-cop-section .cop-content {
    padding: 30px 20px !important;
  }
  
  /* Fix email overflow in contact section for tablets */
  .contact .info .email {
    word-wrap: break-word !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
  
  .contact .info p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }
  
  .contact .info .address,
  .contact .info .email,
  .contact .info .phone {
    padding: 18px !important;
    margin-bottom: 25px !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Force email text to wrap for tablets */
  .contact .info .email p,
  .contact .info .email a {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    display: block !important;
    line-height: 1.3 !important;
  }
  
  /* Additional fix for email overflow for tablets */
  .contact .info .email * {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  
  /* Direct fix for the email paragraph for tablets */
  .contact .info .email p {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    display: block !important;
    line-height: 1.3 !important;
    font-size: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Fix for the main COP title text for tablets */
  .heatpump-cop-section .section-title h2 {
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  /* Fix for energy saving section text alignment for tablets */
  .heatpump-savings-section .section-title {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .heatpump-savings-section .savings-content {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .heatpump-savings-section .savings-content p {
    text-align: justify !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    line-height: 1.6 !important;
  }
  
  /* Ensure email container has proper width for tablets */
  .contact .info .email {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
}

/* WhatsApp Radar Effect */
.whatsappp {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
}

.whatsappp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(37, 211, 102, 0.4);
  border-radius: 50%;
  animation: radar-pulse 2s infinite;
  z-index: -1;
  pointer-events: none;
}

.whatsappp::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(37, 211, 102, 0.3);
  border-radius: 50%;
  animation: radar-pulse 2s infinite 0.5s;
  z-index: -2;
  pointer-events: none;
}

@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

/* Hover effect for WhatsApp */
.whatsappp:hover::before,
.whatsappp:hover::after {
  animation-duration: 1s;
}

/* Ensure WhatsApp icon is above the radar effect */
.whatsappp a {
  position: relative;
  z-index: 2;
  display: block;
  width: 50px;
  height: 50px;
  background: #25d366;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  -moz-border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%);
  -webkit-clip-path: circle(50% at 50% 50%);
  text-align: center;
  line-height: 50px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Align back-to-top button with WhatsApp */
.back-to-top {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999 !important;
}

.whatsappp a:hover,
.whatsappp a:focus,
.whatsappp a:active {
  background: #00D04E;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  -moz-border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%);
  -webkit-clip-path: circle(50% at 50% 50%);
  overflow: hidden;
}

.whatsappp .iconowhat {
  color: white;
  font-size: 24px;
  line-height: 50px;
}

/* Responsive adjustments for WhatsApp radar effect */
@media (max-width: 768px) {
  .whatsappp::before {
    width: 50px;
    height: 50px;
  }
  
  .whatsappp::after {
    width: 70px;
    height: 70px;
  }
  
  .whatsappp a {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50% !important;
    overflow: hidden;
  }
  
  .whatsappp .iconowhat {
    font-size: 22px;
    line-height: 45px;
  }
}

@media (max-width: 480px) {
  .whatsappp::before {
    width: 45px;
    height: 45px;
  }
  
  .whatsappp::after {
    width: 65px;
    height: 65px;
  }
  
  .whatsappp a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50% !important;
    overflow: hidden;
  }
  
  .whatsappp .iconowhat {
    font-size: 20px;
    line-height: 40px;
  }
}