/* ========================================
   SUNOVA - Fixes & Polish
   ======================================== */

/* Image loading fix - prevent broken image icon */
img { max-width: 100%; height: auto; }
img[src=""] { display: none; }

/* Service card with image - full layout */
.service-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.svc-card-img { flex-shrink: 0; }
.svc-card-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.svc-card-body .svc-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(0,97,255,0.08); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.2rem; color: var(--blue); transition: all 0.4s var(--ease); }
.service-card:hover .svc-card-body .svc-icon { background: var(--grad); color: #fff; transform: scale(1.08) rotate(-6deg); }
.svc-card-body h3 { font-family: var(--font-h); font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.svc-card-body p { font-size: 0.84rem; color: var(--muted); line-height: 1.72; margin-bottom: 1.1rem; flex: 1; }

/* Value card layout fix */
.value-card { padding: 0; overflow: hidden; }
.value-card-body { padding: 1.5rem; text-align: center; }
.value-card-body .value-icon { margin: 0 auto 1rem; }

/* Career card layout */
.career-card { padding: 0; overflow: hidden; }
.career-card-body { padding: 1.5rem; }
.career-card-body .career-dept { margin-bottom: 0.75rem; }

/* Ensure SDC images always display */
.service-detail-card { display: grid !important; }
.sdc-img { width: 100% !important; height: 100% !important; min-height: 300px; object-fit: cover !important; display: block !important; }

/* Page hero height fix */
.page-hero { min-height: 380px; }
.page-hero-bg { opacity: 1 !important; }

/* Fix nav on non-dark pages */
.navbar:not(.scrolled) .nav-link { color: rgba(255,255,255,0.85); }
.navbar.scrolled .nav-link { color: rgba(255,255,255,0.75); }

/* Image skeleton placeholder */
.svc-card-img img, .value-card-img img, .career-card-img img {
  background: linear-gradient(90deg, #f0f6ff 25%, #e0ecff 50%, #f0f6ff 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Project page - ensure overlay link works */
.project-card { cursor: pointer; }

/* Mobile nav improvements */
@media (max-width: 1024px) {
  .nav-menu { box-shadow: -4px 0 24px rgba(0,0,0,0.3); }
  .nav-menu .nav-link { border-bottom-color: rgba(255,255,255,0.06); }
  .nav-menu .nav-cta { display: inline-flex !important; width: auto !important; margin-top: 1.2rem; padding: 0.6rem 1.4rem !important; }
}

/* Loader fix */
#loader { background: var(--dark) !important; }

/* Smooth image reveal */
.reveal img { transition: opacity 0.4s ease; }
.reveal:not(.visible) img { opacity: 0; }
.reveal.visible img { opacity: 1; }

/* Fix project card on mobile - show bottom info */
@media (max-width: 480px) {
  .project-overlay { opacity: 1; background: linear-gradient(to top, rgba(6,15,30,0.92) 0%, rgba(6,15,30,0.2) 60%, transparent 100%); }
}

/* Scrollbar hide on mobile */
@media (max-width: 768px) {
  ::-webkit-scrollbar { display: none; }
  * { -ms-overflow-style: none; scrollbar-width: none; }
}

/* Blog card image height standardize */
.blog-img { height: 210px; width: 100%; object-fit: cover; }

/* Team img fix */
.team-img { height: 220px; width: 100%; object-fit: cover; object-position: top; }

/* Contact form full width on small screens */
@media (max-width: 640px) {
  .contact-form-wrap { padding: 1.5rem; }
  .contact-form-wrap input,
  .contact-form-wrap select,
  .contact-form-wrap textarea { font-size: 16px; } /* Prevent iOS zoom */
}

/* Hero canvas fix */
#heroCanvas { display: block; }
@media (max-width: 768px) { #heroCanvas { display: none; } }

/* Footer grid 2-col on tablet */
@media (min-width: 640px) and (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
