/* ==========================================================================
   ⚓ HERO SECTION LAYOUT & SUB-COMPONENTS
   ========================================================================== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(200, 168, 75, 0.3);
  background: rgba(200, 168, 75, 0.04);
  padding: 6px 14px;
  margin-bottom: 1rem;
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--amber);
  display: block;
  flex-shrink: 0;
}

.badge-text {
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  line-height: 1;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero h1 em {
  color: var(--amber);
  font-style: normal;
  display: block;
}

.hero p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  align-items: center;
}

.btn-primary {
  background: var(--amber);
  color: #0a1628;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--amber-light);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 10px 20px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   🎮 INTERACTIVE HERO VIEWPORT VIEW COMPONENTS
   ========================================================================== */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cad-viewport-container {
  position: relative; 
  width: 100%; 
  max-width: 560px; 
  height: 380px; 
  min-height: 380px; 
  overflow: hidden;
  background: #0b253a;
  border: 1px solid rgba(200, 168, 75, 0.18);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cad-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.cad-layer.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.viewport-switcher-bar {
  display: flex;
  gap: 8px;
  background: rgba(11, 37, 58, 0.85);
  padding: 8px;
  border-radius: 30px;
  border: 1px solid rgba(200, 168, 75, 0.2);
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 560px;
}

.switch-btn {
  background: transparent;
  border: none;
  color: #a0b2c6;
  padding: 8px 16px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.switch-btn.active {
  background: var(--amber, #c8a84b);
  color: #051421;
  box-shadow: 0 2px 8px rgba(200, 168, 75, 0.3);
}

.demo-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(5, 20, 33, 0.7);
  color: #94a3b8;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  z-index: 5;
  pointer-events: none;
}

/* ==========================================================================
   📊 METRICS AND STATS STRIP
   ========================================================================== */
.stats-bar {
  background: var(--navy-mid);
  border-top: 1px solid rgba(200, 168, 75, 0.15);
  border-bottom: 1px solid rgba(200, 168, 75, 0.15);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: 1.25rem;
  border-right: 1px solid rgba(200, 168, 75, 0.1);
  text-align: center;
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--amber);
  font-weight: 600;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ==========================================================================
   🛠️ MODULAR APPLICATIONS MAIN GRID SETUP
   ========================================================================== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-tag {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--white);
  font-weight: 600;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.app-card {
  padding: 1.25rem;
  border: 1px solid rgba(200, 168, 75, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Dark linear gradient overlay transitioning seamlessly across all 15 app nodes */
  background-image: linear-gradient(180deg, rgba(11, 21, 40, 0.88) 0%, #0b1528 100%), url('../image/khorsandy.png');
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.active-card-link {
  text-decoration: none;
}

.app-card:hover {
  border-color: rgba(200, 168, 75, 0.6) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.app-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 168, 75, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  background: rgba(200, 168, 75, 0.02);
}

.app-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--amber);
  fill: none;
  stroke-width: 1.5;
}

.app-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.app-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.app-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  width: fit-content;
}

.status-active {
  background: rgba(200, 168, 75, 0.1);
  color: var(--amber);
  border-color: var(--amber);
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 75, 0.3), transparent);
}

/* ==========================================================================
   📂 MULTI-LEVEL DROPDOWN COMPONENT ARCHITECTURE 
   ========================================================================== */
.dropdown-menu {
  background: #0b1528 !important;
  border: 1px solid rgba(200, 168, 75, 0.2) !important;
  padding: 0.5rem 0 !important;
}

.dropdown-menu::before {
  display: none !important;
}

.dropdown-submenu {
  position: relative;
  width: 100%;
}

.submenu-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dropdown-submenu:hover .submenu-trigger {
  background: rgba(200, 168, 75, 0.1);
  color: var(--amber);
}

.sub-arrow {
  font-size: 9px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.submenu-content {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 240px;
  background: #0b1528;
  border: 1px solid rgba(200, 168, 75, 0.2);
  display: none;
  z-index: 10000;
  box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.4);
}

.dropdown-submenu:hover .submenu-content {
  display: block;
}

.submenu-content.show {
  display: block;
}

/* ==========================================================================
   📱 MEDIA QUERIES & RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
  }
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .apps-grid,
  .stats-inner {
    grid-template-columns: 1fr;
  }
}