/* 
 * Powered BLUE Website Redesign - Main Stylesheet
 * High-Performance / Modern / Japanese Grid Layout
 */

:root {
  /* Premium Color Palette */
  --color-primary: #004e92;
  /* Rich Deep Blue */
  --color-secondary: #000428;
  /* Midnight Blue */
  --color-accent: #00d2ff;
  /* Cyan Electric */
  --color-bg-light: #f8f9fa;
  --color-text-main: #333333;
  --color-text-sub: #666666;
  --color-text-white: #ffffff;
  --color-border: #e0e0e0;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  --gradient-btn: linear-gradient(90deg, #004e92 0%, #000428 100%);
  --gradient-accent: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);

  /* Spacing */
  --container-max-width: 1200px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;

  /* Effects */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --header-height: 70px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
  /* Header is fixed, prevent overlapping */
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.text-center {
  text-align: center;
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

/* Scroll Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modern Components */
.btn-primary {
  display: inline-block;
  background: var(--gradient-btn);
  color: var(--color-text-white);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: bold;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0, 78, 146, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 78, 146, 0.4);
  color: var(--color-text-white);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  padding: 11px 28px;
  border-radius: 50px;
  font-weight: bold;
  letter-spacing: 0.05em;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.btn-header {
  background: var(--color-accent);
  /* Brighter CTA in header */
  color: #003366 !important;
  /* Contrasting text for accent button */
  padding: 8px 20px;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
}

.btn-header:hover {
  background: #fff;
  color: var(--color-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

/* Fixed Glass Header (Dark Blue) */
header {
  background-color: rgba(0, 4, 40, 0.9);
  /* Dark Blue Transparent */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Stronger shadow */
  position: fixed;
  /* Fixed position */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

/* Logo Styling */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-white) !important;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  fill: var(--color-accent);
}

.logo-text {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.4rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.logo-text .brand-powered {
  font-weight: 300;
  /* Thin */
  color: rgba(255, 255, 255, 0.9);
}

.logo-text .brand-blue {
  font-weight: 700;
  /* Bold */
  color: var(--color-accent);
}


.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  /* Light text */
  font-size: 0.95rem;
}

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

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-white);
  cursor: pointer;
  padding: 10px;
  z-index: 1100;
}

.mobile-menu-toggle svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--color-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    padding: 20px;
  }

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

  .nav-links a {
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }

  .btn-header {
    width: auto;
    margin-top: 10px;
  }
}

/* Dynamic Hero with Cyber Grid */
.hero {
  background: url('../images/hero.jpg') no-repeat center center/cover;
  color: var(--color-text-white);
  padding: 120px 0;
  /* Updated padding */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-card img,
.product-detail-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Updated Grid: #00AEEF, thinner lines */
  background-image:
    linear-gradient(rgba(0, 174, 239, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 174, 239, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  /* Slight larger grid for elegance */
  animation: move-grid 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes move-grid {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 60px 60px;
  }
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Vignette Effect: Darker outside */
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 4, 40, 0.8) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
  /* Ensure content is above vignette */
}

.hero h1 {
  /* Stronger Typography */
  font-size: clamp(2.5rem, 5vw, 4rem);
  /* Increased size */
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  /* Bold */
  letter-spacing: 0.1em;
  /* Widen spacing */
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  /* Stronger shadow */
  line-height: 1.3;
}

.text-highlight {
  color: #00AEEF;
  position: relative;
  display: inline-block;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  font-weight: 400;
  line-height: 1.8;
}

/* Glowing Button Effect */
.btn-glow {
  box-shadow: 0 0 20px rgba(0, 174, 239, 0.5);
  transition: all 0.3s ease;
}

.btn-glow:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 40px rgba(0, 174, 239, 0.8), 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Feature Cards */
.section-products {
  background-color: #ffffff;
  padding: 80px 0;
  color: #003366;
  /* Dark Navy Text */
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: #003366;
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  /* Removed overlap margins */
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 40px 30px;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-top: 4px solid var(--color-primary);
  /* Status Bar */
  display: flex;
  flex-direction: column;
}

/* Enhanced Hover Effect */
.product-card:hover {
  transform: translateY(-15px) scale(1.03);
  /* Larger lift and scale */
  box-shadow: 0 30px 60px rgba(0, 78, 146, 0.15);
  /* Deeper shadow */
  border-color: rgba(0, 210, 255, 0.2);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: #f0f7ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.2rem;
  font-family: 'Roboto Mono', monospace;
  /* Tech Spec Font */
  letter-spacing: -1px;
}

.card-title {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  text-align: center;
  font-weight: 700;
}

.card-desc {
  font-size: 0.9rem;
  /* Slightly smaller */
  color: var(--color-text-sub);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  flex-grow: 1;
}

.card-footer {
  text-align: center;
  margin-top: auto;
}

/* Contact CTA Section */
.section-contact-cta {
  background-color: #f7f9fb;
  /* Light gray */
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

.section-contact-cta h2 {
  color: var(--color-primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.section-contact-cta p {
  color: var(--color-text-sub);
  margin-bottom: 30px;
}

/* Responsive: Stack cards vertically on mobile */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Step Diagram */
.steps-section {
  background: white;
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--color-border);
}

.steps-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.step-item {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  text-align: center;
  padding: 20px;
}

.step-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 60px;
  margin: 0 auto 20px;
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.3);
}

.step-content h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-primary);
}

.step-content p {
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

.step-arrow {
  font-size: 2rem;
  color: var(--color-border);
  margin-top: 30px;
  font-weight: 300;
  animation: pulse-arrow 2s infinite ease-in-out;
}

@keyframes pulse-arrow {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.5;
  }

  50% {
    transform: translateX(5px);
    opacity: 1;
    color: var(--color-accent);
  }
}

@media (max-width: 768px) {
  .steps-container {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin: 10px 0;
  }
}

/* Contact Form */
.contact-form-container {
  max-width: 600px;
  margin: var(--spacing-xl) auto;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #edf2f7;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

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

/* Updated Footer */
footer {
  background: #000428;
  /* Dark Midnight Blue */
  color: rgba(255, 255, 255, 0.7);
  padding-top: 60px;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-info h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 20px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.copyright {
  background: #000215;
  /* Even darker for bottom bar */
  padding: 20px 0;
  text-align: center;
  margin-top: 0;
}

/* Products Page Styles */

/* Compact Hero */
.hero-small {
  padding: 80px 0 100px;
  /* Reduced padding */
}

.hero-small h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-small p {
  font-size: 1rem;
  opacity: 0.9;
}

.hero-small::before {
  /* Slightly different grid for subpages maybe, or same */
  opacity: 0.15;
}

/* Product Detail Items */
.section-products-detail {
  padding: 60px 0;
  background: white;
}

.product-detail-item {
  margin-bottom: 80px;
  border-bottom: 1px solid #eee;
  padding-bottom: 60px;
}

.product-detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.detail-icon {
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.1rem;
}

.detail-header h2 {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin: 0;
}

.detail-content h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--color-text-main);
}

.detail-content p {
  line-height: 1.8;
  margin-bottom: 25px;
  color: var(--color-text-main);
}

.detail-features,
.detail-usecase {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.detail-features h4,
.detail-usecase h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--color-secondary);
  border-left: 4px solid var(--color-accent);
  padding-left: 10px;
}

.detail-features ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--color-text-sub);
}

.detail-features li {
  margin-bottom: 8px;
}

.detail-action {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .detail-action {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-action .btn-primary,
  .detail-action .btn-secondary {
    text-align: center;
  }
}

/* Comparison Table */
.section-comparison {
  padding: 60px 0;
  background: #fff;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */
  box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
  /* Indicate scrollability */
  margin: 0 -16px;
  /* Negative margin to touch edges on mobile */
  padding: 0 16px;
  /* Restore padding */
  width: calc(100% + 32px);
}

@media (min-width: 768px) {
  .table-responsive {
    margin: 0;
    padding: 0;
    width: 100%;
    box-shadow: none;
  }
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  /* Required for sticky */
  border-spacing: 0;
  margin-top: 20px;
  min-width: 600px;
  /* Ensure enough width to trigger scroll */
}

.comparison-table th,
.comparison-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

/* Sticky First Column */
.comparison-table th:first-child,
.comparison-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fdfdfd;
  /* Ensure bg to cover scrolled text */
  border-right: 2px solid #ddd;
  /* Divider line */
  font-weight: bold;
  color: var(--color-primary);
}

.comparison-table th:first-child {
  background: #333;
  /* Header bg */
  color: white;
  z-index: 3;
  /* Higher than sticky td */
}

.comparison-table th {
  background: var(--color-secondary);
  color: white;
  font-weight: 600;
  white-space: nowrap;
  /* Prevent ugly wrap */
}

/* Row-striping adjustment for sticky */
.comparison-table tr:nth-child(even) td {
  background: #fdfdfd;
}

.comparison-table tr:nth-child(even) td:first-child {
  background: #f0f0f0;
  /* Darker bg for sticky col even rows */
}

.marker-ok {
  color: #27ae60;
  font-weight: bold;
}

.marker-sub {
  color: #f39c12;
}

/* Marker styles above */

/* Contact Form Enhancements */
.contact-form-container {
  max-width: 800px;
  /* Wider form */
}

.form-group label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
  margin-bottom: 8px;
  display: block;
}

.form-control {
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fdfdfd;
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.15);
  /* Nice cyan glow */
  background: white;
  outline: none;
}

.row-group {
  display: flex;
  gap: 20px;
}

.col-half {
  flex: 1;
}

@media (max-width: 600px) {
  .row-group {
    flex-direction: column;
    gap: 0;
  }

  .col-half {
    margin-bottom: 20px;
  }
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 30px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
  cursor: pointer;
}

.radio-group {
  display: flex;
  gap: 20px;
  padding: 10px 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal !important;
  /* Override bold label */
  cursor: pointer;
  color: var(--color-text-main) !important;
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}