/* ===================================================
   CLASS 11 UNIFIED BATCH SYSTEM - BUG-FREE CSS
   =================================================== */

/* Universal Box-Sizing Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================
   BREADCRUMB NAVIGATION
   ============================================= */
.breadcrumb {
  padding: 1rem 2rem;
  background: #F5F5F5;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #0A3D91;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #083168;
}

/* FILTER SECTION - HORIZONTAL LAYOUT */
.filter-section {
  background: #fff;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.filter-main-title {
  text-align: center;
  color: #1a1a1a;
  font-size: 26px;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  padding: 0 15px;
}

.filter-controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  margin: 0;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Flex gap fallback for Safari < 14.1 */
.filter-buttons > * {
  margin: 4px;
}
.filter-buttons { margin: -4px; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

.filter-btn:hover {
  border-color: #0A3D91;
  background: #e8f2ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(10, 61, 145, 0.15);
}

.filter-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.filter-btn.active {
  background: #0A3D91;
  color: #fff;
  border-color: #0A3D91;
  box-shadow: 0 2px 6px rgba(10, 61, 145, 0.25);
}

.filter-btn.active:hover {
  background: #083168;
  border-color: #083168;
  transform: translateY(-2px);
}

.filter-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.filter-btn:hover .filter-icon {
  transform: scale(1.1);
}

/* Stream Filter - Left Side */
.stream-filter .filter-btn { min-width: 95px; }

/* Type Filter - Right Side */
.type-filter .filter-btn { min-width: 85px; }

/* Active Selection Display */
.active-selection {
  text-align: center;
  margin-top: 15px;
  padding: 10px 20px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  margin: 15px auto;
  max-width: calc(100% - 30px);
}

.selection-text {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.selection-text strong {
  color: #0A3D91;
  font-weight: 700;
}

/* =============================================
   CONTENT CONTAINER
   ============================================= */
#batch-content {
  padding-top: 20px;
}

/* Batch Content Sections - Fixed Animation */
.batch-content {
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =============================================
   COURSE HERO SECTION
   ============================================= */
.course-hero {
  background: linear-gradient(135deg, #0A3D91 0%, #0052CC 100%);
  color: #fff;
  padding: 50px 20px;
  margin-bottom: 50px;
  box-sizing: border-box;
}

.course-hero .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  box-sizing: border-box;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: #0AF083;
  color: #0A3D91;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease;
}

.badge:hover { transform: scale(1.05); }

.course-hero h1,
.course-hero h2 {
  color: #fff;
  font-size: 32px;
  margin: 15px 0;
  font-weight: 700;
  line-height: 1.2;
  word-wrap: break-word;
}

.tagline {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 25px;
  line-height: 1.5;
  word-wrap: break-word;
}

.course-highlights {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0;
}

.course-highlights span {
  background: rgba(255,255,255,0.15);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.3s ease;
}

.course-highlights span:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn-primary, .btn-secondary {
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: none;
  text-decoration: none;
  display: inline-block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: #0AF083;
  color: #0A3D91;
  box-shadow: 0 4px 12px rgba(10,246,131,0.3);
}

.btn-primary:hover {
  background: #12C899;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(10,246,131,0.4);
}

.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: #0A3D91;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.btn-secondary:active { transform: translateY(-1px); }

.hero-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: block;
}

/* =============================================
   SUBJECTS GRID
   ============================================= */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  margin: 40px 0;
  padding: 0 20px;
}

.subject-card {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid #f0f0f0;
  animation: slideUp 0.6s ease-out both;
  width: 100%;
}

.subject-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-color: #0A3D91;
}

.subject-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  transition: transform 0.3s ease;
}

.subject-card:hover .subject-icon { transform: scale(1.15) rotate(5deg); }

.subject-card h3 {
  color: #0A3D91;
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 700;
  transition: color 0.3s ease;
}

.subject-card:hover h3 { color: #083168; }

.subject-card ul { list-style: none; padding: 0; margin: 0; }

.subject-card li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  transition: transform 0.3s ease, color 0.3s ease;
  transform: translateX(0);
}

.subject-card li:hover {
  transform: translateX(10px);
  color: #0A3D91;
}

.subject-card li:last-child { border-bottom: none; }

/* =============================================
   SCHEDULE SECTION
   ============================================= */
.schedule-section {
  margin: 50px 0;
  background: #fff;
  padding: 40px 20px;
  border-radius: 10px;
}

.schedule-section h2 {
  text-align: center;
  color: #0A3D91;
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 700;
}

.schedule-location {
  text-align: center;
  font-size: 15px;
  color: #666;
  margin-bottom: 30px;
  font-weight: 600;
}

.schedule-table {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  -webkit-overflow-scrolling: touch;
}

.schedule-table table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: #fff;
}

.schedule-table th {
  background: linear-gradient(135deg, #0A3D91, #0052CC);
  color: #fff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.schedule-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  font-size: 14px;
  transition: background 0.3s ease;
}

.schedule-table tr:hover { background: #f8f9fa; }

.schedule-table tr:last-child td { border-bottom: none; }

/* Custom Scrollbar */
.schedule-table::-webkit-scrollbar { height: 10px; }
.schedule-table::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 5px; }
.schedule-table::-webkit-scrollbar-thumb {
  background: #0A3D91;
  border-radius: 5px;
  transition: background 0.3s ease;
}
.schedule-table::-webkit-scrollbar-thumb:hover { background: #083168; }

/* =============================================
   PRICING SECTION & CARDS
   ============================================= */
.pricing-section {
  padding: 60px 20px;
  background: #f8f9fa;
}

.pricing-section .container {
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-section h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
  color: #0A3D91;
  font-weight: 700;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 25px;
  margin: 50px auto;
  padding: 0 20px;
  max-width: 1000px;
}

.pricing-card {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 2px solid transparent;
  animation: slideUp 0.6s ease-out both;
  width: 100%;
}

.pricing-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.pricing-card.featured {
  border-color: #0AF083;
  box-shadow: 0 6px 20px rgba(10,246,131,0.2);
  transform: scale(1.03);
}

.pricing-card.featured:hover { transform: translateY(-8px) scale(1.05); }

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #0AF083;
  color: #0A3D91;
  padding: 4px 16px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(10,246,131,0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

.pricing-card h3 {
  color: #0A3D91;
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 700;
}

.price {
  font-size: 38px;
  font-weight: 700;
  color: #0A3D91;
  margin: 15px 0;
  line-height: 1;
  transition: transform 0.3s ease;
}

.pricing-card:hover .price { transform: scale(1.05); }

.price span { font-size: 15px; color: #888; font-weight: 500; }

.savings {
  color: #27ae60;
  font-weight: 600;
  font-size: 14px;
  margin: 8px 0 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.pricing-card ul { list-style: none; padding: 0; margin: 25px 0; text-align: left; }

.pricing-card li {
  padding: 10px 0;
  font-size: 14px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.5;
  transition: transform 0.3s ease, color 0.3s ease;
  transform: translateX(0);
}
.pricing-card li:hover {
  transform: translateX(10px);
  color: #0A3D91;
}
.pricing-card li:last-child { border-bottom: none; }

.enroll-btn {
  width: 100%;
  padding: 14px 20px;
  background: #0A3D91;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  margin-top: 20px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

.enroll-btn:hover {
  background: #083168;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(10,61,145,0.3);
}

.enroll-btn:active { transform: translateY(-1px); }

.pricing-card.featured .enroll-btn {
  background: #0AF083;
  color: #0A3D91;
}

.pricing-card.featured .enroll-btn:hover {
  background: #12C899;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(18,200,153,0.3);
}

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-section {
  background: #f8f9fa;
  padding: 60px 20px;
  margin-top: 50px;
}

.faq-section .container { max-width: 900px; margin: 0 auto; }

.faq-section h2 {
  text-align: center;
  color: #0A3D91;
  font-size: 28px;
  margin-bottom: 40px;
  font-weight: 700;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
  touch-action: manipulation;
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.faq-question:hover { color: #0A3D91; }

.faq-question .icon {
  font-size: 20px;
  font-weight: 300;
  color: #0A3D91;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  flex-shrink: 0;
  margin-left: 10px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.4s ease;
  padding: 0 20px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 20px 20px;
}

.faq-item.active .icon { transform: rotate(45deg); }

.faq-answer p {
  color: #666;
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
  animation: fadeIn 0.5s ease-in;
}

.faq-answer a {
  color: #0A3D91;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.faq-answer a:hover { color: #083168; }

/* =============================================
   FINAL CTA SECTION
   ============================================= */
.final-cta {
  background: linear-gradient(135deg, #0A3D91, #0052CC);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.final-cta h2 {
  color: #fff;
  font-size: 30px;
  margin-bottom: 15px;
  font-weight: 700;
}

.final-cta p {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =============================================
   ACCESSIBILITY & INTERACTIONS
   ============================================= */
a { transition: color 0.3s ease; }
a:hover { color: #0A3D91; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =============================================
   RESPONSIVE DESIGN - IMPROVED
   ============================================= */
@media (max-width: 992px) {
  .filter-controls { flex-direction: column; gap: 20px; align-items: stretch; }
  .filter-group { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-label { text-align: center; }
  .filter-buttons { justify-content: center; }
  .course-hero .container { grid-template-columns: 1fr; }
  .subjects-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0 15px; }
  .pricing-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding: 0 15px; }
}

@media (max-width: 768px) {
  .filter-main-title { font-size: 22px; }
  .filter-section { padding: 15px 0; }
  .filter-controls { padding: 0 15px; }
  .filter-btn { padding: 12px 16px; font-size: 12px; min-height: 44px; }
  .filter-icon { font-size: 14px; }
  .stream-filter .filter-btn { min-width: 80px; }
  .type-filter .filter-btn { min-width: 75px; }
  .course-hero { padding: 40px 15px; }
  .course-hero h1, .course-hero h2 { font-size: 24px; }
  .tagline { font-size: 15px; }
  .course-highlights { flex-direction: column; align-items: center; }
  .course-highlights span { width: 100%; max-width: 300px; }
  .cta-buttons { flex-direction: column; gap: 10px; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 350px; }
  .subjects-grid { grid-template-columns: 1fr; padding: 0 15px; gap: 15px; }
  .pricing-cards { grid-template-columns: 1fr; padding: 0 15px; gap: 20px; }
  .schedule-section { padding: 30px 15px; }
  .schedule-table { font-size: 13px; }
  .schedule-table th, .schedule-table td { padding: 12px 10px; }
  .faq-section { padding: 50px 15px; }
  .final-cta { padding: 50px 15px; }
}

@media (max-width: 480px) {
  .filter-main-title { font-size: 20px; margin-bottom: 15px; }
  .filter-controls { padding: 0 10px; }
  .filter-btn { padding: 12px 16px; font-size: 12px; gap: 4px; min-height: 44px; }
  .filter-icon { font-size: 13px; }
  .stream-filter .filter-btn { min-width: 70px; }
  .type-filter .filter-btn { min-width: 68px; }
  .active-selection { padding: 8px 12px; margin: 10px auto; }
  .selection-text { font-size: 14px; }
  .course-hero { padding: 30px 10px; }
  .course-hero h1, .course-hero h2 { font-size: 20px; }
  .tagline { font-size: 14px; }
  .course-highlights span { font-size: 12px; padding: 8px 12px; }
  .btn-primary, .btn-secondary { padding: 12px 24px; font-size: 14px; }
  .subjects-grid { padding: 0 10px; gap: 12px; }
  .subject-card { padding: 20px 15px; }
  .pricing-cards { padding: 0 10px; gap: 15px; }
  .pricing-card { padding: 25px 15px; }
  .price { font-size: 32px; }
  .schedule-section { padding: 25px 10px; }
  .schedule-table th, .schedule-table td { padding: 10px 8px; font-size: 12px; }
  .faq-section { padding: 40px 10px; }
  .faq-question { padding: 15px; font-size: 14px; }
  .faq-answer { padding: 0 15px; }
  .faq-item.active .faq-answer { padding: 0 15px 15px; }
  .final-cta { padding: 40px 10px; }
  .final-cta h2 { font-size: 24px; }
  .final-cta p { font-size: 15px; }
}

@media (max-width: 374px) {
  .filter-main-title { font-size: 18px; }
  .course-hero h1, .course-hero h2 { font-size: 18px; }
  .filter-btn { min-width: 65px !important; font-size: 10px; padding: 12px 16px; min-height: 44px; }
}

@media print {
  .filter-section,
  .final-cta,
  .cta-buttons { display: none; }
  .course-hero {
    background: #0A3D91;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
