/* ==================== premium design system variables ==================== */
:root {
  /* Dark / Midnight Theme Variables (Default) */
  --bg-main: #030712;
  --bg-header: rgba(10, 15, 30, 0.7);
  --card-bg: rgba(17, 24, 39, 0.45);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-border-hover: rgba(255, 255, 255, 0.15);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --border-muted: rgba(255, 255, 255, 0.05);
  
  /* Brand Glow Accents */
  --accent: #10B981;       /* Emerald Green - NIOS Theme */
  --secondary: #3B82F6;    /* Sapphire Blue - License Theme */
  --accent-glow: rgba(16, 185, 129, 0.15);
  --secondary-glow: rgba(59, 130, 246, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-glow-green: 0 0 30px -5px rgba(16, 185, 129, 0.2);
  --shadow-glow-blue: 0 0 30px -5px rgba(59, 130, 246, 0.2);
  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables Override */
[data-theme="light"] {
  --bg-main: #F8FAFC;
  --bg-header: rgba(255, 255, 255, 0.75);
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(15, 23, 42, 0.06);
  --card-border-hover: rgba(15, 23, 42, 0.15);
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-muted: rgba(15, 23, 42, 0.04);
  
  --accent: #059669;       /* Darker Emerald */
  --secondary: #2563EB;    /* Royal Blue */
  --accent-glow: rgba(5, 150, 105, 0.08);
  --secondary-glow: rgba(37, 99, 235, 0.08);
  
  --shadow-glow-green: 0 10px 30px -5px rgba(5, 150, 105, 0.15);
  --shadow-glow-blue: 0 10px 30px -5px rgba(37, 99, 235, 0.15);
  --shadow-main: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
}

/* ==================== Reset and Global Base ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

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

/* Layout container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ==================== Portal abstract glow background shapes ==================== */
.portal-background-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(140px);
  opacity: 0.18;
  transition: all 0.5s;
}

.primary-glow {
  top: -10%;
  left: 15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.secondary-glow {
  bottom: 10%;
  right: 10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

[data-theme="light"] .glow-orb {
  opacity: 0.1;
}

/* ==================== Floating Glass Header Layout ==================== */
.header-floating-container {
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}

header {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  background: var(--bg-header);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
  transition: background-color 0.4s, border-color 0.4s;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

/* Logo Badge */
.logo-wrapper {
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-full);
  height: 44px;
  width: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.logo-wrapper:hover {
  transform: scale(1.02);
}

.logo-wrapper img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Nav Menu */
nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--text-main);
}

/* Header Buttons styling */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-billing {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10B981;
}

.btn-billing:hover {
  background: #10B981;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-green);
}

.btn-license {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3B82F6;
}

.btn-license:hover {
  background: #3B82F6;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-blue);
}

/* Theme Toggle Button */
.theme-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: background 0.2s;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-btn i {
  width: 16px;
  height: 16px;
}

.mobile-menu-btn {
  display: none;
}

/* ==================== VIEW 1: GATEWAY HERO SPLIT PORTAL ==================== */
.gateway-hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gateway-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 5rem auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--secondary);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: inherit;
  border-radius: inherit;
  animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.gateway-intro h1 {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -2px;
}

.gateway-intro p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Split Layout cards */
.gateway-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.gateway-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}

/* Card Glow Effect on Hover */
.card-glow-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.card-nios .card-glow-bg {
  background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), var(--accent-glow) 0%, transparent 50%);
}

.card-license .card-glow-bg {
  background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), var(--secondary-glow) 0%, transparent 50%);
}

.gateway-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-border-hover);
}

.gateway-card:hover .card-glow-bg {
  opacity: 1;
}

.gateway-card.card-nios:hover {
  box-shadow: var(--shadow-glow-green), var(--shadow-main);
}

.gateway-card.card-license:hover {
  box-shadow: var(--shadow-glow-blue), var(--shadow-main);
}

.card-header-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-nios .icon-bubble {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.card-license .icon-bubble {
  background: rgba(59, 130, 246, 0.08);
  color: var(--secondary);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.icon-bubble i {
  width: 24px;
  height: 24px;
}

.gateway-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.75px;
}

.gateway-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.gateway-checklist {
  list-style: none;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gateway-checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.gateway-checklist i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.card-nios .gateway-checklist i {
  color: var(--accent);
}

.card-license .gateway-checklist i {
  color: var(--secondary);
}

/* Card Button */
.card-btn {
  width: 100%;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  position: relative;
}

.card-nios .card-btn {
  background: var(--accent);
  color: #FFFFFF;
}

.card-nios .card-btn:hover {
  background: #059669;
}

.card-license .card-btn {
  background: var(--secondary);
  color: #FFFFFF;
}

.card-license .card-btn:hover {
  background: #2563EB;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.gateway-card:hover .arrow-icon {
  transform: translateX(4px);
}

/* ==================== DETAILED SUBPAGE VIEWS ==================== */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: viewFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.back-container {
  padding-top: 8.5rem;
  margin-bottom: -1rem;
}

.btn-back-home {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-back-home:hover {
  background: var(--card-border-hover);
  transform: translateX(-3px);
}

.btn-back-home i {
  width: 14px;
  height: 14px;
}

/* Desk sections Details design */
.desk-section {
  padding: 3rem 0 6rem 0;
}

.desk-header {
  margin-bottom: 4rem;
}

.desk-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  letter-spacing: 0.5px;
}

.nios-theme .desk-badge {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.license-theme .desk-badge {
  background: rgba(59, 130, 246, 0.08);
  color: var(--secondary);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.desk-header h2 {
  font-size: 2.75rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  letter-spacing: -1.5px;
}

.desk-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 760px;
}

/* Service item grids */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 2rem;
}

.service-item-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}

.service-item-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
}

.nios-theme .service-item-card:hover {
  box-shadow: var(--shadow-glow-green), var(--shadow-main);
}

.license-theme .service-item-card:hover {
  box-shadow: var(--shadow-glow-blue), var(--shadow-main);
}

.service-item-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.service-item-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
  line-height: 1.6;
}

.service-item-card .btn {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
}

/* Accent Buttons */
.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  background: #059669;
}

.btn-primary {
  background: var(--secondary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #2563EB;
}

/* ==================== INSTRUMENTS STORE GRID ==================== */
.products-layout {
  padding: 3rem 0 6rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
  padding: 0;
}

.product-item:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow-blue), var(--shadow-main);
}

.product-img-wrapper {
  width: 100%;
  height: 185px;
  overflow: hidden;
  position: relative;
  background: #1e293b;
  margin-bottom: 0;
  transition: var(--transition);
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-item:hover .product-img-wrapper img {
  transform: scale(1.06);
}

.product-content {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-content h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.25px;
}

.product-specs {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.product-specs li {
  margin-bottom: 0.4rem;
}

.select-btn {
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem 1.5rem;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 700;
  padding: 0.75rem;
}

/* ==================== CONTACT CENTER DESK ==================== */
.desk-section.contact-theme {
  background: transparent;
}

.contact-icon-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.phone-bubble {
  background: rgba(59, 130, 246, 0.08);
  color: var(--secondary);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.whatsapp-bubble {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.mail-bubble {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.contact-icon-bubble i {
  width: 30px;
  height: 30px;
}

/* Footer Section */
footer {
  background: rgba(2, 6, 23, 0.5);
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2.5rem 0;
  backdrop-filter: blur(10px);
  transition: background-color 0.4s, border-color 0.4s;
}

/* ==================== Sticky Floating Circle Contact Bars ==================== */
.float-bar {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 99;
}

.float-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--secondary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.float-circle:hover {
  transform: translateY(-4px) scale(1.05);
}

.float-circle.whatsapp {
  background: #10B981;
}

/* ==================== RESPONSIVE GRID CONFIGS ==================== */
@media (max-width: 1024px) {
  nav ul {
    gap: 1.25rem;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .gateway-split {
    max-width: 900px;
    gap: 2rem;
  }
  .gateway-card {
    padding: 3rem 2rem;
  }
}

@media (max-width: 768px) {
  .header-floating-container {
    top: 0.75rem;
  }
  header {
    border-radius: var(--radius-md);
    margin: 0 1rem;
    padding: 0.5rem 1.25rem;
    max-height: 56px;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.3s;
    overflow: hidden;
  }
  header.mobile-nav-open {
    max-height: 320px;
    border-radius: var(--radius-lg);
  }
  header .container {
    flex-wrap: wrap;
  }
  .logo-wrapper {
    width: 120px;
    height: 38px;
  }
  .logo-wrapper img {
    height: 26px;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  nav {
    display: none;
    width: 100%;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-muted);
    padding-top: 0.75rem;
  }
  header.mobile-nav-open nav {
    display: block;
  }
  nav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.25rem 0.5rem;
  }
  nav a {
    font-size: 1rem;
    display: block;
    width: 100%;
    padding: 0.25rem 0;
  }
  .header-actions .btn span {
    display: none;
  }
  .header-actions .btn {
    padding: 0;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
  .gateway-hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  .gateway-intro h1 {
    font-size: 2.5rem;
  }
  .gateway-split {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  .desk-header h2 {
    font-size: 1.85rem;
    letter-spacing: -1px;
  }
  .desk-header p {
    font-size: 1rem;
  }
  .desk-header {
    margin-bottom: 2.5rem;
  }
  .back-container {
    padding-top: 7.5rem;
  }
  .desk-section {
    padding: 2.5rem 0 4rem 0;
  }
}
