/* ============================================
   NEXUS - Custom Styles
   Modern, Clean, Professional
============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-amber: #f59e0b;
  --color-amber-dark: #d97706;
  --color-dark: #111827;
  --color-gray: #374151;
  --color-light-gray: #f9fafb;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* --- Dark Mode --- */
.dark body,
body.dark {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* --- Typography --- */
.font-display {
  font-family: 'Playfair Display', serif;
}

/* --- Navbar --- */
#navbar {
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-link {
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-amber);
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

/* --- Hero Gradient --- */
.hero-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 40%, #2563eb 70%, #3b82f6 100%);
}

.hero-pattern {
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(245,158,11,0.1) 0%, transparent 40%),
                    radial-gradient(circle at 60% 80%, rgba(59,130,246,0.2) 0%, transparent 50%);
}

/* --- Glassmorphism Card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Card Hover Effects --- */
.card-hover {
  transition: var(--transition);
}

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

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-amber:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
}

/* --- Section Titles --- */
.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(245,158,11,0.1));
  color: var(--color-primary);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(37,99,235,0.2);
  margin-bottom: 1rem;
}

.dark .section-tag {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(245,158,11,0.15));
  border-color: rgba(59,130,246,0.3);
  color: #60a5fa;
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(135deg, #2563eb, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Service Icon Box --- */
.icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.card-hover:hover .icon-box {
  transform: scale(1.1) rotate(3deg);
}

/* --- Blog Card Image --- */
.blog-img-wrap {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.blog-img-wrap img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-hover:hover .blog-img-wrap img {
  transform: scale(1.07);
}

/* --- Stats Counter --- */
.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
}

/* --- Timeline --- */
.timeline-item {
  position: relative;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #2563eb, #f59e0b);
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid white;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.3);
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 0.625rem;
  border: 1.5px solid #e5e7eb;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
  color: #111827;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.dark .form-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.dark .form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* --- Mobile Menu --- */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* --- Scroll to Top --- */
#scroll-top {
  transition: var(--transition);
  transform: translateY(100px);
  opacity: 0;
}

#scroll-top.visible {
  transform: translateY(0);
  opacity: 1;
}

/* --- Dark mode toggle --- */
#theme-toggle {
  transition: var(--transition);
}

#theme-toggle:hover {
  transform: rotate(20deg);
}

/* --- Footer --- */
.footer-link {
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--color-amber);
  padding-left: 4px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

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

@keyframes blob {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.animate-fade-up {
  animation: fadeInUp 0.7s ease forwards;
}

.animate-fade-left {
  animation: fadeInLeft 0.7s ease forwards;
}

.animate-fade-right {
  animation: fadeInRight 0.7s ease forwards;
}

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

.animate-blob {
  animation: blob 7s ease-in-out infinite;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* --- Intersection Observer Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Breadcrumb --- */
.breadcrumb-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.breadcrumb-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(245,158,11,0.08) 0%, transparent 50%);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* --- Pricing / Testimonial cards --- */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 5rem;
  color: rgba(37,99,235,0.15);
  font-family: serif;
  line-height: 1;
}

/* --- Blog Category Tag --- */
.cat-tag {
  display: inline-block;
  padding: 0.25rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Map Placeholder --- */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* --- Hamburger Animation --- */
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Active Page Indicator --- */
.active-page {
  color: #2563eb !important;
  font-weight: 600;
}

.dark .active-page {
  color: #60a5fa !important;
}

/* --- Cookie Bar --- */
#cookie-bar {
  transition: transform 0.4s ease;
  transform: translateY(100%);
}

#cookie-bar.show {
  transform: translateY(0);
}

/* --- Progress Bar --- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #f59e0b);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* --- Responsive Utilities --- */
@media (max-width: 768px) {
  .stat-number {
    font-size: 2rem;
  }

  .hero-heading {
    font-size: 2.5rem;
  }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.dark ::-webkit-scrollbar-track {
  background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* --- Selection Color --- */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
