/* ==========================================================================
   Nova Engineering Solutions (Pvt) Ltd - Main Stylesheet 2026 (Defensive & Robust)
   Brand Colors:
   - Primary: #8E1B7A (Deep Magenta)
   - Secondary: #5C0E52 (Dark Plum)
   - Accent: #C13FA7 (Vibrant Pink/Magenta)
   - Dark: #222222 / #161618
   - Light: #F8F9FB / #FFFFFF
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --primary: #8E1B7A;
  --primary-hover: #751463;
  --secondary: #5C0E52;
  --accent: #C13FA7;
  --accent-light: rgba(193, 63, 167, 0.12);
  --dark: #222222;
  --dark-surface: #161618;
  --light: #FFFFFF;
  --light-gray: #F8F9FB;
  --border-color: #E9ECEF;
  --text-main: #333333;
  --text-muted: #6C757D;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(142, 27, 122, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s ease-in-out;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-natural {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Defensive AOS & Animation Override - Prevent Invisible Blank Page Issues */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Container max-width */
.container {
  max-width: 1320px;
}

/* Standard Section Padding */
section, .section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

.bg-light-gray {
  background-color: var(--light-gray) !important;
}

.text-primary-custom {
  color: var(--primary) !important;
}

.text-accent-custom {
  color: var(--accent) !important;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary);
  color: var(--light);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 52px;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: 0 6px 20px rgba(142, 27, 122, 0.25);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
}

.btn-primary-custom:hover {
  background-color: var(--secondary);
  color: var(--light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(142, 27, 122, 0.35);
}

.btn-outline-primary-custom {
  background-color: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 52px;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--primary);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
}

.btn-outline-primary-custom:hover {
  background-color: var(--primary);
  color: var(--light);
  transform: translateY(-2px);
}

/* Section Header */
.section-subtitle {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 8px;
  position: relative;
  padding-left: 28px;
}

.section-subtitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
}

/* Header & Navigation */
.top-bar {
  background-color: var(--secondary);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
  color: var(--accent);
}

.header-main {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--light);
  box-shadow: var(--shadow-sm);
  height: 90px;
  display: flex;
  align-items: center;
}

.header-main .navbar {
  width: 100%;
  padding: 0;
}

.header-logo {
  object-fit: contain;
  width: auto;
  height: auto;
  max-height: 80px;
  display: block;
}

@media (max-width: 991.98px) {
  .header-main {
    height: 75px;
  }
  .header-logo {
    max-height: 60px;
  }
}

@media (max-width: 575.98px) {
  .header-main {
    height: 65px;
  }
  .header-logo {
    max-height: 50px;
  }
}

.navbar-nav .nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--dark);
  padding: 20px 16px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: var(--transition);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 16px;
  right: 16px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Mega Dropdown */
.dropdown-menu-custom {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  margin-top: 0;
  background-color: var(--light);
  min-width: 260px;
}

.dropdown-item-custom {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.dropdown-item-custom i {
  color: var(--primary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.dropdown-item-custom:hover {
  background-color: var(--light-gray);
  color: var(--primary);
  transform: translateX(4px);
}

.dropdown-item-custom:hover i {
  color: var(--accent);
}

/* Search Trigger */
.search-trigger-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--light-gray);
  border: none;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-trigger-btn:hover {
  background: var(--primary);
  color: var(--light);
}

/* Hero Swiper Slider Section */
.hero-slider-section {
  position: relative;
  width: 100%;
  min-height: 520px;
  max-height: 720px;
  background-color: var(--secondary);
  margin-bottom: 0;
  overflow: hidden;
}

.swiper-hero {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.hero-slide {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  min-height: 520px;
  padding: 80px 0;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 34, 34, 0.88) 0%, rgba(92, 14, 82, 0.78) 50%, rgba(34, 34, 34, 0.5) 100%);
  z-index: 1;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  color: var(--light);
  max-width: 760px;
}

.hero-slide-title {
  color: var(--light);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-slide-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero-slide-title {
    font-size: 2.1rem;
  }
  .hero-slide-subtitle {
    font-size: 1rem;
  }
}

.swiper-button-next-custom,
.swiper-button-prev-custom {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.swiper-button-next-custom:hover,
.swiper-button-prev-custom:hover {
  background: var(--primary);
}

/* Feature Cards (Quality, Tech, Service) */
.feature-card {
  background: var(--light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(142, 27, 122, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
  background: var(--primary);
  color: var(--light);
  transform: scale(1.05);
}

/* Item Cards (Products & Applications) */
.item-card {
  background: var(--light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.item-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.item-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: transparent !important;
}

.item-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.item-card:hover .item-card-img-wrapper img {
  transform: scale(1.06);
}

.item-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: var(--light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  z-index: 2;
}

.item-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.item-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.item-card-title a {
  color: var(--dark);
}

.item-card-title a:hover {
  color: var(--primary);
}

.item-card-text {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.item-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Prestigious Projects Checklist */
.project-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  background-color: var(--light);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.project-check-item:hover {
  background-color: var(--light-gray);
  border-color: rgba(142, 27, 122, 0.3);
  transform: translateX(4px);
}

.project-check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.project-check-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
}

/* Client Logo Carousel */
.client-logo-card {
  background: var(--light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  transition: var(--transition);
}

.client-logo-card img {
  max-height: 46px;
  max-width: 100%;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.client-logo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.client-logo-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  color: var(--light);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Footer Styling */
.footer-dark {
  background-color: var(--dark-surface);
  color: rgba(255, 255, 255, 0.75);
  padding-top: 80px;
  padding-bottom: 0;
  border-top: 4px solid var(--primary);
}

.footer-logo {
  height: 55px;
  width: auto;
  max-height: 55px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
}

.footer-widget-title {
  color: var(--light);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.925rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social-btn:hover {
  background: var(--primary);
  color: var(--light);
  transform: translateY(-3px);
}

.footer-bottom {
  background-color: #0d0d0f;
  padding-top: 24px;
  padding-bottom: 24px;
  margin-top: 60px;
  font-size: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: var(--accent);
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--light);
  text-decoration: underline;
}

/* Page Header / Breadcrumb Banner */
.page-header-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--light);
  padding: 70px 0 60px;
  position: relative;
  overflow: hidden;
}

.page-header-title {
  color: var(--light);
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.breadcrumb-custom {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-custom .breadcrumb-item,
.breadcrumb-custom .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: var(--light);
  font-weight: 700;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

/* Category Filter Buttons */
.filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--light-gray);
  color: var(--dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--light);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(142, 27, 122, 0.25);
}

/* Clean Image & Container Wrappers - No Black Placeholders */
.radius-lg, .radius-md, .shadow-lg, .shadow-md {
  background-color: transparent !important;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--light);
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}
