/* ==========================================================================
   TORELEC - LANDING PAGE STYLESHEET
   Design: Cybernetic Engineering & High-Tech IoT Aesthetic
   ========================================================================== */

:root {
  /* Color Palette - Premium Light Engineering */
  --bg-dark: #f8fafc;
  --bg-darker: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-inset: #f1f5f9;
  
  --cyan: #0284c7;
  --cyan-hover: #0369a1;
  --cyan-glow: rgba(2, 132, 199, 0.2);
  --cyan-subtle: #f0f9ff;
  
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.2);
  --emerald-subtle: #ecfdf5;
  
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.2);
  --purple-subtle: #f5f3ff;

  --yellow: #d97706;
  --red: #e11d48;
  --yt-red: #cc0000;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --border-glass: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-glow: #cbd5e1;
  --border-focus: #0284c7;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow-cyan: 0 0 25px rgba(2, 132, 199, 0.15);
  --shadow-glow-emerald: 0 0 25px rgba(5, 150, 105, 0.15);

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
  --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Globals */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Elements */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(120px);
  opacity: 0.45;
  transition: transform 0.5s ease;
}

.glow-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.12) 0%, transparent 70%);
}

.glow-2 {
  width: 700px;
  height: 700px;
  top: 30%;
  right: -200px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
}

.glow-3 {
  width: 550px;
  height: 550px;
  bottom: 5%;
  left: 15%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
}

.circuit-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphism Generic Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.08);
}

/* Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--cyan); }
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, #2563eb 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.w-full { width: 100%; }
.mt-12 { margin-top: 3rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0284c7 100%);
  color: #040914;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.55);
  filter: brightness(1.1);
}

.btn-secondary {
  background: #ffffff; border: 1px solid var(--border-glow);
  color: var(--text-main);
  border-color: var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--cyan);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  color: #475569;
}

.btn-ghost:hover {
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.05);
}

.btn-yt-sub {
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.4);
  color: #ff4d4d;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.15);
}

.btn-yt-sub:hover {
  background: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  transform: translateY(-2px);
}

.icon-btn, .icon-inline, .icon-sm, .icon-yt {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* ==========================================================================
   ANNOUNCEMENT BAR & HEADER
   ========================================================================== */

.top-announcement {
  display: none !important;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge-pulse {
  background: var(--cyan);
  color: #060913;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

.announcement-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.announcement-link:hover {
  text-decoration: underline;
}

.announcement-close {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-chip {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.chip-svg {
  width: 26px;
  height: 26px;
}

.chip-core {
  animation: coreBlink 2.5s ease-in-out infinite;
}

@keyframes coreBlink {
  0%, 100% { opacity: 1; fill: var(--cyan); }
  50% { opacity: 0.3; fill: var(--emerald); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

/* Nav links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-link {
  text-decoration: none;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--cyan);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  transition: all var(--transition-fast);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #e2e8f0;
  border-bottom: 1px solid var(--border-glass);
  padding: 1.5rem;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  display: block;
}

.mobile-link:hover {
  color: var(--cyan);
}

.mobile-drawer-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 4.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.12rem;
  color: #475569;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-description strong {
  color: var(--text-main);
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-tech-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #475569;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pill-dot.blue { background: #38bdf8; }
.pill-dot.cyan { background: var(--cyan); }
.pill-dot.purple { background: var(--purple); }
.pill-dot.green { background: var(--emerald); }
.pill-dot.yellow { background: var(--yellow); }

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 38px;
  background: var(--border-glass);
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.hero-main-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: var(--shadow-xl), 0 0 35px rgba(0, 240, 255, 0.15);
  display: block;
}

.floating-badge {
  position: absolute;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
  box-shadow: var(--shadow-xl);
  animation: floatSlow 6s ease-in-out infinite alternate;
}

.badge-top-right {
  top: -15px;
  right: -15px;
}

.badge-bottom-left {
  bottom: -20px;
  left: -20px;
  animation-delay: -3s;
}

@keyframes floatSlow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-indicator.live {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.tech-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tech-icon-circle svg {
  width: 18px;
  height: 18px;
}

.float-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.float-desc {
  font-size: 0.72rem;
  color: #475569;
}

/* ==========================================================================
   SECTIONS GENERAL
   ========================================================================== */

.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: #475569;
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
}

/* ==========================================================================
   PILLARS SECTION
   ========================================================================== */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.pillar-card {
  padding: 2rem 1.75rem;
}

.pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pillar-icon svg {
  width: 26px;
  height: 26px;
}

.bg-cyan { background: #f0f9ff; border: 1px solid #bae6fd; color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.25); }
.bg-emerald { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--emerald); border: 1px solid rgba(0, 255, 157, 0.25); }
.bg-purple { background: #f5f3ff; border: 1px solid #ddd6fe; color: var(--purple); border: 1px solid rgba(124, 58, 237, 0.08); }
.bg-blue { background: #f0f9ff; border: 1px solid #bae6fd; color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.bg-yellow { background: #fffbeb; border: 1px solid #fde68a; color: var(--yellow); border: 1px solid rgba(250, 204, 21, 0.25); }
.bg-green { background: #f0fdf4; border: 1px solid #bbf7d0; color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.25); }

.pillar-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pillar-text {
  color: #475569;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.pillar-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pillar-list li {
  position: relative;
  padding-left: 1.2rem;
}

.pillar-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
}

/* ==========================================================================
   SIMULATOR TESTBED SECTION
   ========================================================================== */

.simulator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  padding: 2.25rem;
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.08);
}

.sim-controls {
  display: flex;
  flex-direction: column;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.sim-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.chip-status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 255, 157, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(0, 255, 157, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.sim-note {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 1.25rem;
}

.sim-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-sim {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  color: var(--text-main);
}

.btn-sim:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.btn-sim:active {
  transform: scale(0.97);
}

.btn-sim-danger:hover {
  background: #fff1f2; border: 1px solid #fecdd3;
  border-color: var(--red);
}

.sim-btn-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sim-btn-info strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.2;
}

.sim-btn-info small {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Virtual Board */
.virtual-board {
  background: #090e1a;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.board-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.08em;
}

.board-leds {
  display: flex;
  gap: 1.2rem;
}

.led-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.led-indicator label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.2s ease;
}

.led.red.active {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.led.blue.active {
  background: #00f0ff;
  box-shadow: 0 0 12px #00f0ff, 0 0 20px #00f0ff;
}

.led.green.active {
  background: #00ff9d;
  box-shadow: 0 0 10px #00ff9d;
}

/* Virtual OLED Display SSD1306 */
.virtual-oled {
  background: #00040a;
  border: 2px solid #1e293b;
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.15);
}

.oled-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #00f0ff;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.2);
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}

.oled-screen {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #00f0ff;
  line-height: 1.5;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.6);
  min-height: 80px;
}

/* Simulator Terminal */
.sim-terminal {
  background: #03060c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  background: #090e18;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #facc15; }
.dot.green { background: #22c55e; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #475569;
}

.terminal-clear {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.terminal-clear:hover {
  color: var(--text-main);
  border-color: var(--cyan);
}

.terminal-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
  flex-grow: 1;
  min-height: 320px;
  max-height: 380px;
  overflow-y: auto;
}

.term-line {
  margin-bottom: 0.3rem;
  word-break: break-word;
}

.term-cyan { color: var(--cyan); }
.term-green { color: var(--emerald); }
.term-yellow { color: var(--yellow); }
.term-red { color: var(--red); }
.timestamp { color: #64748b; }

.terminal-footer {
  background: #090e18;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-glass);
}

.term-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 700;
}

.term-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  width: 100%;
  outline: none;
}

.term-input::placeholder {
  color: #475569;
}

/* ==========================================================================
   PROJECTS SECTION & FILTERS
   ========================================================================== */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: #475569;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--cyan);
  color: #060913;
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.project-thumb-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #090e1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-thumb {
  transform: scale(1.05);
}

.project-badge-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-badge-icon svg {
  width: 36px;
  height: 36px;
}

.category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.category-badge.purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.category-badge.emerald { background: rgba(5, 150, 105, 0.08); color: #34d399; border: 1px solid rgba(0, 255, 157, 0.4); }
.category-badge.green { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.category-badge.yellow { background: rgba(250, 204, 21, 0.2); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4); }
.category-badge.cyan { background: rgba(0, 240, 255, 0.2); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.4); }

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 0.6rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.project-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #475569;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.project-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

/* ==========================================================================
   CALCULATOR SECTION
   ========================================================================== */

.calc-box {
  padding: 2.75rem;
  border-color: rgba(0, 255, 157, 0.25);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 255, 157, 0.08);
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.calc-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ecfdf5; border: 1px solid #a7f3d0;
  color: var(--emerald);
  border: 1px solid rgba(0, 255, 157, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-badge-icon svg {
  width: 28px;
  height: 28px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.input-range-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.form-input, .form-select {
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.25);
}

.form-select {
  width: 100%;
  cursor: pointer;
}

.form-select option {
  background: #090e18;
  color: #fff;
}

.input-unit {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.glass-inset {
  background: var(--bg-inset);
  border: 1px solid rgba(5, 150, 105, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.result-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.result-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.result-value {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--emerald);
  line-height: 1;
}

.result-unit {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.result-desc {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 1.25rem;
}

.result-tips {
  background: rgba(0, 255, 157, 0.08);
  border-left: 3px solid var(--emerald);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #d1fae5;
}

.tip-badge {
  font-weight: 800;
  color: var(--emerald);
}

/* ==========================================================================
   VIDEO HUB SECTION
   ========================================================================== */

/* Video Catalog Controls (Search & Filters) */
.video-catalog-controls {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.video-search-wrap {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
}

.icon-search {
  position: absolute;
  left: 1.1rem;
  width: 20px;
  height: 20px;
  color: var(--cyan);
  pointer-events: none;
}

.video-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0.85rem 6.5rem 0.85rem 3rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.video-search-input::placeholder {
  color: #64748b;
}

.video-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.video-count-badge {
  position: absolute;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.video-filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vfilter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vfilter-btn:hover {
  background: #f1f5f9;
  border-color: var(--cyan);
  color: var(--cyan);
}

.vfilter-btn.active {
  background: var(--cyan);
  color: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.video-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}

.video-title-link {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.video-title-link:hover {
  color: var(--cyan);
}

.video-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
  margin-top: auto;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.video-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-preview-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #090e18;
}

.video-badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  z-index: 2;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition-fast);
}

.play-icon {
  width: 52px;
  height: 52px;
  color: #ffffff;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
  transition: transform var(--transition-fast);
}

.play-overlay:hover .play-icon {
  transform: scale(1.15);
  color: var(--cyan);
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.video-card:hover .video-thumb-img {
  transform: scale(1.05);
}

.video-fake-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-gradient-ai {
  background: radial-gradient(circle at center, #3b0764 0%, #090e1a 100%);
}
.bg-gradient-whatsapp {
  background: radial-gradient(circle at center, #064e3b 0%, #090e1a 100%);
}
.bg-gradient-mqtt {
  background: radial-gradient(circle at center, #0c4a6e 0%, #090e1a 100%);
}

.thumb-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.35rem;
}

.thumb-chip { color: var(--cyan); }
.thumb-symbol { color: #fff; font-size: 1.2rem; }
.thumb-ai { color: var(--purple); }

.video-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-duration {
  font-size: 0.75rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.video-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.video-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.video-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESOURCES & PINOUTS SECTION
   ========================================================================== */

.resources-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
}

.resource-card {
  padding: 2.25rem;
}

.resource-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.res-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.res-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.res-subtitle {
  font-size: 0.82rem;
  color: #475569;
}

.pinout-table-wrapper {
  overflow-x: auto;
}

.pinout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.pinout-table th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-glass);
}

.pinout-table td {
  padding: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pinout-table code {
  font-family: var(--font-mono);
  color: var(--cyan);
}

.badge-safe {
  background: rgba(0, 255, 157, 0.15);
  color: var(--emerald);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-warn {
  background: rgba(250, 204, 21, 0.15);
  color: var(--yellow);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.libs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lib-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lib-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lib-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.lib-desc {
  display: block;
  font-size: 0.8rem;
  color: #475569;
}

.lib-install {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  color: var(--purple);
  white-space: nowrap;
  border: 1px solid rgba(124, 58, 237, 0.08);
}

/* ==========================================================================
   COMMUNITY & NEWSLETTER SECTION
   ========================================================================== */

.community-banner {
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, #ffffff 0%, rgba(13, 20, 36, 0.95) 100%);
  border-color: rgba(0, 240, 255, 0.2);
}

.community-badge {
  display: inline-block;
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(2, 132, 199, 0.12);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.community-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.community-desc {
  color: #475569;
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 2.25rem;
}

.newsletter-form {
  max-width: 540px;
  margin: 0 auto 2rem;
}

.newsletter-input-group {
  display: flex;
  gap: 0.65rem;
}

.newsletter-input {
  flex-grow: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  color: #0f172a;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.newsletter-input::placeholder {
  color: #64748b;
}

.newsletter-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.form-privacy {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.65rem;
}

.social-links-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.social-pill.yt {
  background: rgba(255, 0, 0, 0.12);
  color: #ff4d4d;
  border: 1px solid rgba(255, 0, 0, 0.3);
}
.social-pill.yt:hover {
  background: #ff0000;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.social-pill.gh {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}
.social-pill.gh:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan);
}

.social-pill.tg {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.social-pill.tg:hover {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border-glass);
  padding: 4.5rem 0 2.5rem;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-bio {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 360px;
}

.footer-yt-ref {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.link-glow {
  color: var(--cyan);
  text-decoration: none;
}
.link-glow:hover {
  text-decoration: underline;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-badges {
  display: flex;
  gap: 0.5rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border-glass);
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  background: #0a0f1d;
  border: 1px solid rgba(2, 132, 199, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  text-transform: uppercase;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--cyan);
}

.modal-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-sub {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.modal-pins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.pin-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.pin-chip strong {
  font-family: var(--font-mono);
  color: var(--cyan);
}

.modal-code-box {
  background: #03060c;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  overflow: hidden;
}

.code-box-header {
  background: #0a101d;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-copy-code {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--cyan);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-copy-code:hover {
  background: rgba(0, 240, 255, 0.1);
}

.code-pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #38bdf8;
  max-height: 320px;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: rgba(10, 16, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  color: var(--text-main);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 0.3s ease forwards;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual {
    max-width: 600px;
    margin: 0 auto;
  }

  .simulator-wrapper {
    grid-template-columns: 1fr;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-actions #btn-header-yt span {
    display: none;
  }

  .sim-buttons-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-input-group {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* ==========================================================================
   BRAND LOGO IMAGE & SUBPAGES DESIGN SYSTEM
   ========================================================================== */

.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.45));
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: rotate(-8deg) scale(1.08);
}

/* Page Hero for Subpages */
.subpage-hero {
  padding: 8rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
}

.subpage-hero-content {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.subpage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.12);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.subpage-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.subpage-lead {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* Legal & Institutional Layout */
.legal-section {
  padding: 4rem 0 6rem;
}

.legal-card {
  max-width: 880px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 3rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.legal-card h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.legal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--cyan);
  margin: 2.25rem 0 1rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding-bottom: 0.5rem;
}

.legal-card h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin: 1.5rem 0 0.5rem;
}

.legal-card p {
  color: #334155;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.legal-card ul, .legal-card ol {
  margin: 1rem 0 1.5rem 1.75rem;
  color: #334155;
  line-height: 1.75;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

.legal-card a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.legal-card a:hover {
  color: #0369a1;
}

.legal-lead {
  font-size: 1.12rem !important;
  color: #0f172a !important;
  border-left: 3px solid var(--cyan);
  padding-left: 1.25rem;
  margin: 1.5rem 0 2rem !important;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 1.5rem;
}

/* Contact Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info-card {
  background: #ffffff;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.contact-info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  color: var(--cyan);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
}

.contact-item-title {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.contact-item-val {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
}

.contact-item-val a {
  color: var(--cyan);
  text-decoration: none;
}

.contact-form-cyber {
  background: #ffffff;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
  background: #ffffff;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
}

.form-checkbox-label input {
  accent-color: var(--cyan);
  width: 16px;
  height: 16px;
}

/* Resources Directory */
.resources-grid-cat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto 3.5rem;
}

.resource-cat-card {
  background: #ffffff;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.resource-cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.resource-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.resource-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.25rem;
}

.resource-cat-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-main);
}

.resource-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-links-list li {
  margin-bottom: 0.75rem;
}

.resource-links-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.resource-links-list a:hover {
  background: #f0f9ff;
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateX(4px);
}

/* 404 styles */
.error-page-container {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-card {
  max-width: 600px;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.15);
}

.error-code {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .legal-card {
    padding: 1.75rem 1.25rem;
  }
}

/* Hero Tutorial Card Showcase */
.hero-tutorial-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
  transition: all var(--transition-normal);
}

.hero-tutorial-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 25px 35px -5px rgba(2, 132, 199, 0.15), 0 10px 15px -5px rgba(2, 132, 199, 0.08);
}

.hero-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.hero-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero-tutorial-card:hover .hero-card-thumb {
  transform: scale(1.04);
}

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-play-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(2, 132, 199, 0.5);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.hero-play-badge svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.hero-tutorial-card:hover .hero-play-badge {
  transform: scale(1.12);
  background: var(--cyan);
}

.hero-card-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.hero-card-body {
  padding: 1.5rem;
}

.hero-card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.hero-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: #f0f9ff;
  color: var(--cyan);
  border: 1px solid #bae6fd;
}

.hero-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.hero-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-telemetry-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #059669;
  font-weight: 600;
}

.hero-telemetry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 6px #059669;
}

/* ==========================================================================
   ADSENSE CLEAN & COMPLIANT AD CONTAINERS
   ========================================================================== */
.ad-slot-section {
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.ad-slot-container {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.ad-slot-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.ad-slot-content {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  color: #64748b;
  font-size: 0.85rem;
}

/* ==========================================================================
   BENTO RESOURCES CALLOUT BANNER
   ========================================================================== */
.bento-resources-section {
  padding: 3rem 0;
}

.bento-resources-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.bento-res-left h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.bento-res-left p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.bento-tools-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.bento-tool-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.bento-tool-item:hover {
  transform: translateX(4px);
  border-color: #059669;
}

.bento-tool-icon {
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0fdf4;
}

.bento-tool-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.bento-tool-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   AUTHOR SPOTLIGHT CARD (E-E-A-T & TRUST)
   ========================================================================== */
.author-spotlight-section {
  padding: 3rem 0;
}

.author-spotlight-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.author-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.author-avatar-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0284c7;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.2);
}

.author-verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #0284c7;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  font-size: 0.8rem;
}

.author-info h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.author-role {
  display: inline-block;
  font-size: 0.85rem;
  color: #0284c7;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.author-bio {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.author-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.author-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .bento-resources-card {
    grid-template-columns: 1fr;
    padding: 1.75rem;
  }
  
  .author-spotlight-card {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem;
  }
  
  .author-badges {
    justify-content: center;
  }
}

/* ==========================================================================
   MOBILE APP-STYLE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.07);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    transition: transform var(--transition-fast);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: #64748b;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    padding-top: 4px;
  }

  .bottom-nav-item:active {
    transform: scale(0.92);
  }

  .bottom-nav-item.active {
    color: var(--cyan, #0284c7);
    font-weight: 700;
  }

  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 24px;
    height: 3px;
    background: var(--cyan, #0284c7);
    border-radius: 9999px;
  }

  .bottom-nav-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.15s ease;
  }

  .bottom-nav-item:hover .bottom-nav-icon {
    transform: translateY(-1px);
  }

  .bottom-nav-item.yt-highlight {
    color: #dc2626;
  }

  .bottom-nav-item.yt-highlight.active::before {
    background: #dc2626;
  }

  .bottom-nav-label {
    font-size: 0.68rem;
    letter-spacing: -0.01em;
    line-height: 1;
  }
}

/* ==========================================================================
   TUTORIAL PAGE COMPONENT STYLES (RICH, READABLE & BEAUTIFUL)
   ========================================================================== */
.video-page-main {
  padding: 3rem 0 6rem;
}

.video-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.video-breadcrumb a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
}

.video-breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-current {
  color: #64748b;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

.player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
}

.player-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-header-info {
  margin-bottom: 2rem;
}

.video-cat-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.video-full-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.video-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.stats-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: #475569;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.tutorial-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.tutorial-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.tutorial-card-sub {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.desc-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
  white-space: pre-line;
}

/* Materials Checklist */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  list-style: none;
}

.material-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 500;
}

.mat-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 1px solid #a7f3d0;
}

/* Pinout Table */
.pinout-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.pinout-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.pinout-table th {
  background: #f8fafc;
  padding: 0.85rem 1.25rem;
  color: #475569;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
}

.pinout-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.pinout-table td code {
  font-family: var(--font-mono);
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--cyan);
  font-weight: 600;
}

/* Circuit Images */
.circuit-images-wrapper {
  margin-top: 1.5rem;
}

.circuit-image-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  overflow: hidden;
}

.circuit-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.circuit-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
}

/* Code Blocks */
.codes-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tutorial-code-block {
  background: #0a0f1d;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.code-box-header {
  background: #0f172a;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
}

.code-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.code-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.code-filename {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #94a3b8;
}

.code-title-heading {
  padding: 1rem 1.25rem 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}

.code-pre {
  margin: 0;
  padding: 1rem 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #f8fafc;
  background: transparent;
}

/* Steps List */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cyan);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.35);
}

.step-content p {
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0.2rem 0 0;
}

/* Downloads Group */
.downloads-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Sidebar in Tutorial Page */
.channel-card-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
}

.channel-avatar-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.channel-sidebar-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.55;
  margin: 1rem 0 1.25rem;
}

.sidebar-videos-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #f1f5f9;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-video-card {
  display: flex;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  transition: transform var(--transition-fast);
}

.sidebar-video-card:hover {
  transform: translateX(4px);
}

.sidebar-video-card:hover .sidebar-video-title {
  color: var(--cyan);
}

.sidebar-thumb-wrap {
  position: relative;
  width: 110px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
}

.sidebar-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.sidebar-video-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.sidebar-channel {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: block;
}

@media (max-width: 992px) {
  .video-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   INSTAGRAM STORIES BUBBLES BAR & ANDROID REELS (HEADER TOP APP)
   ========================================================================== */

/* 1. STORIES BUBBLES CAROUSEL */
.stories-bar-section {
  padding: 1rem 0 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 10;
}

.stories-carousel {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  padding: 0.25rem 0.5rem 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.stories-carousel::-webkit-scrollbar {
  display: none;
}

.story-bubble-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-bubble-item:active {
  transform: scale(0.92);
}

.story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2.5px;
  position: relative;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: storyGlow 3s ease-in-out infinite alternate;
}

.story-ring.ring-ai {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.story-ring.ring-whatsapp {
  background: linear-gradient(135deg, #22c55e, #10b981, #06b6d4);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.story-ring.ring-telegram {
  background: linear-gradient(135deg, #0284c7, #38bdf8, #818cf8);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.story-ring.ring-ble {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.story-ring.ring-radar {
  background: linear-gradient(135deg, #f59e0b, #ef4444, #f97316);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

@keyframes storyGlow {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.02); filter: brightness(1.15); }
}

.story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  background: #0f172a;
}

.story-live-badge {
  position: absolute;
  bottom: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  border: 1.5px solid #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.story-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* 2. REELS TOP APP SECTION (ESTILO ANDROID / INSTAGRAM NATIVO) */
.reels-section.reels-top-app {
  padding: 1.75rem 0 2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  position: relative;
  overflow: hidden;
}

/* Ambient Floating Bubble Backgrounds */
.floating-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.45;
  animation: floatBubble 8s ease-in-out infinite alternate;
}

.fb-1 {
  width: 250px;
  height: 250px;
  background: rgba(56, 189, 248, 0.25);
  top: -40px;
  left: 10%;
}

.fb-2 {
  width: 200px;
  height: 200px;
  background: rgba(236, 72, 153, 0.2);
  bottom: -30px;
  right: 8%;
  animation-duration: 11s;
  animation-delay: -3s;
}

@keyframes floatBubble {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

.reels-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

.reels-title-box h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.reels-title-box p {
  color: #64748b;
  font-size: 0.8rem;
  margin: 0.15rem 0 0;
}

.reels-gradient-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  box-shadow: 0 2px 8px rgba(220, 39, 67, 0.25);
}

.reels-nav-controls {
  display: flex;
  gap: 0.4rem;
}

.btn-reel-nav {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn-reel-nav:hover {
  background: var(--cyan, #0284c7);
  color: #ffffff;
  border-color: var(--cyan, #0284c7);
  transform: scale(1.08);
}

.reels-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.35rem 0.25rem 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 2;
}

.reels-carousel::-webkit-scrollbar {
  display: none;
}

/* Tarjeta Android App Style */
.reel-card {
  flex: 0 0 190px;
  height: 330px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  background: #020617;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.reel-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 28px -6px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--cyan, #0284c7);
}

.reel-card:active {
  transform: scale(0.96);
}

.reel-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.reel-card:hover .reel-thumb-img {
  transform: scale(1.06);
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, transparent 40%, rgba(2, 6, 23, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem;
  z-index: 2;
}

.reel-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reel-tag {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  letter-spacing: 0.03em;
}

.reel-views-pill {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.reel-center-play {
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0.9;
  transition: all 0.2s ease;
  transform: scale(0.95);
}

.reel-card:hover .reel-center-play {
  opacity: 1;
  background: var(--cyan, #0284c7);
  color: #020617;
  border-color: var(--cyan, #0284c7);
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}

.reel-center-play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.reel-bottom-meta {
  color: #ffffff;
}

.reel-author-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.reel-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #e1306c;
  object-fit: cover;
}

.reel-author-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.reel-author-name .verified-icon {
  width: 12px;
  height: 12px;
  color: #38bdf8;
}

.reel-caption {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: #f8fafc;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.reel-audio-bar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  color: #94a3b8;
}

.reel-audio-bar svg {
  width: 11px;
  height: 11px;
  color: #e2e8f0;
}

@media (max-width: 640px) {
  .stories-bar-section {
    padding: 0.65rem 0 0.35rem;
  }
  .story-ring {
    width: 58px;
    height: 58px;
  }
  .story-label {
    font-size: 0.68rem;
    max-width: 60px;
  }
  .reels-section.reels-top-app {
    padding: 1.25rem 0 1.5rem;
  }
  .reel-card {
    flex: 0 0 165px;
    height: 295px;
    border-radius: 16px;
  }
  .reels-nav-controls {
    display: none; /* En celular el scroll táctil es instantáneo */
  }
}


/* ==========================================================================
   MOBILE-FIRST ENHANCEMENTS & OVERFLOW PREVENTION (CELLPHONES / TABLETS)
   ========================================================================== */

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .container {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
    width: 100% !important;
  }

  /* Header compacto en móvil */
  .site-header {
    padding: 0.65rem 0 !important;
  }

  .brand-logo-img {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-name {
    font-size: 1.15rem !important;
  }

  .brand-sub {
    font-size: 0.55rem !important;
  }

  /* Hero Mobile */
  .hero-section {
    padding: 2.25rem 0 2rem !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .hero-badge {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
    margin-bottom: 1rem !important;
  }

  .hero-title {
    font-size: 1.95rem !important;
    line-height: 1.18 !important;
    margin-bottom: 1rem !important;
  }

  .hero-description {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }

  .hero-cta-group {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .hero-cta-group .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.95rem !important;
  }

  .hero-tech-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 0.5rem !important;
    gap: 0.5rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .hero-tech-pills::-webkit-scrollbar {
    display: none !important;
  }

  .tech-pill {
    flex-shrink: 0 !important;
    font-size: 0.72rem !important;
    padding: 0.25rem 0.65rem !important;
  }

  .hero-metrics {
    display: flex !important;
    justify-content: space-between !important;
    padding: 0.85rem 1rem !important;
    gap: 0.5rem !important;
  }

  .metric-card {
    text-align: center !important;
  }

  .metric-num {
    font-size: 1.35rem !important;
  }

  .metric-label {
    font-size: 0.65rem !important;
  }

  .metric-divider {
    height: 30px !important;
  }

  /* Pilares en móvil */
  .pillars-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .pillar-card {
    padding: 1.5rem !important;
  }

  /* Catálogo de Videos en móvil */
  .video-catalog-controls {
    margin-bottom: 1.5rem !important;
  }

  .video-search-wrap {
    margin-bottom: 0.75rem !important;
  }

  .video-search-input {
    font-size: 0.85rem !important;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem !important;
  }

  .video-filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 0.65rem !important;
    gap: 0.4rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .video-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .filter-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.75rem !important;
    padding: 0.45rem 0.75rem !important;
  }

  .videos-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .video-card {
    border-radius: 16px !important;
  }

  .video-info {
    padding: 1.25rem !important;
  }

  .video-title {
    font-size: 1.05rem !important;
  }

  .video-desc {
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
  }

  /* Páginas individuales de tutoriales en móvil */
  .video-page-main {
    padding: 1.25rem 0 5rem !important;
  }

  .video-header-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }

  .video-header-card .video-title {
    font-size: 1.3rem !important;
    line-height: 1.25 !important;
  }

  .video-player-container {
    border-radius: 12px !important;
    margin-bottom: 1.25rem !important;
  }

  .tutorial-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
    margin-bottom: 1.25rem !important;
  }

  .tutorial-card-title {
    font-size: 1.15rem !important;
  }

  .materials-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .material-item {
    font-size: 0.85rem !important;
    padding: 0.65rem 0.85rem !important;
  }

  .pinout-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    border-radius: 8px !important;
    margin: 0.75rem 0 !important;
  }

  .pinout-table {
    min-width: 460px !important;
    font-size: 0.78rem !important;
  }

  .pinout-table th, .pinout-table td {
    padding: 0.6rem 0.75rem !important;
  }

  .code-box-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    padding: 0.75rem !important;
  }

  .code-header-left {
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .btn-copy-code {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.5rem !important;
    font-size: 0.78rem !important;
  }

  .code-pre {
    padding: 1rem 0.75rem !important;
    font-size: 0.75rem !important;
    max-height: 340px !important;
  }

  .steps-list {
    padding-left: 1.25rem !important;
    font-size: 0.88rem !important;
  }

  /* Footer en móvil con espacio para bottom bar */
  .site-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem !important;
  }

  .brand-text {
    display: none !important; /* Más espacio en móviles ultra compactos */
  }

  .header-container {
    padding: 0 0.75rem !important;
  }
}


/* ==========================================================================
   YOUTUBE DIRECT LAUNCHER CARD (YOUTUBE MONETIZATION & AD VIEWS)
   ========================================================================== */
.youtube-launcher-card-wrapper {
  margin-bottom: 2rem;
  width: 100%;
}

.youtube-direct-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  background: #090d16;
  border: 1px solid rgba(255, 0, 0, 0.25);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 20px rgba(255, 0, 0, 0.1);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.youtube-direct-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 0, 0, 0.6);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35), 0 0 35px rgba(255, 0, 0, 0.25);
}

.yt-card-poster {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-poster-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.youtube-direct-card:hover .yt-poster-img {
  transform: scale(1.03);
  filter: brightness(0.92);
}

.yt-poster-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(10, 15, 29, 0.92) 100%);
  pointer-events: none;
}

.yt-center-play {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.yt-play-icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(239, 68, 68, 0) 70%);
  animation: ytPulseGlow 2.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes ytPulseGlow {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.35); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
}

.yt-play-icon-btn {
  position: relative;
  z-index: 6;
  width: 80px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 20px rgba(220, 38, 38, 0.5));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.youtube-direct-card:hover .yt-play-icon-btn {
  transform: scale(1.12);
}

.yt-icon-svg {
  width: 100%;
  height: 100%;
}

.yt-play-cta-text {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.youtube-direct-card:hover .yt-play-cta-text {
  background: #ff0000;
  border-color: #ff4d4d;
  color: #ffffff;
}

.yt-card-top-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.yt-badge-live {
  background: rgba(220, 38, 38, 0.9);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.yt-badge-hd {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.yt-card-bottom-bar {
  position: absolute;
  bottom: 0.85rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.yt-card-notice {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.yt-card-dur {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.yt-direct-action-bar {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-yt-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md, 12px);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.35);
  border: 1px solid rgba(255, 100, 100, 0.3);
  transition: all 0.25s ease;
}

.btn-yt-direct:hover {
  background: linear-gradient(135deg, #ff2222 0%, #e60000 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 0, 0, 0.45);
}

.btn-yt-direct .icon-yt {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.yt-direct-hint {
  font-size: 0.83rem;
  line-height: 1.45;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  margin: 0;
}

.yt-direct-hint strong {
  color: #f1f5f9;
}

@media (max-width: 640px) {
  .yt-play-icon-btn {
    width: 62px;
    height: 44px;
  }
  .yt-play-cta-text {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
  }
  .yt-card-notice {
    display: none; /* Hide long notice text on small mobile screens */
  }
  .btn-yt-direct {
    font-size: 0.88rem;
    padding: 0.8rem 1rem;
  }
}
