/* ========================================
   PREFOOTER MOBILE-ONLY STYLES
   Only applies to mobile devices (max-width: 767px)
   Desktop styles remain unchanged
   ======================================== */

@media (max-width: 767px) {
  /* Prefooter Container Mobile - NO SCROLLBARS */
  .uwg-prefooter {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important; /* Changed from hidden to visible */
    padding: 2rem 0 !important;
    margin: 0 !important;
    position: relative !important;
  }

  .uwg-prefooter__container {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 1rem !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    overflow: visible !important; /* Changed from hidden to visible */
    position: relative !important;
  }

  .uwg-prefooter__col {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    position: relative !important;
  }

  .uwg-prefooter__col h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem) !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
  }

  .uwg-prefooter__col p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
  }

  /* Prefooter Form Mobile - NO SCROLLBARS */
  .pre-footer-form {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    position: relative !important;
  }

  .pre-footer-form .form-group {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.25rem !important;
    overflow: visible !important;
  }

  .pre-footer-form label {
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
  }

  .pre-footer-form input,
  .pre-footer-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 0.875rem !important;
    min-height: 48px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .pre-footer-form input::placeholder,
  .pre-footer-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  .pre-footer-form textarea {
    min-height: 120px !important;
    resize: vertical !important;
    overflow-y: auto !important; /* Only textarea can scroll */
    overflow-x: hidden !important;
    scrollbar-width: thin !important; /* Firefox */
    -ms-overflow-style: scrollbar !important; /* IE and Edge */
  }

  .pre-footer-form textarea::-webkit-scrollbar {
    width: 6px !important; /* Thin scrollbar for textarea */
  }

  .pre-footer-form textarea::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1) !important;
  }

  .pre-footer-form textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 3px !important;
  }

  .pre-footer-submit-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin-top: 0.5rem !important;
  }

  .pre-footer-submit-btn:hover:not(:disabled) {
    background: #2563eb !important;
  }

  .pre-footer-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
  }

  .form-error {
    padding: 1rem !important;
    background: rgba(220, 38, 38, 0.2) !important;
    border: 1px solid #dc2626 !important;
    border-radius: 8px !important;
    margin-bottom: 1.5rem !important;
    overflow: visible !important;
  }

  .form-error p {
    color: #ffffff !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* Contact Info Mobile - NO SCROLLBARS */
  .contact-info {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .company-info {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem !important;
    overflow: visible !important;
  }

  .company-info h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 0.75rem !important;
  }

  .company-info p {
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
  }

  .contact-details {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important;
    overflow: visible !important;
  }

  .contact-item {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    text-align: center !important;
    overflow: visible !important;
  }

  .contact-item strong {
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
  }

  .contact-item a,
  .contact-item span {
    display: block !important;
    font-size: 1.1rem !important;
    color: #60a5fa !important;
    margin-bottom: 0.25rem !important;
    text-decoration: none !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .contact-item a:hover {
    color: #93c5fd !important;
    text-decoration: underline !important;
  }

  .contact-item small {
    display: block !important;
    font-size: 0.875rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 0.5rem !important;
  }

  /* Social Links Mobile - NO SCROLLBARS */
  .social-links {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .social-link {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
  }

  .social-link:hover {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .social-icon {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
  }

  /* Blog Posts Mobile - NO SCROLLBARS */
  .blog-posts {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .blog-post {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .blog-thumbnail {
    flex-shrink: 0 !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
    overflow: hidden !important; /* Only thumbnail can clip */
  }

  .blog-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .blog-content {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .blog-title {
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
  }

  .blog-title:hover {
    color: #60a5fa !important;
    text-decoration: underline !important;
  }

  .blog-date {
    display: block !important;
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
  }

  /* Company Section Mobile - NO SCROLLBARS */
  .company-section {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .company-image {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem !important;
    border-radius: 8px !important;
    overflow: hidden !important; /* Only image container can clip */
  }

  .company-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .company-features {
    text-align: left !important;
    margin: 1.5rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .company-features p {
    font-size: 0.95rem !important;
    margin-bottom: 0.75rem !important;
    color: #ffffff !important;
    padding-left: 1.5rem !important;
    position: relative !important;
    text-align: left !important;
  }

  .company-features p strong {
    position: absolute !important;
    left: 0 !important;
    color: #10b981 !important;
    font-size: 1.25rem !important;
  }

  .learn-more-link {
    display: inline-block !important;
    color: #60a5fa !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    margin-top: 1rem !important;
    min-height: 44px !important;
    padding: 0.5rem 0 !important;
  }

  .learn-more-link:hover {
    text-decoration: underline !important;
    color: #93c5fd !important;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .uwg-prefooter__container {
    padding: 0 0.75rem !important;
  }

  .blog-post {
    padding: 0.875rem !important;
  }

  .blog-thumbnail {
    width: 70px !important;
    height: 70px !important;
  }

  .blog-title {
    font-size: 0.9rem !important;
  }
}

/* Extra small phones (375px and below) */
@media (max-width: 375px) {
  .uwg-prefooter__container {
    padding: 0 0.5rem !important;
  }

  .blog-post {
    flex-direction: column !important;
    text-align: center !important;
  }

  .blog-thumbnail {
    width: 100% !important;
    height: 150px !important;
    margin: 0 auto !important;
  }

  .contact-item {
    padding: 0.875rem !important;
  }

  .social-links {
    gap: 0.75rem !important;
  }
}

/* Very small phones (320px and below) */
@media (max-width: 320px) {
  .uwg-prefooter {
    padding: 1.5rem 0 !important;
  }

  .uwg-prefooter__container {
    padding: 0 0.5rem !important;
    gap: 1.5rem !important;
  }

  .uwg-prefooter__col h3 {
    font-size: 1.125rem !important;
  }

  .pre-footer-form input,
  .pre-footer-form textarea {
    padding: 0.75rem !important;
    font-size: 16px !important;
  }

  .blog-thumbnail {
    height: 120px !important;
  }
}
