/* ============================================
   SimulationAssignment.com - Engineering Theme
   CSS Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #25d366;
  --primary-dark: #128c7e;
  --secondary: #ff6b35;
  --accent: #7c3aed;
  --dark: #0a0e1a;
  --darker: #060812;
  --card-bg: #111827;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(37, 211, 102, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-heading: 'Orbitron', 'Rajdhani', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 0 20px rgba(37, 211, 102, 0.3);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

::selection {
  background: var(--primary);
  color: var(--dark);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

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

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

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

/* --- Buttons --- */
.btn {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 12px 28px;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--dark);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
  color: var(--dark);
}

.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
  color: #fff;
}

/* --- Navigation --- */
.navbar {
  background: rgba(6, 8, 18, 0.95) !important;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}

.navbar.scrolled {
  background: rgba(6, 8, 18, 1) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  color: var(--primary);
  font-size: 1.6rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted) !important;
  padding: 0.75rem 1rem !important;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* --- Hero Section --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: flex-start; /* Start from top, not center */
  position: relative;
  overflow: hidden;
  background: var(--dark);
  padding-top: 120px; /* Clear fixed navbar + breathing room */
  padding-bottom: 3rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.circuit-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(37, 211, 102, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 211, 102, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: var(--primary);
  text-shadow: 0 0 30px rgba(37, 211, 102, 0.5);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Oscilloscope Animation --- */
.oscilloscope {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 300px;
  opacity: 0.3;
  z-index: 1;
}

.oscilloscope-screen {
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.02);
  position: relative;
  overflow: hidden;
}

.oscilloscope-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(37, 211, 102, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 211, 102, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.waveform {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 2px;
  background: var(--primary);
  animation: waveform 3s linear infinite;
}

/* --- Section Styles --- */
.section-padding {
  padding: 5rem 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Hero is always visible, don't skip rendering */
.hero-section {
  content-visibility: visible;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  background: rgba(37, 211, 102, 0.1);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Cards --- */
.card-custom {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  contain: layout style paint;
}

.card-custom:hover {
  border-color: var(--primary);
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.card-img-wrapper img,
.card-img-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card-custom:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-body-custom {
  padding: 1.5rem;
}

.card-title-custom {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card-text-custom {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(37, 211, 102, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Services --- */
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s ease;
  height: 100%;
  contain: layout style paint;
}

.service-card:hover {
  border-color: var(--primary);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: rgba(37, 211, 102, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
  color: var(--primary);
  border: 2px solid var(--border);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: var(--dark);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #fff;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Stats Section --- */
.stats-section {
  background: linear-gradient(135deg, var(--dark), var(--darker));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  color: var(--text);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.testimonial-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.2rem;
}

.testimonial-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Latest Work / Portfolio --- */
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin: 0.25rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
}

.search-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  color: var(--text);
  width: 100%;
  max-width: 400px;
  transition: var(--transition);
}

.search-box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.search-box::placeholder {
  color: var(--text-muted);
}

/* --- Pagination --- */
.pagination-custom {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Blog --- */
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.blog-card:hover {
  border-color: var(--primary);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-meta i {
  color: var(--primary);
  margin-right: 0.3rem;
}

.blog-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.read-more:hover {
  gap: 0.75rem;
}

/* --- About Page --- */
.about-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--dark), var(--darker));
  position: relative;
  overflow: hidden;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateX(-5px);
  box-shadow: 0 0 10px var(--primary);
}

/* --- Contact --- */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}

.contact-card:hover {
  border-color: var(--primary);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: rgba(37, 211, 102, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-form .form-control {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  transition: var(--transition);
}

.contact-form .form-control:focus {
  background: var(--card-bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
  color: var(--text);
}

.contact-form .form-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Footer --- */
.footer {
  background: var(--darker);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  display: block;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Animations --- */
@keyframes waveform {
  0% { transform: translateX(0) translateY(-50%); }
  100% { transform: translateX(-50%) translateY(-50%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes electric-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .electrons, .oscilloscope, .noise-overlay {
    display: none !important;
  }
}

/* --- Electron Particles --- */
.electrons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.electron {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--primary);
  animation: electron-move linear infinite;
  opacity: 0.6;
}

@keyframes electron-move {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Breadcrumb --- */
.breadcrumb-section {
  padding: 6rem 0 3rem;
  background: linear-gradient(135deg, var(--dark), var(--darker));
  border-bottom: 1px solid var(--border);
}

.breadcrumb-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.breadcrumb-nav {
  color: var(--text-muted);
}

.breadcrumb-nav a {
  color: var(--primary);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  animation: pulse-glow 2s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 6rem;
  width: 45px;
  height: 45px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  z-index: 998;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary);
  color: var(--dark);
}

/* --- Video Facade (Lightweight Lazy Load) --- */
.video-facade {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--dark);
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-facade:hover img {
  transform: scale(1.05);
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
}

.video-facade:hover .video-play {
  background: var(--primary);
  color: var(--dark);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Noise Overlay (Desktop Only) --- */
@media (min-width: 992px) {
  .noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  }
}

@media (max-width: 991px) {
  .noise-overlay {
    display: none !important;
  }
}

/* --- Card Img Wrapper (Updated for Facade) --- */
.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--dark);
}

.card-img-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

/* --- Oscilloscope (Desktop Only) --- */
.oscilloscope {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 300px;
  opacity: 0.3;
  z-index: 1;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .oscilloscope {
    display: none;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .back-to-top {
    right: 5rem;
  }
  
  .video-facade .video-play {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  .video-duration {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    bottom: 1rem;
    right: 1rem;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 4.5rem;
  }
}

/* --- Loading Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate-slow 1s linear infinite;
}

/* --- Utilities --- */
.bg-darker { background: var(--darker) !important; }
.bg-dark-custom { background: var(--dark) !important; }
.border-top-custom { border-top: 1px solid var(--border) !important; }
.border-bottom-custom { border-bottom: 1px solid var(--border) !important; }

/* --- PhD Scholar Optimization Additions --- */

/* Country Badge */
.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.country-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.country-badge i {
  font-size: 1rem;
}

/* PhD Focus Card */
.phd-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: var(--transition);
  height: 100%;
}

.phd-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.phd-card-icon {
  width: 50px;
  height: 50px;
  background: rgba(37, 211, 102, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.phd-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.phd-card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Trust Banner */
.trust-banner {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.05), rgba(124, 58, 237, 0.05));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trust-banner-icon {
  width: 40px;
  height: 40px;
  background: rgba(37, 211, 102, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Urgency Badge */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Popular In Section */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.popular-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.popular-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.popular-flag {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.popular-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.popular-count {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 10000;
  transition: width 0.1s;
}

/* Mobile Menu Improvements */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(6, 8, 18, 0.99);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .popular-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .popular-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .trust-banner {
    flex-direction: column;
    text-align: center;
  }
}
