/* ============================================
   CloudRoute.net - Modern Dark Theme
   Design: "Command Center" for DevOps Engineers
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ===== Dark Theme Palette ===== */
  --bg-dark: #0a0e17;
  /* Deep navy black - main bg */
  --bg-surface: #111827;
  /* Card/surface background */
  --bg-elevated: #1f2937;
  /* Elevated elements */
  --bg-overlay: rgba(10, 14, 23, 0.85);

  /* Accent colors - Cyberpunk-inspired */
  --primary: #00d9ff;
  /* Cyan - main accent */
  --primary-dark: #00b8d9;
  --primary-glow: rgba(0, 217, 255, 0.15);
  --secondary: #a855f7;
  /* Purple - secondary accent */
  --secondary-glow: rgba(168, 85, 247, 0.15);
  --success: #10b981;
  /* Emerald green */
  --warning: #f59e0b;
  /* Amber */
  --danger: #ef4444;
  /* Red */

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: var(--primary);

  /* Borders and effects */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 217, 255, 0.5);
  --glow-cyan: 0 0 30px rgba(0, 217, 255, 0.25), 0 0 60px rgba(0, 217, 255, 0.1);
  --glow-purple: 0 0 30px rgba(168, 85, 247, 0.25), 0 0 60px rgba(168, 85, 247, 0.1);
  --glow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;

  /* Spacing & Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 70px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 217, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.05) 0%, transparent 40%),
    var(--bg-dark);
  background-attachment: fixed;
}

/* Subtle grid pattern overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--primary);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Terminal-style headers */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-header::before {
  content: '>_';
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9em;
}

/* ===== Layout ===== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.bg-gray {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ===== Header - Glassmorphism ===== */
.site-header {
  height: var(--header-height);
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.site-header:hover {
  border-bottom-color: rgba(0, 217, 255, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.logo:hover {
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary);
}

.logo img {
  filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.4));
}

.logo-text {
  letter-spacing: -0.5px;
  font-family: var(--font-mono);
}

.main-nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal);
  box-shadow: 0 0 10px var(--primary);
}

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

.main-nav a:hover::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  left: 0;
  transition: transform var(--transition-fast);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #00b8d9 100%);
  color: var(--bg-dark);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
  color: var(--bg-dark);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(0, 217, 255, 0.1);
  color: var(--primary);
}

.small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Header CTA Button - Enhanced Visibility */
.main-nav .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.4), 0 0 40px rgba(168, 85, 247, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.main-nav .btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.6), 0 0 60px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}

.main-nav .btn-primary::after {
  display: none;
}

/* ===== Hero Section ===== */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background:
    radial-gradient(ellipse 50% 80% at 50% 20%, rgba(0, 217, 255, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 70% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero .lead {
  font-size: 1.35rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Cards - Glowing Dark ===== */
.card,
.service-preview,
.category-card {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before,
.service-preview::before,
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover,
.service-preview:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--glow-cyan);
}

.card:hover::before,
.service-preview:hover::before,
.category-card:hover::before {
  opacity: 1;
}

.card h3,
.service-preview h3,
.category-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card p,
.service-preview p,
.category-card p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Feature items */
.feature-item {
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.feature-item:hover {
  background: var(--bg-surface);
  border-color: var(--border-hover);
}

.feature-item h4 {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.footer-logo:hover {
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary);
}

.footer-col p {
  color: var(--text-muted);
}

.footer-col h3 {
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Main content wrapper - spacing from footer */
#main-content {
  flex: 1;
  padding-bottom: 3rem;
}

#main-content>.section:last-child {
  padding-bottom: 4rem;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg-dark);
  padding: 1rem;
  z-index: 9999;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* ===== Page Header ===== */
.page-header {
  background: var(--bg-surface);
  padding: 6rem 0 5rem;
  margin-top: 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(0, 217, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  z-index: 1;
}

.page-header p {
  position: relative;
  z-index: 1;
}

/* ===== Article Content ===== */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1rem 6rem;
  font-size: 1.125rem;
}

.article-content h2 {
  margin-top: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.article-content h3 {
  margin-top: 2rem;
  color: var(--primary);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.article-content ul li::marker {
  color: var(--primary);
}

/* Alerts */
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  margin: 2rem 0;
  background: var(--bg-elevated);
}

.alert-info {
  border-color: var(--primary);
  background: rgba(0, 217, 255, 0.05);
}

.alert-info p {
  color: var(--text-secondary);
  margin: 0;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
}

tr:hover td {
  background: rgba(0, 217, 255, 0.02);
}

/* Code Blocks - Terminal Style */
code {
  background: var(--bg-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--primary);
  border: 1px solid var(--border-color);
}

pre {
  background: var(--bg-dark);
  color: var(--text-primary);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  position: relative;
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius) var(--radius) 0 0;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
}

/* Checklists */
input[type="checkbox"][disabled] {
  accent-color: var(--primary);
  width: 1.2em;
  height: 1.2em;
  vertical-align: text-bottom;
  margin-right: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    box-shadow: var(--glow-subtle);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 0;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav .btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-text {
  text-shadow: 0 0 20px var(--primary);
}

.mono {
  font-family: var(--font-mono);
}

/* Animations */
@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.4);
  }
}

.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}