/*
Theme Name: PlatformOps School
Theme URI: https://platformops.wp
Author: PlatformOps School Team
Author URI: https://platformops.wp
Description: State-of-the-art WordPress Full Site Editing (FSE) theme styled with a Linux Terminal, Kubernetes Cloud Native, DevOps CI/CD pipeline, and PlatformOps dynamic telemetry aesthetics.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: platformops-school
Tags: full-site-editing, block-theme, dark-theme, developer, news, blog, two-columns, custom-colors, custom-menu, flexbox-grid
*/

:root {
  --color-obsidian-base: #0B0F17;
  --color-obsidian-deep: #090D16;
  --color-k8s-blue: #2563EB;
  --color-k8s-blue-hover: #3B82F6;
  --color-terminal-green: #10B981;
  --color-terminal-green-bright: #22C55E;
  --color-pipeline-purple: #8B5CF6;
  --color-pipeline-purple-dark: #7C3AED;
  --color-telemetry-cyan: #06B6D4;
  --color-telemetry-cyan-glow: #38BDF8;
  --color-cli-amber: #F59E0B;
  --color-surface-dark: #131C2E;
  --color-surface-border: #1E293B;
  --color-surface-light: #F8FAFC;
  --color-text-heading: #F8FAFC;
  --color-text-body: #94A3B8;
  --color-text-muted: #64748B;
  
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  
  --container-max-width: 1280px;
  --header-height: 72px;
}

/* Global Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-obsidian-base);
  color: var(--color-text-body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

a {
  color: var(--color-telemetry-cyan);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--color-telemetry-cyan-glow);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  max-width: 100%;
}

pre code {
  white-space: pre-wrap;
  word-break: break-all;
}

img, svg, iframe, video, object {
  max-width: 100%;
  height: auto;
}

/* Container Utility */
.ops-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

/* Terminal Window & Console Card Controls (macOS / Linux 3-dot) */
.ops-terminal-window,
.ops-terminal-card {
  background-color: var(--color-surface-dark);
  border: 1px solid var(--color-surface-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  max-width: 100%;
}

.ops-terminal-window:hover,
.ops-terminal-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25), 0 10px 30px -5px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.ops-terminal-header {
  background-color: #0d1524;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-terminal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.ops-dot-red { background-color: #EF4444; }
.ops-dot-yellow { background-color: #F59E0B; }
.ops-dot-green { background-color: #10B981; }

.ops-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-wrap: break-word;
  word-break: break-all;
  max-width: 100%;
}

.ops-terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
}

/* Animations: Blinking Prompt & Pulsing Pod Status */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cli-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background-color: var(--color-terminal-green-bright);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.pod-status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 10px;
  height: 10px;
}

.pod-status-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--color-terminal-green);
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
}

.pod-status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-terminal-green-bright);
}

/* Header & Navigation System (Desktop & Mobile Specific) */
.ops-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-surface-border);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
}

.ops-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.ops-header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ops-header-parent-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8B5CF6;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 2px;
}

.ops-header-parent-link:hover {
  color: var(--color-telemetry-cyan);
}

.ops-nav-drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 1;
}

.ops-primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.ops-nav-link {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ops-nav-link:hover {
  color: var(--color-text-heading);
}

.ops-nav-link-highlight {
  color: var(--color-terminal-green-bright);
  font-weight: 700;
}

.ops-search-wrapper {
  position: relative;
  min-width: 240px;
}

.ops-search-input {
  width: 100%;
  background: #131C2E;
  border: 1px solid #1E293B;
  border-radius: 6px;
  padding: 8px 12px 8px 30px;
  color: #F8FAFC;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ops-search-input:focus {
  border-color: var(--color-telemetry-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.ops-search-prompt {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-terminal-green-bright);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  pointer-events: none;
}

.ops-mobile-toggle {
  display: none;
  background: #131C2E;
  border: 1px solid var(--color-surface-border);
  color: var(--color-telemetry-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ops-mobile-toggle:hover {
  border-color: var(--color-telemetry-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Mobile & Tablet Specific Navbar Layout (< 991px) */
@media (max-width: 991px) {
  .ops-site-header {
    min-height: 64px;
    padding: 12px 0;
  }

  .ops-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .ops-header-brand-row {
    width: 100%;
  }

  .ops-mobile-toggle {
    display: inline-flex;
    align-items: center;
  }

  .ops-nav-drawer {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    background: #0B0F17;
    border: 1px solid var(--color-surface-border);
    border-radius: 8px;
    padding: 16px;
    margin-top: 4px;
  }

  .ops-nav-drawer.is-active {
    display: flex;
    animation: slideDown 0.25s ease-out;
  }

  .ops-primary-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .ops-nav-link {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: #131C2E;
    border-radius: 6px;
    border: 1px solid var(--color-surface-border);
  }

  .ops-nav-link:hover {
    border-color: var(--color-telemetry-cyan);
    color: var(--color-telemetry-cyan);
  }

  .ops-search-wrapper {
    width: 100%;
    min-width: 0;
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ops-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-k8s-blue), var(--color-telemetry-cyan), var(--color-terminal-green));
  width: 0%;
  z-index: 1001;
  transition: width 0.1s linear;
}

/* Category Badges */
.ops-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--color-k8s-blue-hover);
  line-height: 1.4;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.ops-badge-cyan {
  background-color: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--color-telemetry-cyan);
}

.ops-badge-green {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-terminal-green-bright);
}

.ops-badge-purple {
  background-color: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--color-pipeline-purple);
}

/* Buttons System */
.ops-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.ops-btn-primary {
  background-color: var(--color-k8s-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.ops-btn-primary:hover {
  background-color: var(--color-k8s-blue-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.ops-btn-outline {
  background-color: transparent;
  border-color: var(--color-telemetry-cyan);
  color: var(--color-terminal-green-bright);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.ops-btn-outline:hover {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Q&A Showcase Specific Card Styling */
.ops-qa-card {
  background-color: var(--color-surface-dark);
  border: 1px solid var(--color-surface-border);
  border-left: 5px solid var(--color-terminal-green);
  border-radius: 8px;
  padding: 24px 28px 24px 32px;
  margin-bottom: 1.5rem;
  transition: all 0.25s ease;
  max-width: 100%;
}

.ops-qa-card:hover {
  border-color: var(--color-surface-border);
  border-left-color: var(--color-terminal-green-bright);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: translateX(4px);
}

/* Newsletter Input Form Layout */
.ops-newsletter-form {
  display: flex;
  gap: 12px;
  width: 100%;
}

.ops-newsletter-input-wrapper {
  flex: 1;
  min-width: 0;
}

.ops-newsletter-input {
  width: 100%;
  background-color: #0B0F17;
  border: 1px solid var(--color-surface-border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--color-text-heading);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ops-newsletter-input:focus {
  border-color: var(--color-telemetry-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

/* Canvas Background */
#ops-node-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Responsive Grid Utilities & Uniform Height Alignment */
.ops-grid-4, .ops-grid-3, .ops-grid-2, .wp-block-post-template {
  align-items: stretch !important;
}

.ops-terminal-card, .ops-terminal-window {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ops-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.ops-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ops-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .ops-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ops-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ops-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .ops-grid-4, .ops-grid-3, .ops-grid-2 {
    grid-template-columns: 1fr;
  }

  .ops-newsletter-form {
    flex-direction: column;
  }

  .ops-qa-card {
    padding: 16px 16px 16px 20px !important;
  }

  .ops-terminal-body {
    padding: 1rem !important;
  }

  .ops-btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.875rem;
  }

  .ops-post-article-inner {
    padding: 20px 16px !important;
  }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(1.75rem, 6vw, 2.4rem) !important; }
  h2 { font-size: clamp(1.4rem, 5vw, 1.85rem) !important; }
  h3 { font-size: clamp(1.15rem, 4vw, 1.4rem) !important; }
}
