/* ============================================
   Softlink Systems — Homepage Styles
   A modern, professional redesign.
   This file is ONLY loaded by index.html.
   ============================================ */

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

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

body.home-page {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  color: #2d3748;
  background: #f8f9fc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---------- Utility ---------- */
.home-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c0392b;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 12px;
  line-height: 1.25;
}

.section-title span {
  color: #c0392b;
}

.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  max-width: 620px;
  margin-bottom: 40px;
}

/* ---------- Header / Navigation ---------- */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

.home-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.home-logo img {
  height: 48px;
  width: auto;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.home-nav a:hover {
  color: #c0392b;
  background: rgba(192,57,43,0.06);
}

.home-nav a.active {
  color: #c0392b;
  background: rgba(192,57,43,0.08);
  font-weight: 600;
}

/* Nav Dropdown on Desktop */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.arrow-down {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.nav-dropdown a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569 !important;
  padding: 10px 20px !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: all 0.2s;
  text-align: left;
  display: block;
  width: 100%;
}

.nav-dropdown a:hover {
  color: #c0392b !important;
  background: rgba(192, 57, 43, 0.05) !important;
}

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

.nav-dropdown-wrapper:hover .arrow-down {
  transform: rotate(180deg);
}

.home-header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a202c;
}

.home-header-phone svg {
  width: 18px;
  height: 18px;
  color: #c0392b;
}

/* ---------- Hamburger Menu ---------- */
.home-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: #1a202c;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-hamburger.open .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: #c0392b;
}

.home-hamburger.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.home-hamburger.open .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: #c0392b;
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- Hero Section ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 100px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a365d 100%);
  color: #fff;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(192,57,43,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.home-hero-content {
  flex: 1;
  min-width: 0;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 6px 16px 6px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 28px;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
}

.home-hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.home-hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.home-hero h1 .highlight {
  background: linear-gradient(135deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.home-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(192,57,43,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,57,43,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
}

.home-hero-visual {
  flex: 0 0 420px;
  position: relative;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-stat-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.12);
}

.hero-stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ---------- Trusted Brands Marquee ---------- */
.home-brands {
  padding: 48px 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.home-brands-header {
  text-align: center;
  margin-bottom: 32px;
}

.home-brands-header p {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #94a3b8;
  font-weight: 600;
}

.marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 160px;
  height: 70px;
  padding: 12px 24px;
  margin: 0 12px;
}

.marquee-item img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: filter 0.4s ease, transform 0.3s ease;
}

.marquee-item img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

/* ---------- About / Welcome ---------- */
.home-about {
  padding: 80px 0;
  background: #fff;
}

.home-about-inner {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.home-about-content {
  flex: 1;
}

.home-about-content p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 16px;
}

.home-about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.highlight-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-icon svg {
  width: 22px;
  height: 22px;
  color: #c0392b;
}

.highlight-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 2px;
}

.highlight-text p {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0;
}

/* ---------- Software Solutions ---------- */
.home-solutions {
  padding: 80px 0;
  background: #f8f9fc;
}

.home-solutions-header {
  text-align: center;
  margin-bottom: 48px;
}

.home-solutions-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.solution-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
}

.solution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: rgba(192,57,43,0.2);
}

.solution-card-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.solution-card-logo img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.solution-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 6px;
}

.solution-card p {
  font-size: 0.82rem;
  color: #64748b;
}

/* ---------- Services ---------- */
.home-services {
  padding: 80px 0;
  background: #fff;
}

.home-services-header {
  text-align: center;
  margin-bottom: 48px;
}

.home-services-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: #f8f9fc;
  border-radius: 14px;
  padding: 28px 20px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.service-card:hover {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-4px);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.service-icon.red    { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.service-icon.blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.service-icon.green  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.service-icon.purple { background: linear-gradient(135deg, #faf5ff, #f3e8ff); }
.service-icon.orange { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.service-icon.teal   { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); }
.service-icon.slate  { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
.service-icon.amber  { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.service-icon.rose   { background: linear-gradient(135deg, #fff1f2, #ffe4e6); }
.service-icon.cyan   { background: linear-gradient(135deg, #ecfeff, #cffafe); }
.service-icon.indigo { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }

.service-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.service-card .arrow {
  display: none;
}

/* ---------- CTA Section ---------- */
.home-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.home-cta::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(192,57,43,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-cta h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.home-cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 1;
}

.home-cta .btn-primary {
  position: relative;
  z-index: 1;
}

/* ---------- Footer ---------- */
.home-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.6);
  padding: 48px 0 24px;
  font-size: 0.85rem;
}

.home-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.home-footer-left {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.home-footer-links {
  display: flex;
  gap: 20px;
}

.home-footer-links a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  font-size: 0.85rem;
}

.home-footer-links a:hover {
  color: #fff;
}

.home-footer-social {
  display: flex;
  gap: 12px;
}

.home-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.home-footer-social a:hover {
  background: rgba(192,57,43,0.6);
  transform: translateY(-2px);
}

.home-footer-social svg {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,0.7);
  transition: fill 0.2s;
}

.home-footer-social a:hover svg {
  fill: #fff;
}

.home-footer-bottom {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
}

/* ---------- Animations ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .home-hero h1 { font-size: 2.6rem; }
  .home-hero-visual { flex: 0 0 340px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .solutions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .home-hero { padding: 60px 0 80px; }
  .home-hero-inner { flex-direction: column; gap: 40px; }
  .home-hero h1 { font-size: 2.2rem; }
  .home-hero-visual { flex: none; width: 100%; max-width: 400px; }
  .home-about-inner { flex-direction: column; gap: 32px; }
  .home-about-highlights { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Hamburger Menu Toggle */
  .home-hamburger {
    display: flex;
  }
  
  .home-header-phone {
    display: none !important;
  }

  .home-nav {
    display: none;
  }

  .home-nav.open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 105;
    animation: homeFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .home-nav.open a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    padding: 12px 28px;
    width: 100%;
    text-align: center;
  }

  .home-nav.open a:hover,
  .home-nav.open a.active {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.05);
  }

  /* Responsive dropdown settings */
  .home-nav.open .nav-dropdown-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home-nav.open .dropdown-trigger {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    padding: 12px 28px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .home-nav.open .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    min-width: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    background: transparent;
  }

  .home-nav.open .nav-dropdown a {
    font-size: 1.15rem;
    font-weight: 500;
    color: #64748b !important;
    padding: 6px 20px !important;
    text-align: center;
    background: transparent !important;
  }

  .home-nav.open .nav-dropdown a:hover {
    color: #c0392b !important;
    background: transparent !important;
  }

  @keyframes homeFadeIn {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  /* Footer responsive */
  .home-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .home-footer-left {
    justify-content: center;
  }

  .home-footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }

  .home-footer-social {
    justify-content: center;
  }

  .home-cta h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .home-hero h1 { font-size: 1.8rem; }
  .hero-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-stat-card { padding: 16px; }
  .hero-stat-number { font-size: 1.6rem; }
  .services-grid { grid-template-columns: 1fr; }
  .solutions-grid { grid-template-columns: 1fr; }
  .home-hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
