/* =========================
   1. General/Shared Styles
   ========================= */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.1) 20%, #7F7F7F 99%);
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

.section-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.section-content.collapsed {
  max-height: 0 !important;
  overflow: hidden;
}

.section-header {
  text-align: center;
  font-size: 1.6em;
  color: #fff;
  font-weight: bold;
  margin: 38px 0 10px 0;
  letter-spacing: 1px;
}

.section-divider {
  width: 200px;
  height: 3px;
  background: #fff;
  margin: 0 auto 24px auto;
  border-radius: 2px;
  opacity: 0.85;
}

/* =========================
   2. Navigation Styles
   ========================= */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #0b4f6c;
  display: flex;
  align-items: center;
  padding: 15px 30px;
  z-index: 999;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  justify-content: space-between;
}

.nav-logo {
  color: white;
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
  align-items: center;
  order: 2;
}

.nav-controls {
  display: flex;
  align-items: center;
  flex: 1;

  margin: 0 20px;
}



.nav-links li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 3px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: 0.3s;
}

/* Search container */
.search-container {
  position: relative;
  /* width: 100%; */
  max-width: 400px;
}

.search-input {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  border: none;
  background:
    white
    url('https://img.icons8.com/ios-filled/50/000000/search--v1.png')
    no-repeat 10px center;
  background-size: 20px;
  padding: 0 40px 0 40px;
  cursor: text;
  color: #333;
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  box-sizing: border-box;
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  width: 28px;
  border: none;
  background: #eee;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  font-size: 22px;
  line-height: 28px;
  text-align: center;
  z-index: 2;
  padding: 0;
}

/* Search results */
.search-results {
  display: none;
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 998;
}

.result-section {
  margin-bottom: 30px;
}

.result-section h3 {
  color: #0b4f6c;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
}

.result-card {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  background-color: white;
}

.result-card img.thumbnail {
  width: 145px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 15px;
  margin-left: 25px;
  transition: transform 0.3s ease, z-index 0.3s ease;
  cursor: zoom-in;
  z-index: 1;
  flex-shrink: 0;
}

.result-card img.thumbnail:hover {
  transform: scale(2.5) translateX(20px);
  z-index: 10;
  position: relative;
}

.result-card video.hover-video {
  display: none;
  width: 145px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 15px;
  margin-left: 25px;
  z-index: 1;
  cursor: zoom-in;
  transition: transform 0.3s ease, z-index 0.3s ease;
}

.result-card.has-video:hover img.thumbnail {
  display: none;
}

.result-card.has-video:hover video.hover-video {
  display: block;
}

.result-card .info {
  flex-grow: 1;
}

.result-card .info h4 {
  margin: 0 0 5px 0;
  color: #0b4f6c;
}

.result-card .info p {
  margin: 0;
  font-size: 14px;
  color: #555;
}

/* =========================
   3. Index.html Unique Styles
   ========================= */

/* Global styles */
*, *:before, *:after {
  box-sizing: border-box;
}

body {
  padding-top: 70px;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f7fa;
  scroll-behavior: smooth;
}

/* Sections */
section {
  padding: 80px 20px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  margin: auto;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  text-align: center;
  color: white;
}

section p {
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  color: white;
}

/* Card grid */
.card-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.card {
  background-color: #0b4f6c;
  color: white;
  border-radius: 8px;
  padding: 30px 20px;
  width: 250px;
   height: 260px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

/* Features section */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 50px 20px 30px 20px;
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    url('https://raw.githubusercontent.com/StevenMKay/CareerSolutionsForToday/b06177eea3d97491c5c4a8b277f386bc769259bb/photos/background3.png');
  filter: grayscale(70%) brightness(90%) contrast(85%);
  color: white;
  text-align: center;
}

.features > * {
  position: relative;
  z-index: 1;
}

.features .feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(1px);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  padding: 20px;
}

.features .feature h2 {
  font-size: 1.25rem;
  font-weight: 500;
  min-height: 2.4rem;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.features .feature img {
  width: auto;
  height: 100px;
  margin-bottom: .8rem;
  opacity: 0.9;
}

/* About section */
.about-section { 
  padding: 40px 20px; 
  background-color: #f3f7fa; 
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
}

.about-container .profile-image {
  display: block;
  margin: 0 auto;
}

.about-text-block {
  text-align: center;
}

.profile-image { 
  width: 180px; 
  height: 180px; 
  border-radius: 50%; 
  object-fit: cover; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
}

.my-bio {
  color: #000 !important;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: justify;
}

.about-divider {
  border-top: 2px solid black;
  margin: 25px auto 20px auto;
  width: 60%;
}

.social-icons { 
  display: flex; 
  gap: 15px; 
  justify-content: center; 
}

.social-icons img { 
  height: 50px; 
}

/* Navigation underline effects */
.nav-links li a.learn-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.learn-underline::after,
.nav-links li a.learn-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.learn-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.learn-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.learn-underline.active::before,
.nav-links li a.learn-underline.active::after {
  transform: scaleX(1);
}

/* Search container underline */
.search-container.underline::before,
.search-container.underline::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
  pointer-events: none;
}

.search-container.underline::before {
  top: -10px;
  transform-origin: left;
}

.search-container.underline::after {
  bottom: -10px;
  transform-origin: right;
}

.search-container.underline::before,
.search-container.underline::after {
  transform: scaleX(1);
}

.nav-links li a.about-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.about-underline::after,
.nav-links li a.about-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.about-underline.active::before,
.nav-links li a.about-underline.active::after {
  transform: scaleX(1);
}

.nav-links li a.about-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.about-underline::after {
  bottom: -5px;
  transform-origin: right;
}

/* Home page active nav link styling */
.nav-links li a.home-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.home-underline::after,
.nav-links li a.home-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.home-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.home-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.home-underline.active::before,
.nav-links li a.home-underline.active::after {
  transform: scaleX(1);
}

/* Videos page active nav link styling */
.nav-links li a.videos-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.videos-underline::after,
.nav-links li a.videos-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.videos-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.videos-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.videos-underline.active::before,
.nav-links li a.videos-underline.active::after {
  transform: scaleX(1);
}

/* =========================
   3. Tools Dropdown Styles
   ========================= */

/* TOOLS DROPDOWN - DESKTOP AND MOBILE STYLES */
nav.navbar .nav-links li.dropdown {
  position: relative;
}

nav.navbar .nav-links li.dropdown span.dropdown-toggle {
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  color: white !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  padding: 8px 0 !important;
  /* text-align: center; */
}

nav.navbar .nav-links li.dropdown span.dropdown-toggle:hover {
  color: #00ffa6 !important;
}

nav.navbar .nav-links li.dropdown ul.dropdown-menu {
  position: absolute !important;
  top: calc(100% + 5px) !important;
  left: 0 !important;
  background: #0b4f6c !important;
  min-width: 240px !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-15px) !important;
  transition: all 0.2s ease !important;
  list-style: none !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

/* Add a small gap tolerance for better hover stability */
nav.navbar .nav-links li.dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
  z-index: 9998;
}

nav.navbar .nav-links li.dropdown:hover ul.dropdown-menu,
nav.navbar .nav-links li.dropdown ul.dropdown-menu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Keep dropdown open when hovering over the gap */
nav.navbar .nav-links li.dropdown:hover::before {
  pointer-events: auto;
}

nav.navbar .nav-links li.dropdown ul.dropdown-menu li {
  margin: 0 !important;
}

nav.navbar .nav-links li.dropdown ul.dropdown-menu li a {
  display: block !important;
  padding: 14px 20px !important;
  color: white !important;
  text-decoration: none !important;
  font-size: 15px !important;
  transition: all 0.2s ease !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
}

nav.navbar .nav-links li.dropdown ul.dropdown-menu li a:hover {
  background: rgba(0,255,166,0.15) !important;
  color: #00ffa6 !important;
}

/* Mobile dropdown styles */
@media screen and (max-width: 768px) {
  /* Hide dropdown completely by default on mobile */
  nav.navbar .nav-links li.dropdown ul.dropdown-menu {
    display: none !important;
    position: static !important;
    box-shadow: none !important;
    background: rgba(11, 79, 108, 0.9) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
    pointer-events: auto !important;
    transition: none !important; /* Remove transitions on mobile to prevent double bounce */
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Show dropdown only when active class is present */
  nav.navbar .nav-links li.dropdown.active ul.dropdown-menu {
    display: block !important;
    padding: 5px 0 !important;
  }
  
  /* Disable hover gap helper on mobile */
  nav.navbar .nav-links li.dropdown::before {
    display: none !important;
  }
  
  nav.navbar .nav-links li.dropdown span.dropdown-toggle {
    cursor: pointer !important;
    padding: 12px 0 !important;
    color: white !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
  }
  
  nav.navbar .nav-links li.dropdown ul.dropdown-menu li a {
    padding: 12px 20px !important;
    border-bottom: none !important;
  }
  
  /* Remove border from dropdown container li */
  nav.navbar .nav-links li.dropdown ul.dropdown-menu li {
    border-bottom: none !important;
  }
}

/* Templates page active nav link styling */
.nav-links li a.templates-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.templates-underline::after,
.nav-links li a.templates-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.templates-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.templates-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.templates-underline.active::before,
.nav-links li a.templates-underline.active::after {
  transform: scaleX(1);
}

/* Practice page active nav link styling */
.nav-links li a.practice-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.practice-underline::after,
.nav-links li a.practice-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.practice-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.practice-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.practice-underline.active::before,
.nav-links li a.practice-underline.active::after {
  transform: scaleX(1);
}

/* Code Playground active nav link styling */
.nav-links li a.codeplayground-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

.nav-links li a.codeplayground-underline::after,
.nav-links li a.codeplayground-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #00ffa6, #00ffa6);
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
}

.nav-links li a.codeplayground-underline::before {
  top: -2px;
  transform-origin: left;
}

.nav-links li a.codeplayground-underline::after {
  bottom: -5px;
  transform-origin: right;
}

.nav-links li a.codeplayground-underline.active::before,
.nav-links li a.codeplayground-underline.active::after {
  transform: scaleX(1);
}
/* Recent videos container */
.recent-videos-container {
  margin: 30px auto 0 auto;
  background: rgba(255,255,255,0.18);
  border-radius: 18px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.13);
  padding: 18px 18px 10px 18px;
  max-width: 1000px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
}

.recent-videos-container h3 {
  margin: 0 0 12px 0;
  color: #fff;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.recent-videos-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #fff #eee;
}

.recent-video-card {
  min-width: 200px;
  max-width: 220px;
  background: rgba(255,255,255,0.10);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s;
  color: #fff;
}

.recent-video-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.recent-video-card h4 {
  font-size: 15px;
  margin: 0 0 6px 0;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.recent-video-card a {
  color: #fff;
  text-decoration: underline;
  font-size: 12px;
  font-weight: bold;
  margin-top: auto;
  margin-bottom: 0;
}

/* Program divider */
.program-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px 0;
  padding-top: 10px;
  border-top: 1px solid #ccc;
  font-size: 18px;
  font-weight: bold;
  color: #0b4f6c;
}

.program-divider-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* CSS Interactive Card Styles */
.css-interactive-card {

    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.13);
    padding: 28px 28px 18px 28px;
    margin-bottom: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    transition: box-shadow 0.2s;
}

/* HTML Interactive Card Styles */
.html-interactive-card {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.13);
    padding: 28px 28px 18px 28px;
    margin-bottom: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    transition: box-shadow 0.2s;
    overflow: hidden;
    margin-left: 0 !important; /* Force no left margin */
    margin-right: 0 !important; /* Force no right margin */
    position: relative; /* Ensure proper positioning */
}

.html-demo-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Prevent overflow */
    box-sizing: border-box;
}

.html-demo-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    width: 100%;
    box-sizing: border-box;
}

.html-demo-header .thumbnail {
    width: 120px;
    height: 70px;
    border-radius: 8px;
    margin-right: 18px;
    flex-shrink: 0;
    object-fit: cover;
}

.html-demo-header .info {
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

.html-demo-header .info h4 {
    color: white;
    margin: 0 0 8px 0;
    font-size: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.html-demo-header .info p {
    color: white;
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.html-preview-section {
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
}

.html-preview-section h5 {
    color: white;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.html-live-preview {
    background: rgba(255, 255, 255, 0.95);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 100px;
    max-height: 1200px;
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* FORCE container constraints */
    contain: layout style;
}

.html-live-preview * {
    color: inherit;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.html-live-preview h1, .html-live-preview h2, .html-live-preview h3,
.html-live-preview h4, .html-live-preview h5, .html-live-preview h6 {
    color: #2c3e50;
    margin: 10px 0;
    word-wrap: break-word;
}

.html-live-preview p {
    margin: 10px 0;
    line-height: 1.6;
    word-wrap: break-word;
}

.html-live-preview a {
    color: #3498db;
    text-decoration: underline;
    word-wrap: break-word;
}

.html-live-preview img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
}

/* FORCE table constraints - this is the key fix */
.html-live-preview table {
    border-collapse: collapse;
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0;
    table-layout: fixed !important;
    word-wrap: break-word !important;
    font-size: 11px !important; /* Smaller font to fit better */
    overflow: hidden !important; /* Prevent any overflow */
}

.html-live-preview table th,
.html-live-preview table td {
    border: 1px solid #ddd;
    padding: 4px !important; /* Reduced padding */
    text-align: left;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 0 !important; /* Force equal distribution */
    hyphens: auto;
    overflow: hidden !important; /* Prevent cell overflow */
    text-overflow: ellipsis; /* Add ... if text too long */
}

.html-live-preview table th {
    background-color: #f2f2f2;
    font-weight: bold;
    font-size: 10px !important; /* Even smaller for headers */
}

.html-live-preview div {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Canvas and SVG specific fixes */
.html-live-preview canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.html-live-preview svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Video and iframe fixes */
.html-live-preview video,
.html-live-preview audio,
.html-live-preview iframe {
    max-width: 100%;
    width: 100%;
    height: auto;
}

.html-code-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.html-code-section {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.html-code-editor {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 11px; /* Smaller font for better fit */
    background: rgba(0, 0, 0, 0.3);
    color: white;
    resize: vertical;
    box-sizing: border-box;
    overflow: auto;
    word-wrap: break-word;
}

.html-code-editor:focus {
    outline: none;
    border-color: #0b4f6c;
}
.css-demo-container {
  width: 100%;
}

.css-demo-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.css-demo-header .thumbnail {
  width: 120px;
  height: 70px;
  border-radius: 8px;
    margin-right: 18px;
  flex-shrink: 0;
}

.css-demo-header .info h4 {
  color: white;
  margin: 0 0 8px 0;
  font-size: 20px;
}

.css-demo-header .info p {
    color: white;
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.css-preview-section {
  margin-bottom: 25px;
}

.css-preview-section h5 {
  color: white;
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
}

.css-live-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 100px;
    display: flex
;
    align-items: center;
    justify-content: center;
}

.css-code-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.copy-btn {
  background: #0b4f6c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.copy-btn:hover {
  background: #094461;
}

.code-editors {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.code-editor-section h6 {
  color: white;
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.code-editor {
    width: 100%;
    min-height: 120px;
    max-height: 200px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    resize: vertical;
    box-sizing: border-box;
}

.code-editor:focus {
  outline: none;
  border-color: #0b4f6c;

}

/* =========================
   4. Learn, Videos, Templates Shared Styles
   ========================= */
.container {
  display: flex;
  max-width: 1500px;
  padding: 30px 20px 60px 20px;
  gap: 36px;
}

.sidebar {
  /* width: 300px; */
  min-width: 200px;
  background: rgba(255,255,255,0.13);
  border-radius: 16px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.10);
  padding: 22px 18px 22px 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  height: fit-content;
  position: sticky;
  top: 90px;
  align-self: flex-start;
  max-height: 80vh;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 20px;
}

.sidebar::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey; 
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(11, 79, 108, 0.8);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 79, 108, 0.8);
}

.sidebar h2 {
  font-size: 20px;
  margin: 0 0 18px 0;
  color: white;
  letter-spacing: 1px;
  display: none;
}


.sidebar-program {
  cursor: pointer;
  font-weight: bold;
  /* margin: 10px 0 0 0; */
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  gap: 8px;
  color: white;
  font-size: 15px;
  transition: all 0.3s ease;
}

.sidebar-program:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.sidebar-program.active {
  background: #0b4f6c !important;
  border-color: #0b4f6c !important;
  box-shadow: 0 4px 12px rgba(11, 79, 108, 0.3);
  transform: translateY(-2px);
}

.sidebar-program img {
  height: 22px;
  width: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.sidebar-topics {
  margin: 0 0 0 18px;
  padding: 0;
  list-style: none;
  display: none;
}

.sidebar-topics.expanded {
  display: block;
}

.sidebar-topic {
  cursor: pointer;
  padding: 2px 0 2px 0;
  color: white;
  font-size: 14px;
  margin-left: 4px;
  margin-bottom: 2px;
  transition: background 0.15s;
}

.sidebar-topic a {
  display: block;
  padding: 4px 10px;
  color: white;
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.sidebar-topic a:hover,
.sidebar-topic a:focus {
  background: #e3f2fd;
  color: #1976d2;
  text-decoration: underline;
  outline: none;
}

.sidebar-topic.active a {
  background: #0b4f6c;
  color: #fff;
  font-weight: 600;
}

.topic-header {
  color: #fff;
}

.sidebar-topic.active-topic {
  background: rgba(11,79,108,0.6);
  border-radius: 6px;
}

.sidebar-topic.active, .sidebar-topic:hover {
  color: #0b4f6c;
}

.main-content {
  flex: 1;
  min-width: 0;
  position: relative;
}

/* SCROLL-BASED SEARCH BAR FADE FUNCTIONALITY */
.sticky-filter {
  position: sticky;
  top: 80px;
  z-index: 10;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: flex-start;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Add scroll fade styles */
.sticky-filter.scroll-hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}



.sticky-filter.fade-up {
  opacity: 0.3;
  transform: translateY(-10px);
}

.search-filter {
  width: 100%;
  max-width: 400px;
  font-size: 17px;
  padding: 13px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  color: white;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  outline: none;
  transition: border 0.2s;
}

.search-filter:focus {
  border: 1.5px solid white;
  background: rgba(255,255,255,0.35);
}

.search-filter::placeholder {
  color: white;
  opacity: 1;
}

.highlight-match {
  background: rgba(11,79,108,0.7);
  border-radius: 4px;
  padding: 0 2px;
}

/* FROSTED CARD STYLES */
.frosted-card {
  background: rgba(255,255,255,0.18);
  border-radius: 18px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.13);
  padding: 28px 28px 18px 28px;
  margin-bottom: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
  transition: box-shadow 0.2s;
  display: flex;
  word-break: break-word;
  overflow-wrap: break-word;
}

.frosted-card img {
  width: 120px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 18px;
  flex-shrink: 0;
  background: #eee;
  transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
}

.frosted-card .info {
  flex: 1;
}

.frosted-card .info h4 {
  margin: 0 0 10px 0;
  color: white;
  font-size: 20px;
}

.frosted-card .info p {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: white;
  word-break: break-word;
  overflow-wrap: break-word;
}

.frosted-card .info a {
  color: white;
  text-decoration: underline;
  font-weight: bold;
  font-size: 15px;
}

/* Zoom and shift image on hover for frosted-card images */
.frosted-card img:hover,
.frosted-card img:focus {
  transform: scale(2.5) translateX(40px);
  box-shadow: 0 4px 24px rgba(11,79,108,0.18);
  z-index: 2;
  position: relative;
}

#learnPlaceholder {
  color: white;
  font-size: 20px;
  text-align: center;
  margin-top: 80px;
}

/* COLLAPSIBLE CONTENT SECTIONS */
.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  user-select: none;
}
.section-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  user-select: none;
}

.collapse-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
  color: #fff;
  font-weight: bold;
  margin-right: 5px;
}

.section-header.collapsed .collapse-icon {
  transform: rotate(0deg);
}

.section-header:not(.collapsed) .collapse-icon {
  transform: rotate(0deg);
}

/* Remove the old ::before styling to avoid conflicts */
.collapsible-header::before {
  display: none;
}

.collapsible-header.collapsed::before {
  display: none;
}

/* PRACTICE PAGE STYLES */
.difficulty-filter {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.difficulty-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.difficulty-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.difficulty-option:hover {
  background-color: rgba(255,255,255,0.1);
}

.difficulty-option input[type="radio"] {
  accent-color: #0077be;
}

.practice-problem-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.problem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.problem-header h3 {
  color: white;
  margin: 0;
  font-size: 1.4em;
}

.difficulty-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: bold;
}

.difficulty-easy {
  background-color: #4CAF50;
  color: white;
}

.difficulty-medium {
  background-color: #FF9800;
  color: white;
}

.difficulty-hard {
  background-color: #f44336;
  color: white;
}

.problem-description {
  color: white;
  margin-bottom: 20px;
  line-height: 1.6;
}

.problem-description h4 {
  color: #0077be;
  margin: 15px 0 10px 0;
}

.example-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  border-left: 4px solid #0077be;
  overflow-wrap: break-word;
}

.example {
  margin-bottom: 10px;
}

.example:last-child {
  margin-bottom: 0;
}

.example code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.coding-section {
  margin-top: 25px;
}

.coding-section h4 {
  color: #0077be;
  margin-bottom: 15px;
}

.code-editor {
  width: 100%;
  min-height: 200px;
  background: #2d3748;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 15px;
  font-family: 'Courier New', Monaco, monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.code-editor:focus {
  outline: none;
  border-color: #0077be;
  box-shadow: 0 0 0 2px rgba(0, 119, 190, 0.3);
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin: 15px 0;
}

.submit-btn {
  background: linear-gradient(45deg, #0077be, #005a8b);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
}

.submit-btn:hover {
  background: linear-gradient(45deg, #005a8b, #004070);
  transform: translateY(-2px);
}

.hint-btn {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.hint-btn:hover {
  background: #0077be;
  color: white;
}

.result-display {
  margin-top: 15px;
  min-height: 20px;
}

.result-correct {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #4CAF50;
  font-weight: bold;
}

.result-incorrect {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #f44336;
}

.result-error {
  background: rgba(255, 152, 0, 0.2);
  color: #FF9800;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #FF9800;
}

.solution-display {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.solution-display h4 {
  color: #0077be;
  margin-top: 0;
}

.solution-code {
  background: #1a202c;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Courier New', Monaco, monospace;
  font-size: 13px;
  line-height: 1.4;
  margin: 10px 0;
}

.solution-explanation {
  color: #cbd5e0;
  font-style: italic;
  margin-bottom: 0;
}

/* Mobile responsiveness for practice page */
@media (max-width: 700px) {
  .practice-problem-card {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .problem-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .submit-btn, .hint-btn {
    width: 100%;
  }
  
  .code-editor {
    font-size: 13px;
    min-height: 150px;
  }
}

/* Practice page language buttons */
.practice-language-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.practice-language-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #0077be;
  transform: translateY(-1px);
}

.practice-language-btn.active {
  background: linear-gradient(45deg, #0077be, #005a8b);
  border-color: #0077be;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 119, 190, 0.3);
}

.practice-language-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Difficulty buttons matching language buttons style */
.difficulty-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.difficulty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-align: center;
}

.difficulty-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #0077be;
  transform: translateY(-1px);
}

.difficulty-btn.active {
  background: linear-gradient(45deg, #0077be, #005a8b);
  border-color: #0077be;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 119, 190, 0.3);
}

/* Topic buttons matching language and difficulty buttons style */
.topic-filter {
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.topic-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.topic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  text-align: center;
}

.topic-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #0077be;
  transform: translateY(-1px);
}

.topic-btn.active {
  background: linear-gradient(45deg, #0077be, #005a8b);
  border-color: #0077be;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 119, 190, 0.3);
}

.collapsible-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapsible-content.collapsed {
  max-height: 0;
}

/* Community section */
#community {
  background: #f5faff;
  border-radius: 16px;
  box-shadow: 0 2px 18px rgba(11,79,108,0.10);
  padding: 40px 20px;
  margin: 40px auto;
  max-width: 900px;
}

#community h2, #community p {
  color: #0b4f6c;
  text-align: center;
}

#questionsList {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 15px;
  transition: max-height 0.3s;
}

.show-more-btn {
  display: block;
  margin: 10px auto 0 auto;
  background: #0b4f6c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 15px;
}

#community .card-grid {
  gap: 30px;
}

#community .card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(11,79,108,0.07);
  padding: 24px 18px;
}

#community .card form input,
#community .card form textarea {
  border: 1px solid #b3d1e7;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  width: 100%;
  font-size: 16px;
}

#community .card form button {
  background: #0b4f6c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

#community .filter-box {
  margin: 0 0 15px 0;
  width: 100%;
  max-width: 350px;
  display: block;
  padding: 8px 12px;
  border: 1px solid #b3d1e7;
  border-radius: 6px;
  font-size: 16px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 30px auto;
}

.contact-form input, .contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.contact-form button {
  background-color: #0b4f6c;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
}

/* =========================
   5. Mobile Responsiveness
   ========================= */

@media (max-width: 768px) {
    .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0b4f6c;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    justify-content: flex-start;
    display: flex;
    height: 70px;
    flex-wrap: wrap;
    align-items: center;
    z-index: 999;
    box-sizing: border-box;
  }

  .nav-logo {
    font-size: 18px;
    order: 2;
    flex: 1;
    text-align: center;
    margin: 0;
  }


  .hamburger {
    order: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    margin-right: 15px;
    gap: 3px;
  }


  .hamburger span {
    height: 3px;
    width: 25px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
  }



  .nav-logo {
    order: 2;
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 20px;
    color: white;
    font-weight: bold;
  }

  .nav-controls {
    order: 4;
    width: 100%;
    margin: 10px 0 0 0;
  }

   .nav-links {
    order: 3;
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    display: none;
    flex-direction: column;
    background-color: #0b4f6c;
    z-index: 999;
    list-style: none;
    margin-top: 32px;
    gap: 0px;
  }


  .nav-links.active,
  .nav-links.open {
    display: flex;
  }



   .nav-links li {
    font-size: 18px;
    margin: 0;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    text-align: center;
  }

  .nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    display: block;
    width: 100%;
    padding: 8px 0;

   
  }


  /* Features grid mobile responsiveness */
  .features {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 15px;
  }

  .container {
    flex-direction: column;
    gap: 0;
    max-width: 100vw;
    /* margin-top: 80px; */
  }

  .sidebar {
    width: 450px;
    max-width: 88vw;
    max-height: 300px;
    margin-bottom: 18px;
    border-radius: 0 0 16px 16px;
    position: static;
    top: unset;
    box-shadow: none;
    padding: 14px 6vw 14px 6vw;
    font-size: 16px;
  }

  .main-content {
    padding: 0 2vw;
  }

  .sticky-filter {
    top: 0;
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 10px 0 10px 0;
  }

  .search-filter {
    font-size: 16px;
    padding: 10px 12px;
    max-width: 98vw;
  }

.search-filter {
  transition: border 0.2s, opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.search-filter.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}



  .frosted-card {
    padding: 18px 10px 14px 10px;
    margin-bottom: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .frosted-card img {
    width: 100%;
    height: 100%;
    margin: 0 0 10px 0;
  }

  .frosted-card img:hover {
    transform: none; /* Disable hover zoom on mobile */
  }

  /* Mobile responsive for CSS cards */
  .css-demo-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .css-demo-header .thumbnail {
    align-self: center;
     width: 100%;


        height: 182px;
        margin: 0 0 10px 0;

  }
  
  /* Mobile responsive for HTML cards */
  .html-demo-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .html-demo-header .thumbnail {
    align-self: center;
    width: 100%;
    height: 182px;
    margin: 0 0 10px 0;
    object-fit: cover;
  }
  
  .html-code-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .html-code-editor {
    font-size: 12px;
    min-height: 100px;
  }
  
  /* Mobile table responsiveness */
  .html-live-preview {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .html-live-preview table {
    min-width: 300px; /* Minimum table width */
    font-size: 12px; /* Smaller font on mobile */
  }
  
  .html-live-preview table th,
  .html-live-preview table td {
    padding: 6px 4px; /* Reduced padding on mobile */
    min-width: 60px;
  }
  
  .html-interactive-card {
    overflow-x: visible;
  }
  
  /* Mobile responsive for Tools cards */
  .tools-demo-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .tools-demo-header .thumbnail {
    align-self: center;
    width: 100%;
    height: 182px;
    margin: 0 0 10px 0;
    object-fit: cover;
  }
  
  .tools-interactive-card {
    margin-bottom: 20px;
    padding: 20px 15px;
  }
  
  .tools-demo-header .info h4 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .tools-demo-header .info p {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .expand-tool-btn, .tools-redirect-btn {
    width: 100%;
    padding: 12px 20px !important;
    font-size: 16px !important;
    margin-top: 15px !important;
    text-align: center;
  }
  
  /* Mobile simulation iframe sizing */
  .simulation-iframe {
    height: 600px !important; /* Shorter height on mobile */
  }
  
  .simulation-container {
    padding: 15px;
    margin: 15px 0;
  }
  
  .tool-header h3 {
    font-size: 20px;
  }
  
  .tool-header p {
    font-size: 14px;
  }
  
  .code-editors {
    flex-direction: column;
  }

  .programs-row,
  .topics-row {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0 8px 0;
    background: none;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 18px rgba(0,0,0,0.13);
    margin-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .programs-row::-webkit-scrollbar,
  .topics-row::-webkit-scrollbar {
    display: none;
  }

  .topics-row {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    background: none;
    box-shadow: none;
    border-radius: 0 0 16px 16px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .practice-language-btn {
    flex: 1 1 100%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  }

  .practice-language-btn.active,
  .practice-language-btn:focus {
    background: rgba(25, 118, 210, 0.92);
    color: #fff;
  }
  
  .sidebar-topic {
    display: block;
    width: 100%;
    background: rgba(255,255,255,0.18);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin: 0 0 8px 0;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  }

  .sidebar-topic.active,
  .sidebar-topic:focus {
    background: #1976d2;
    color: #fff;
  }
    

}

