@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --primary-color: #e6007e;
  --navy-color: #0f172a;
  --border-color: #e5e7eb;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-color);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-color);
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  font-size: 1rem;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Mega Menu Dropdown */
.nav-item-mega {
  position: static;
}

.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Bridge the gap so hover doesn't drop */
.mega-menu::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: transparent;
}

.mega-menu::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #e5e5e5;
}

.nav-item-mega:hover .mega-menu,
.nav-item-mega:focus-within .mega-menu {
  display: block;
}

.sub-menu {
  list-style: none;
  padding: 15px 0;
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  gap: 30px;
  padding-left: 15%;
  /* Approx alignment for Index page */
}

.sub-menu li a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.sub-menu li a:hover {
  color: var(--primary-color);
  font-weight: 700;
}

.contact-btn {
  background: var(--navy-color);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.contact-btn:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
  --bg-x: 50%;
  --bg-y: 50%;
  background: url('/img/index-bg.png') var(--bg-x) var(--bg-y) / 102% 102% no-repeat;
  transition: background-position 0.2s ease-out;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 500px;
  background: radial-gradient(circle at 50% 0%, rgba(230, 0, 126, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* Interactive cursor spotlight glow */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 150px at var(--mouse-x) var(--mouse-y), rgba(230, 0, 126, 0.5) 0%, rgba(255, 255, 255, 0) 80%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.hero:hover::after {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  animation: fadeUp 0.8s ease-out;
}

.hero h1 span {
  color: var(--primary-color);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s ease-out 0.1s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: fadeUp 0.8s ease-out 0.2s backwards;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #cc006e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 0, 126, 0.2);
}

.btn-secondary {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--navy-color);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  border-color: var(--navy-color);
  background: var(--bg-light);
  transform: translateY(-2px);
}

/* Service Layouts */
.services {
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.service-group {
  margin-bottom: 4rem;
}

.box-card {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 12px;
  background-color: #f1f5f9;
  /* Placeholder */
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-bg {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(1px) brightness(0.7);
  /* Slightly blurred and dimmed for high contrast */
  z-index: 1;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.box-card:hover .card-bg {
  transform: scale(1.08);
  filter: blur(0px) brightness(0.55);
  /* Sharpens slightly and darkens on hover */
}

.card-content {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Top Group */
.top-group {
  display: flex;
  gap: 20px;
}

.large-card {
  flex: 1;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.large-card h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.large-card p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.right-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.small-card {
  min-height: 180px;
  display: flex;
  align-items: flex-end;
}

.small-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.wide-card {
  grid-column: span 2;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
}

.wide-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.wide-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Middle Group */
.middle-group {
  background: #f8f9fa;
  padding: 3rem 2rem;
  border-radius: 12px;
}

.group-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #111;
}

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

.wireless-card {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
}

.wireless-card .card-content {
  padding: 1.5rem;
  width: 100%;
  text-align: center;
}

.wireless-card h3 {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  margin: 0;
}

/* Bottom Group */
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.list-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.list-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.list-img {
  width: 100px;
  height: 80px;
  background-color: #f1f5f9;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-right: 1.5rem;
}

.list-text h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: #111;
}

.list-text a {
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
}

.list-text a:hover {
  text-decoration: underline;
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .top-group {
    flex-direction: column;
  }

  .wireless-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .right-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .wide-card {
    grid-column: span 1;
  }

  .wireless-grid {
    grid-template-columns: 1fr;
  }
}

/* CTA Section */
.cta {
  padding: 5rem 5%;
  margin: 0 auto;
  max-width: 1200px;
  background: var(--navy-color);
  border-radius: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  margin-bottom: 5rem;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.cta .btn-secondary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 3rem;
}

.cta .btn-secondary:hover {
  background: #cc006e;
}

/* Footer */
footer {
  background: #f1f5f9;
  padding: 4rem 5% 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy-color);
  margin-bottom: 1.5rem;
}

.footer-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.footer-info strong {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

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

  .cta h2 {
    font-size: 2rem;
  }

  .services {
    padding: 4rem 5%;
  }
}