/**
 * Social Follow and Share Styles
 * Clean, minimal social media integration
 */

/* Footer Social Follow Section - MOBILE ONLY */
@media (max-width: 768px) {
  .social-follow {
    display: block;
    padding: 1rem 0;
    border-top: 2px solid #ead488;
    margin-top: 2rem;
    background-color: rgba(234, 212, 136, 0.05);
    text-align: center;
  }
  
  .social-follow h3 {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1rem;
    text-align: center;
  }
  
  .social-follow .social-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
  }
  
  .social-follow .social-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: transform 0.2s;
  }
  
  .social-follow .social-icon:hover {
    transform: scale(1.1);
  }
  
  .social-follow .icon {
    width: 22px;
    height: 22px;
  }
  
  /* Icon colors */
  .social-icon:nth-child(1) .icon { fill: #1877f2; } /* Facebook */
  .social-icon:nth-child(2) .icon { fill: #E4405F; } /* Instagram */
  .social-icon:nth-child(3) .icon { fill: #000; } /* X/Twitter */
  .social-icon:nth-child(4) .icon { fill: #E60023; } /* Pinterest */
}

/* Ensure it's hidden on desktop */
@media (min-width: 769px) {
  .social-follow,
  .mobile-menu-social {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.social-row a,
.social-row .social-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: all 0.2s ease;
  background-color: transparent;
}

.social-row a:hover,
.social-row .social-icon:hover {
  background-color: rgba(234, 212, 136, 0.1);
  transform: translateY(-2px);
}

.social-row .icon {
  width: 22px;
  height: 22px;
  fill: #1b304a;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.social-row a:hover .icon,
.social-row .social-icon:hover .icon {
  opacity: 1;
}

/* Hide for logged-in users (optional) - DISABLED for now */
/* .user-logged-in .social-follow {
  display: none;
} */

/* Share Button for Content Pages */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-share svg {
  width: 20px;
  height: 20px;
}

/* Share Dialog/Modal */
#shareFallback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: none;
  max-width: 90%;
  width: 400px;
  z-index: 10000;
}

#shareFallback::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

#shareFallback p {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1b304a;
}

#shareFallback a {
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #1b304a;
  transition: background 0.2s ease;
}

#shareFallback a:hover {
  background: #e9ecef;
}

#shareFallback form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

#shareFallback button {
  width: 100%;
  padding: 0.75rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

#shareFallback button:hover {
  background: #5a6268;
}

/* Mobile CTA Button Fixes */
.page-wrap,
.hero-wrap {
  max-width: 720px;
  margin: 0 auto;
}

/* Primary CTA - Fix bleed issue */
.cta-primary,
.btn-start-appraisal {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 8px auto 16px;
  padding: 14px 18px;
  border-radius: 9999px;
  box-sizing: border-box;
  text-align: center;
  font-weight: 700;
  font-size: clamp(16px, 4.5vw, 20px);
  line-height: 1.15;
  white-space: normal;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-primary:hover,
.btn-start-appraisal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Defensive: kill any accidental horizontal scroll */
html,
body {
  overflow-x: hidden;
}

/* FAB visibility control when hero CTA is visible */
.fab {
  transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

.fab.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hamburger Menu Social Links */
.mobile-menu-social {
  padding: 1rem 0;
  border-top: 1px solid rgba(234, 212, 136, 0.1);
  margin-top: 1rem;
}

.mobile-menu-social h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin: 0 0 0.75rem;
  padding: 0 1rem;
}

.mobile-menu-social .social-row {
  padding: 0 1rem;
  justify-content: flex-start;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .social-follow {
    padding: 1rem 0;
    text-align: center;
  }
  
  .social-follow h3 {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1rem;
  }
  
  .social-row {
    gap: 0.5rem;
  }
  
  .social-row a,
.social-row .social-icon {
    width: 40px;
    height: 40px;
  }
  
  .social-row .icon {
    width: 20px;
    height: 20px;
  }
  
  /* Icon colors */
  .social-icon:nth-child(1) .icon { fill: #1877f2; } /* Facebook */
  .social-icon:nth-child(2) .icon { fill: #E4405F; } /* Instagram */
  .social-icon:nth-child(3) .icon { fill: #000; } /* X/Twitter */
  .social-icon:nth-child(4) .icon { fill: #E60023; } /* Pinterest */
  
  /* Ensure CTA doesn't bleed on mobile */
  .cta-primary,
  .btn-start-appraisal {
    max-width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* Visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}