/* ===== Custom Styles for M&M,Etc LLC ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Selection color */
::selection {
  background: color-mix(in srgb, #3da868 30%, transparent);
  color: #0a1833;
}

/* ===== Navigation ===== */
.nav-logo-text {
  transition: color 0.3s ease;
}

.nav-logo-sub {
  transition: color 0.3s ease;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3da868;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Scrolled navbar state */
nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(10, 24, 51, 0.08);
}

nav.scrolled .nav-logo-text {
  color: #0a1833;
}

nav.scrolled .nav-logo-sub {
  color: #4468cd;
}

nav.scrolled .nav-link {
  color: #223c78;
}

nav.scrolled .nav-link:hover {
  color: #0a1833;
}

/* ===== Mobile Menu ===== */
.hamburger-line {
  transition: all 0.3s ease;
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav-link {
  position: relative;
  padding-left: 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
  color: #3da868;
  padding-left: 12px;
}

.mobile-nav-link::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: #3da868;
  transition: width 0.2s ease;
}

.mobile-nav-link:hover::before {
  width: 8px;
}

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #3da868, #95d5b0);
  transition: height 0.4s ease;
}

.service-card:hover::before {
  height: 100%;
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(61, 168, 104, 0.15);
}

/* ===== Scroll Animations ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.hidden-reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Only apply animation when prefers-reduced-motion is not set */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* ===== Button hover effects ===== */
a[href^="tel:"],
a[href^="mailto:"] {
  text-decoration: none;
}

/* ===== Subtle hover lift for cards ===== */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(10, 24, 51, 0.15);
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f3fb;
}

::-webkit-scrollbar-thumb {
  background: #b4c2eb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6986d7;
}

/* ===== Focus visible for accessibility ===== */
:focus-visible {
  outline: 2px solid #3da868;
  outline-offset: 2px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  #hero h1 {
    font-size: 2.75rem;
  }

  .service-card {
    padding: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.25rem;
  }

  #hero h1 span {
    display: block;
  }
}

/* ===== Print styles ===== */
@media print {
  nav, #mobile-menu-btn, .scroll-indicator {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }
}
