/* ═══════════════════════════════════════════════════════════
   IoTFIY Index — Final theme fixes & polish
   ═══════════════════════════════════════════════════════════ */

/* Apple / PWA mobile chrome */
.index-page {
  -webkit-text-size-adjust: 100%;
}

/* Premium footer on homepage */
.index-page .footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.85);
}

.index-page .footer-top {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.index-page .footer-about .sitename,
.index-page .footer-links h4,
.index-page .footer-newsletter h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

.index-page .footer-links ul li a {
  color: rgba(255, 255, 255, 0.7);
}

.index-page .footer-links ul li a:hover {
  color: #a5b4fc;
}

.index-page .footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.index-page .footer-contact a:hover {
  color: #a5b4fc;
}

.index-page .footer .social-links a {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.index-page .footer .social-links a:hover {
  background: #6366f1;
  color: #fff;
}

.index-page .footer-newsletter {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.index-page .copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.index-page .copyright .sitename {
  color: #a5b4fc;
}

.index-page .credits {
  display: none;
}

/* Contact section — premium form */
.index-page #contact {
  background: #fff !important;
}

.index-page #contact .info-item {
  background: #f8fafc;
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
}

.index-page #contact .info-item i {
  color: #6366f1;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.index-page #contact .php-email-form input,
.index-page #contact .php-email-form textarea {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
}

.index-page #contact .php-email-form input:focus,
.index-page #contact .php-email-form textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.index-page #contact .php-email-form button[type="submit"] {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-weight: 600;
  color: #fff;
}

/* CTA sections */
.index-page #cta .btn,
.index-page .faq-cta .btn {
  border-radius: 12px;
}

/* Portfolio cards — brand consistency (legacy pages) */
.index-page #portfolio:not(.portfolio-premium) .portfolio-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.08);
}

.index-page #portfolio:not(.portfolio-premium) .portfolio-filters .nav-link {
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
}

.index-page #portfolio:not(.portfolio-premium) .portfolio-filters .nav-link.active {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}

/* Clients / newsletter */
.index-page .footer-newsletter input[type="email"] {
  border-radius: 12px 0 0 12px;
  border: none;
  padding: 12px 16px;
}

.index-page .footer-newsletter input[type="submit"] {
  border-radius: 0 12px 12px 0;
  background: #6366f1;
  border: none;
  padding: 12px 20px;
}

/* Hide duplicate heavy section site-wide */
.index-page .iot-analytics-section {
  display: none !important;
}

/* Mobile: contact form → compact CTA banner */
@media (max-width: 767px) {
  .index-page #contact {
    display: none !important;
  }

  .index-page .footer-newsletter {
    padding: 2rem 0;
  }

  .index-page .footer-newsletter h4 {
    font-size: 1.125rem;
  }
}

/* Desktop contact visible */
@media (min-width: 768px) {
  .index-page .contact-mobile-banner {
    display: none !important;
  }
}

/* Contact mobile banner (before footer on small screens) */
.index-page .contact-mobile-banner {
  margin: 12px;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border-radius: 24px;
  text-align: center;
  color: #fff;
}

.index-page .contact-mobile-banner h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.index-page .contact-mobile-banner p {
  font-size: 0.9375rem;
  opacity: 0.9;
  margin-bottom: 1.25rem;
}

.index-page .contact-mobile-banner .btn {
  background: #fff;
  color: #4338ca;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 28px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Hero cleanup — emergency hidden via layout css too */
.index-page .hero-premium .floating-elements {
  display: none;
}

/* Alt services industry cards */
.index-page #alt-services .service-item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.index-page #alt-services .service-item h3 {
  font-family: 'Space Grotesk', sans-serif;
}

/* Testimonials v2 cards on index */
.index-page #testimonials .testimonial-card-v2 {
  border-radius: 24px;
}

/* Skip link accessibility */
.index-page .skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100000;
  background: #6366f1;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.index-page .skip-link:focus {
  top: 16px;
}

.index-page #scroll-top {
  z-index: 10;
}

/* FAQ — align with brand theme */
.index-page #faq {
  background: #f8fafc !important;
  padding: var(--space-2xl, 5rem) 0 !important;
}

.index-page #faq h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  color: #0f172a !important;
}

.index-page #faq .accordion-button:not(.collapsed) {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
}

.index-page #faq .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.index-page .footer-top h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}
