/* ========================================
   Mend Your Home - Component Styles
   Reusable UI Components
   ======================================== */

/* ========================================
   SERVICE CARDS WITH IMAGES
   ======================================== */
.service-card-image {
  position: relative;
  display: block;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.service-card-image:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.service-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(30, 58, 138, 0.6) 0%, rgba(30, 58, 138, 0.9) 100%);
  transition: all 0.4s ease;
}

.service-card-image:hover .service-card-overlay {
  background: linear-gradient(to bottom, rgba(249, 115, 22, 0.7) 0%, rgba(30, 58, 138, 0.95) 100%);
}

.service-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.service-card-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

.service-card-image:hover .service-card-icon {
  background: rgba(249, 115, 22, 1);
  transform: scale(1.1) rotate(5deg);
}

.service-card-icon i {
  font-size: 2rem;
  color: white;
}

.service-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  font-family: var(--font-heading);
  line-height: 1.2;
}

.service-card-desc {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0.9;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.service-card-link i {
  transition: transform 0.3s ease;
}

.service-card-image:hover .service-card-link {
  color: var(--secondary-orange);
  gap: 1rem;
}

.service-card-image:hover .service-card-link i {
  transform: translateX(5px);
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
/* Note: !important is used here to ensure positioning isn't overridden
   by third-party scripts (like Tawk.to) that may inject CSS dynamically */
body .whatsapp-float {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  right: auto !important;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 9998 !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

body .whatsapp-float:hover {
  background-color: #20BA5A;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

body .whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

body .whatsapp-tooltip {
  position: absolute;
  left: 70px !important;
  right: auto !important;
  background-color: white;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body .whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
}

/* ========================================
   GAS SAFE BADGE
   ======================================== */
.gas-safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #003B5C;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 59, 92, 0.2);
}

.gas-safe-badge img {
  width: 50px;
  height: auto;
}

.gas-safe-badge-text {
  display: flex;
  flex-direction: column;
}

.gas-safe-badge-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gas-safe-badge-subtitle {
  font-size: 12px;
  opacity: 0.9;
}

/* ========================================
   STATS COUNTER
   ======================================== */
.stats-section {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #1E40AF 100%);
  color: white;
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--secondary-orange);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* ========================================
   CALL-TO-ACTION BOXES
   ======================================== */
.cta-box {
  background: linear-gradient(135deg, var(--secondary-orange) 0%, #EA580C 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.cta-box h3 {
  color: white;
  margin-bottom: 15px;
  font-size: 2rem;
}

.cta-box p {
  font-size: 1.125rem;
  margin-bottom: 25px;
  opacity: 0.95;
}

.cta-box .btn {
  background-color: white;
  color: var(--secondary-orange);
  font-weight: 700;
}

.cta-box .btn:hover {
  background-color: var(--primary-blue);
  color: white;
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumbs {
  background-color: var(--light-gray);
  padding: 15px 0;
  font-size: 0.9375rem;
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: center;
}

.breadcrumbs li::after {
  content: '›';
  margin-left: 10px;
  color: var(--dark-gray);
}

.breadcrumbs li:last-child::after {
  display: none;
}

.breadcrumbs a {
  color: var(--primary-blue);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* ========================================
   FEATURE BOXES
   ======================================== */
.feature-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 25px;
  background-color: white;
  border-radius: 10px;
  border: 2px solid var(--medium-gray);
  transition: all 0.3s ease;
}

.feature-box:hover {
  border-color: var(--secondary-orange);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--light-gray);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-size: 1.5rem;
}

.feature-content h4 {
  margin-bottom: 8px;
  color: var(--primary-blue);
}

.feature-content p {
  margin: 0;
  color: var(--dark-gray);
}

/* ========================================
   PRICING CARD
   ======================================== */
.pricing-card {
  background-color: white;
  border: 2px solid var(--medium-gray);
  border-radius: 12px;
  padding: 35px;
  text-align: center;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary-orange);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.pricing-card.featured {
  border-color: var(--secondary-orange);
  border-width: 3px;
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--secondary-orange);
  color: white;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}

.pricing-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 20px 0;
}

.pricing-price span {
  font-size: 1.25rem;
  color: var(--dark-gray);
}

.pricing-features {
  list-style: none;
  margin: 25px 0;
  text-align: left;
}

.pricing-features li {
  padding: 12px 0;
  border-bottom: 1px solid var(--medium-gray);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
}

/* ========================================
   ALERT BOXES
   ======================================== */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-info {
  background-color: #DBEAFE;
  border-left: 4px solid #3B82F6;
  color: #1E40AF;
}

.alert-success {
  background-color: #D1FAE5;
  border-left: 4px solid #10B981;
  color: #065F46;
}

.alert-warning {
  background-color: #FEF3C7;
  border-left: 4px solid #F59E0B;
  color: #92400E;
}

.alert-error {
  background-color: #FEE2E2;
  border-left: 4px solid #EF4444;
  color: #991B1B;
}

/* ========================================
   ACCORDION / FAQ
   ======================================== */
.accordion {
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.accordion-header {
  background-color: var(--light-gray);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
  font-weight: 600;
  color: var(--primary-blue);
}

.accordion-header:hover {
  background-color: var(--medium-gray);
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 1.25rem;
}

.accordion.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
  max-height: 500px;
}

.accordion-body {
  padding: 20px;
  color: var(--dark-gray);
}

/* ========================================
   SERVICE AREA MAP
   ======================================== */
.service-areas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.service-area-item {
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid var(--medium-gray);
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--primary-blue);
}

.service-area-item:hover {
  border-color: var(--secondary-orange);
  background-color: var(--light-gray);
  transform: translateY(-3px);
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--secondary-orange);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -43px;
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--secondary-orange);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--secondary-orange);
}

.timeline-title {
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 5px;
}

.timeline-description {
  color: var(--dark-gray);
}

/* ========================================
   REVIEW STARS
   ======================================== */
.review-stars {
  color: #F59E0B;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

.review-platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--light-gray);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 5px;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner {
  border: 3px solid var(--light-gray);
  border-top: 3px solid var(--primary-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */
@media (max-width: 768px) {
  body .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px !important;
    left: 15px !important;
    right: auto !important;
  }
  
  body .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
  
  body .whatsapp-tooltip {
    display: none;
  }
  
  .stats-grid {
    gap: 20px;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .cta-box {
    padding: 30px 20px;
  }
  
  .feature-box {
    flex-direction: column;
    text-align: center;
  }
  
  .service-areas {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

