/* ============================================
   ShareTech - Components
   ============================================ */

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: var(--z-header);
  transition: all var(--transition-base);
  background: transparent;
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  text-decoration: none;
  z-index: var(--z-header);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: white;
  font-weight: var(--weight-extrabold);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  background: var(--color-accent-subtle);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-dropdown-trigger i.fa-chevron-down {
  font-size: 0.6rem;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-trigger i.fa-chevron-down {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.nav-dropdown-menu a:hover {
  background: var(--color-accent-subtle);
  color: var(--color-white);
}

.nav-dropdown-menu a i {
  width: 20px;
  text-align: center;
  color: var(--color-accent-light);
  font-size: var(--text-sm);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  z-index: var(--z-header);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-accent-light);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* --- Cards --- */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  font-size: var(--text-xl);
  color: var(--color-accent-light);
  transition: all var(--transition-base);
}

.card:hover .card-icon {
  background: var(--gradient-primary);
  color: var(--color-white);
  transform: scale(1.05);
}

.card h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
}

.card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent-light);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-top: var(--space-4);
  transition: all var(--transition-fast);
}

.card-link:hover {
  gap: var(--space-3);
  color: var(--color-accent);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-image-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-image-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(30,58,95,0.6) 50%, rgba(22,78,99,0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 800px;
}

.hero h1 {
  font-size: var(--text-6xl);
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero .hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -300px;
  left: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Card with Image --- */
.card-with-image {
  padding: 0;
}

.card-with-image .card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-with-image .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-with-image:hover .card-img img {
  transform: scale(1.08);
}

.card-with-image .card-body {
  padding: var(--space-6);
}

.card-with-image .card-icon {
  margin-bottom: var(--space-3);
}

/* --- Page Hero with Image --- */
.page-hero-with-image {
  position: relative;
}

.page-hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.page-hero-bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.9) 0%, rgba(30,41,59,0.95) 100%);
}

/* --- Service Page Hero --- */
.page-hero {
  padding-top: calc(var(--header-height) + var(--space-16));
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
  background: var(--gradient-dark);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

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

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.page-hero .breadcrumb a {
  color: var(--color-text-muted);
}

.page-hero .breadcrumb a:hover {
  color: var(--color-accent-light);
}

.page-hero .breadcrumb .separator {
  color: var(--color-text-dim);
}

.page-hero h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.page-hero .page-hero-desc {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 700px;
}

/* --- Feature Box --- */
.feature-box {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.feature-box:hover {
  border-color: var(--color-border-light);
}

.feature-box-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-accent-light);
}

.feature-box h4 {
  margin-bottom: var(--space-2);
}

.feature-box p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* --- Tech Badge --- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-accent-light);
  font-weight: var(--weight-medium);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.cta-section h2 {
  position: relative;
  margin-bottom: var(--space-4);
}

.cta-section p {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

.cta-section .btn {
  position: relative;
}

.cta-section .btn-white {
  background: var(--color-white);
  color: var(--color-accent);
  font-weight: var(--weight-bold);
}

.cta-section .btn-white:hover {
  background: var(--color-text-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: var(--color-accent);
}

/* --- Footer --- */
.footer {
  background: var(--color-primary-dark);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  line-height: var(--leading-relaxed);
}

.footer h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

.footer-links a:hover {
  color: var(--color-accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: var(--color-text-dim);
  font-size: var(--text-sm);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

.footer-bottom-links a {
  color: var(--color-text-dim);
  font-size: var(--text-sm);
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--color-error);
  margin-left: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-dim);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--space-10);
}

.form-error {
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-textarea,
.form-group.error .form-select {
  border-color: var(--color-error);
}

.form-group.error .form-error {
  display: block;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform var(--transition-spring);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  color: var(--color-success);
  font-size: var(--text-2xl);
}

.modal h3 {
  margin-bottom: var(--space-3);
}

.modal p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* --- Service Detail Layout --- */
.service-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-12);
  align-items: start;
}

.service-main h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-accent-subtle);
}

.service-main h2:first-child {
  margin-top: 0;
}

.service-main p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.service-main ul {
  margin-bottom: var(--space-6);
}

.service-main ul li {
  color: var(--color-text-secondary);
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  font-size: var(--text-sm);
}

.service-main ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Service Content Image */
.service-image {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: var(--space-6) 0;
  border: 1px solid var(--color-border);
}

.service-image img {
  width: 100%;
  height: auto;
  display: block;
}

.service-image.hero-img {
  height: 300px;
}

.service-image.hero-img img {
  height: 100%;
  object-fit: cover;
}

.service-image figcaption {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

/* Sidebar */
.service-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

.sidebar-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.sidebar-card h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--color-accent-subtle);
  color: var(--color-accent-light);
}

.sidebar-nav a i {
  width: 16px;
  text-align: center;
  font-size: var(--text-xs);
}

/* --- Responsive: Components --- */
@media (max-width: 1024px) {
  .service-content {
    grid-template-columns: 1fr;
  }

  .service-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--header-height) + var(--space-8)) var(--space-6) var(--space-8);
    transition: right var(--transition-slow);
    overflow-y: auto;
    border-left: 1px solid var(--color-border);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    box-shadow: none;
    padding-left: var(--space-4);
    display: none;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: block;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .service-sidebar {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: var(--text-3xl);
  }

  .cta-section {
    padding: var(--space-10) var(--space-6);
  }
}
