/* ==========================================================================
   Robotics Explained - AI & Robotics Channel Stylesheet
   Background: #333333 | Font: Caveat | Font Color: #fc9e4f
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - User Specified #333333 & #fc9e4f */
  --bg-dark: #333333;
  --bg-surface: #2b2b2b;
  --bg-card: rgba(42, 42, 42, 0.9);
  --bg-card-hover: rgba(52, 52, 52, 0.98);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(252, 158, 79, 0.5);

  /* Channel Brand Accents */
  --accent-orange: #fc9e4f;
  --accent-orange-glow: rgba(252, 158, 79, 0.35);
  --accent-coral: #f09048;
  --accent-blue: #38bdf8;
  --accent-gold: #ffd166;
  --accent-green: #4ade80;
  --accent-rose: #e05575;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;

  /* Typography */
  --font-handwriting: 'Caveat', cursive, sans-serif;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Transitions */
  --max-width: 1240px;
  --nav-height: 80px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 25px rgba(252, 158, 79, 0.25);
}

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

html, body {
  background-color: #333333 !important;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* All Headings use Caveat font & #fc9e4f color */
h1, h2, h3, h4, h5, h6, .caveat-heading {
  font-family: var(--font-handwriting) !important;
  color: #fc9e4f !important;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 4.5rem;
  font-weight: 700;
}

h2 {
  font-size: 3.4rem;
  font-weight: 700;
}

h3 {
  font-size: 2.4rem;
  font-weight: 700;
}

h4 {
  font-size: 1.8rem;
  font-weight: 700;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ffb473;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient {
  color: #fc9e4f !important;
  font-family: var(--font-handwriting) !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 1.15rem;
  font-family: var(--font-handwriting) !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.badge-orange {
  background: rgba(252, 158, 79, 0.18);
  color: #fc9e4f !important;
  border: 1px solid rgba(252, 158, 79, 0.4);
}

.badge-blue {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  font-family: var(--font-handwriting) !important;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: #fc9e4f !important;
  color: #222222 !important;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(252, 158, 79, 0.4);
}

.btn-primary:hover {
  background: #ffb473 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(252, 158, 79, 0.6);
  color: #222222 !important;
}

.btn-secondary {
  background: var(--bg-card);
  color: #fc9e4f !important;
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-youtube {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.5);
  color: #ffffff !important;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 1.15rem;
  border-radius: var(--radius-sm);
}

/* Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Header & Navbar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  background: #333333 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.scrolled {
  background: #2b2b2b !important;
  border-bottom-color: var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-handwriting) !important;
  font-size: 2.3rem !important;
  font-weight: 700;
  color: #fc9e4f !important;
  text-decoration: none;
}

.brand-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
}

.brand-logo span {
  color: #ffffff !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-link {
  font-family: var(--font-handwriting) !important;
  font-size: 1.5rem !important;
  font-weight: 700;
  color: #d1d5db;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #fc9e4f !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #fc9e4f;
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 4.5rem;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-color: #333333 !important;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(252, 158, 79, 0.08) 0%, #333333 85%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-handwriting) !important;
  font-size: 4.8rem !important;
  color: #fc9e4f !important;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-text h1 span {
  color: #ffffff !important;
}

.hero-text p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-simulation-box {
  background: #2b2b2b !important;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sim-title {
  font-family: var(--font-handwriting) !important;
  font-size: 1.45rem !important;
  font-weight: 700;
  color: #fc9e4f !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sim-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent-green);
}

.sim-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
}

#sim-canvas {
  width: 100%;
  height: 280px;
  background: #222222 !important;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Stats Section */
.stats-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: #2d2d2d !important;
  position: relative;
  z-index: 4;
}

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

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-handwriting) !important;
  font-size: 3.5rem !important;
  font-weight: 700;
  color: #fc9e4f !important;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Section Header */
.section {
  padding: 5rem 0;
  position: relative;
  background-color: #333333 !important;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-family: var(--font-handwriting) !important;
  font-size: 3.6rem !important;
  font-weight: 700;
  color: #fc9e4f !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.3rem;
  font-family: var(--font-handwriting) !important;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(252, 158, 79, 0.2);
  border-color: var(--accent-orange);
  color: #fc9e4f !important;
}

/* Playlists & Video Grid */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.playlist-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(252, 158, 79, 0.25);
  background: rgba(45, 45, 45, 0.95);
}

.playlist-badge {
  font-family: var(--font-handwriting);
  font-size: 1.1rem;
  color: #fc9e4f;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

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

.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: #111;
  cursor: pointer;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: #fc9e4f !important;
  color: #222222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 25px rgba(252, 158, 79, 0.6);
  transition: all var(--transition-fast);
}

.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background: #ffb473 !important;
}

.video-info h3 {
  font-family: var(--font-handwriting) !important;
  font-size: 2.1rem !important;
  font-weight: 700;
  color: #fc9e4f !important;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.video-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

/* Course Grid */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(252, 158, 79, 0.15);
  color: #fc9e4f !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(252, 158, 79, 0.3);
}

.course-content h3 {
  font-family: var(--font-handwriting) !important;
  font-size: 2.2rem !important;
  color: #fc9e4f !important;
  margin-bottom: 0.6rem;
}

.course-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.course-downloads {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}

.course-downloads h4 {
  font-size: 1.3rem !important;
  font-family: var(--font-handwriting) !important;
  color: #fc9e4f !important;
  margin-bottom: 0.6rem;
}

.pdf-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pdf-link:hover {
  background: rgba(252, 158, 79, 0.18);
  color: #fc9e4f !important;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 900px;
  background: #2b2b2b !important;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.video-container {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.footer {
  background: #282828 !important;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  color: var(--text-secondary);
}

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

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-column h4 {
  font-family: var(--font-handwriting) !important;
  font-size: 1.8rem !important;
  color: #fc9e4f !important;
  margin-bottom: 1rem;
}

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

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

.footer-links a:hover {
  color: #fc9e4f !important;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: #fc9e4f !important;
  color: #222222 !important;
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Page Banner */
.page-banner {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(252, 158, 79, 0.12) 0%, #333333 80%) !important;
  border-bottom: 1px solid var(--border-color);
}

.page-banner h1 {
  font-family: var(--font-handwriting) !important;
  font-size: 4.2rem !important;
  color: #fc9e4f !important;
  margin-bottom: 0.75rem;
}

.page-banner h1 span {
  color: #ffffff !important;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px rgba(252, 158, 79, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .hero-text h1 {
    font-size: 3.2rem !important;
  }

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