/* ==============================================
   MSM ENGINEERING SL - LANDING PAGE STYLES
   ============================================== */

/* ==============================================
   NAVBAR
   ============================================== */
.msm-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s ease;
}

.msm-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
}

.msm-navbar.scrolled .msm-nav-link {
  color: var(--msm-gray-800);
}

.msm-navbar.scrolled .msm-nav-link:hover {
  color: var(--msm-violet);
}

.msm-navbar-brand img {
  height: 50px;
  transition: height 0.3s ease;
}

.msm-navbar.scrolled .msm-navbar-brand img {
  height: 40px;
}

.msm-nav-link {
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  font-family: var(--msm-font-primary);
  position: relative;
  transition: color 0.3s ease;
  text-decoration: none;
}

.msm-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--msm-gradient);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.msm-nav-link:hover::after,
.msm-nav-link.active::after {
  width: 70%;
}

/* Language Selector */
.msm-lang-selector {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.msm-navbar.scrolled .msm-lang-selector {
  border-left-color: var(--msm-gray-300);
}

.msm-lang-btn {
  background: transparent;
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--msm-radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.msm-navbar.scrolled .msm-lang-btn {
  color: var(--msm-gray-600);
}

.msm-lang-btn img {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
}

.msm-lang-btn:hover,
.msm-lang-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.msm-navbar.scrolled .msm-lang-btn:hover,
.msm-navbar.scrolled .msm-lang-btn.active {
  background: var(--msm-violet-100);
  color: var(--msm-violet);
}

/* Mobile Toggle */
.msm-navbar-toggler {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.msm-navbar-toggler span {
  display: block;
  width: 25px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.msm-navbar.scrolled .msm-navbar-toggler span {
  background: var(--msm-gray-800);
}

/* ==============================================
   HERO SECTION
   ============================================== */
.msm-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--msm-gradient);
}

.msm-hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.3) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  animation: msm-float 8s ease-in-out infinite;
}

.msm-hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(107, 91, 149, 0.3) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: msm-float 8s ease-in-out infinite 2s;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.msm-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 100px;
}

.msm-hero-title {
  font-family: var(--msm-font-primary);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.msm-hero-typed {
  display: block;
  color: var(--msm-blue-light);
  min-height: 1.3em;
}

.msm-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 550px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.msm-hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.msm-hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.msm-hero-stat {
  text-align: center;
}

.msm-hero-stat-value {
  font-family: var(--msm-font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.msm-hero-stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.msm-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: msm-bounce 2s infinite;
}

.msm-scroll-indicator a {
  color: white;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.msm-scroll-indicator a:hover {
  opacity: 1;
}

/* ==============================================
   CLIENTS SECTION
   ============================================== */
.msm-clients {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--msm-gray-50) 0%, white 100%);
}

.msm-clients-title {
  text-align: center;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--msm-gray-500);
  font-weight: 600;
  margin-bottom: 2rem;
}

.msm-clients-slider {
  overflow: hidden;
}

.msm-client-logo {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.4s ease;
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.msm-client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* ==============================================
   SERVICES SECTION
   ============================================== */
.msm-services {
  padding: 6rem 0;
  background: white;
}

.msm-service-card {
  background: white;
  border-radius: var(--msm-radius-2xl);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--msm-shadow-md);
  transition: all 0.4s var(--msm-ease-out-cubic);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.msm-service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--msm-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.msm-service-card:hover::before {
  transform: scaleX(1);
}

.msm-service-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--msm-shadow-xl), var(--msm-shadow-glow-violet);
}

.msm-service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--msm-gradient);
  border-radius: var(--msm-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  transition: transform 0.4s ease;
}

.msm-service-card:hover .msm-service-icon {
  transform: rotateY(180deg);
}

.msm-service-title {
  font-family: var(--msm-font-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--msm-gray-800);
}

.msm-service-desc {
  color: var(--msm-gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.msm-service-link {
  color: var(--msm-violet);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.msm-service-link:hover {
  gap: 0.75rem;
  color: var(--msm-violet-dark);
}

/* ==============================================
   TECH STACK SECTION
   ============================================== */
.msm-tech {
  padding: 6rem 0;
  background: var(--msm-gray-50);
}

.msm-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.msm-tech-item {
  background: white;
  border-radius: var(--msm-radius-xl);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--msm-shadow-sm);
  transition: all 0.4s ease;
  cursor: pointer;
}

.msm-tech-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--msm-shadow-lg);
}

.msm-tech-item i {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.msm-tech-item span {
  font-size: 0.75rem;
  color: var(--msm-gray-600);
  font-weight: 500;
}

/* ==============================================
   ABOUT/MISSION SECTION
   ============================================== */
.msm-about {
  padding: 6rem 0;
  background: white;
}

.msm-about-content {
  max-width: 550px;
}

.msm-about-title {
  font-family: var(--msm-font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--msm-gray-800);
}

.msm-about-text {
  color: var(--msm-gray-600);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.msm-about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.msm-about-stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--msm-gray-50);
  border-radius: var(--msm-radius-xl);
}

.msm-about-stat-value {
  font-family: var(--msm-font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--msm-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.msm-about-stat-label {
  font-size: 0.875rem;
  color: var(--msm-gray-600);
}

.msm-about-image {
  position: relative;
}

.msm-about-image img {
  border-radius: var(--msm-radius-2xl);
  box-shadow: var(--msm-shadow-xl);
}

.msm-about-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  background: var(--msm-gradient);
  border-radius: var(--msm-radius-2xl);
  z-index: -1;
  opacity: 0.2;
}

/* ==============================================
   CTA SECTION
   ============================================== */
.msm-cta {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.msm-cta-bg {
  position: absolute;
  inset: 0;
  background: var(--msm-gradient-animated);
  background-size: 400% 400%;
  animation: msm-gradient-shift 10s ease infinite;
}

.msm-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.msm-cta-title {
  font-family: var(--msm-font-primary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.msm-cta-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==============================================
   FOOTER
   ============================================== */
.msm-footer {
  background: var(--msm-gray-900);
  color: white;
  padding: 5rem 0 2rem;
}

.msm-footer-brand {
  margin-bottom: 1.5rem;
}

.msm-footer-brand img {
  height: 45px;
  margin-bottom: 1rem;
}

.msm-footer-desc {
  color: var(--msm-gray-400);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 300px;
}

.msm-footer-title {
  font-family: var(--msm-font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
}

.msm-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.msm-footer-links li {
  margin-bottom: 0.75rem;
}

.msm-footer-links a {
  color: var(--msm-gray-400);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.msm-footer-links a:hover {
  color: var(--msm-blue-light);
  padding-left: 0.5rem;
}

.msm-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--msm-gray-400);
}

.msm-footer-contact-item i {
  color: var(--msm-blue);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.msm-footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.msm-footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.msm-footer-social a:hover {
  background: var(--msm-gradient);
  transform: translateY(-5px);
}

.msm-footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.msm-footer-copyright {
  color: var(--msm-gray-500);
  font-size: 0.875rem;
}

.msm-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--msm-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: var(--msm-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  z-index: 999;
  border: none;
}

.msm-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.msm-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--msm-shadow-glow-gradient);
}

/* ==============================================
   RESPONSIVE STYLES
   ============================================== */
@media (max-width: 991px) {
  .msm-navbar-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: left 0.4s ease;
    box-shadow: var(--msm-shadow-xl);
  }

  .msm-navbar-menu.active {
    left: 0;
  }

  .msm-navbar-menu .msm-nav-link {
    color: var(--msm-gray-800);
    padding: 1rem 0;
    border-bottom: 1px solid var(--msm-gray-200);
  }

  .msm-navbar-toggler {
    display: block;
  }

  .msm-lang-selector {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: 2rem;
    justify-content: center;
  }

  .msm-hero-stats {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .msm-hero-title {
    font-size: 2rem;
  }

  .msm-hero-buttons {
    flex-direction: column;
  }

  .msm-hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .msm-hero-stats {
    gap: 1.5rem;
  }

  .msm-hero-stat-value {
    font-size: 2rem;
  }

  .msm-about-stats {
    grid-template-columns: 1fr;
  }

  .msm-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==============================================
   PAGE LOADER
   ============================================== */
.msm-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.msm-page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.msm-loader-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--msm-gray-200);
  border-top-color: var(--msm-violet);
  border-right-color: var(--msm-blue);
  border-radius: 50%;
  animation: msm-spin 1s linear infinite;
}
