/* ==========================================================================
   ThuyetTrinh.2.edu.vn - Custom Stylesheet v1.0.1
   Theme: Royal Blue (#1b44b8) & Vibrant Orange (#f58220) Brand Identity
   ========================================================================== */

:root {
  /* Primary Brand Colors */
  --brand-blue: #1b44b8;
  --brand-blue-hover: #153594;
  --brand-blue-light: #eff6ff;
  --brand-blue-border: #bfdbfe;

  --brand-orange: #f58220;
  --brand-orange-hover: #dc6b0e;
  --brand-orange-light: #fff7ed;
  --brand-orange-border: #fed7aa;

  /* Neutral & Supporting Colors */
  --dark-color: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --card-border: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 14px 25px -4px rgba(27, 68, 184, 0.12), 0 6px 10px -4px rgba(245, 130, 32, 0.08);
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--dark-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Navbar & Brand Identity
   ========================================================================== */
.navbar-custom {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.brand-logo-wrap {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.sunshine-nav-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.sunshine-nav-logo:hover {
  transform: scale(1.05);
}

.sunshine-footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.brand-logo-blue {
  color: var(--brand-blue);
  font-weight: 900;
}

.brand-logo-orange {
  color: var(--brand-orange);
  font-weight: 800;
}

.brand-logo-domain {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}

.nav-link {
  font-weight: 600;
  color: #334155 !important;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue) !important;
}

/* ==========================================================================
   Hero Banner
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0f2b7a 0%, #1b44b8 55%, #1e3a8a 100%);
  color: #ffffff;
  padding: 3.5rem 0 3.2rem;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 10px 30px rgba(27, 68, 184, 0.15);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 130, 32, 0.25) 0%, rgba(245, 130, 32, 0) 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-badge .star-icon {
  color: var(--brand-orange);
  margin-right: 6px;
}

.hero-title {
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.hero-title span {
  color: #fed7aa;
}

.hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Search Bar */
.search-box-wrap {
  max-width: 620px;
  margin: 1.8rem auto 0;
}

.search-input-group {
  background: #ffffff;
  border-radius: 50px;
  padding: 6px 8px 6px 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
}

.search-input-group input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  color: var(--dark-color);
  font-weight: 500;
}

.btn-search-submit {
  background: var(--brand-orange);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 20px;
  border-radius: 40px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-search-submit:hover {
  background: var(--brand-orange-hover);
  color: #ffffff;
}

/* ==========================================================================
   Category Filter Tabs
   ========================================================================== */
.filter-tab-btn {
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 30px;
  transition: all 0.2s ease;
  margin: 0 4px 8px;
}

.filter-tab-btn:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue-border);
  background: var(--brand-blue-light);
}

.filter-tab-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(27, 68, 184, 0.25);
}

/* ==========================================================================
   Topic Card Grid
   ========================================================================== */
.topic-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--card-shadow);
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--brand-blue-border);
}

.topic-card .card-thumb-wrap {
  position: relative;
  background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
}

.topic-card .card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.topic-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topic-category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffffff;
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange-border);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.topic-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.topic-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.topic-card-title-vn {
  font-size: 0.85rem;
  color: var(--brand-orange);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.topic-card-desc {
  font-size: 0.875rem;
  color: #475569;
  flex-grow: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.topic-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--card-border);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-view-topic {
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.58rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-view-topic:hover {
  background: var(--brand-orange);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 130, 32, 0.3);
}

/* ==========================================================================
   Topic Detail Page Layout (Left Mindmap | Center Script | Right Videos)
   ========================================================================== */
.topic-detail-header {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  border-left: 5px solid var(--brand-orange);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.sticky-mindmap-box {
  position: sticky;
  top: 85px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.mindmap-img-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  cursor: pointer;
}

.mindmap-img-container img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.mindmap-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.btn-zoom-orange {
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange-border);
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-zoom-orange:hover {
  background: var(--brand-orange);
  color: #ffffff;
}

/* Detail Content Section Boxes */
.detail-section-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.section-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 1.25rem;
}

.section-card-title i {
  color: var(--brand-orange);
  font-size: 1.25rem;
}

/* Outline Step Boxes */
.outline-part-box {
  border-left: 4px solid var(--brand-blue);
  background: #f8fafc;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.outline-part-box.part-intro {
  border-left-color: var(--brand-blue);
  background: var(--brand-blue-light);
}

.outline-part-box.part-body {
  border-left-color: var(--brand-orange);
  background: var(--brand-orange-light);
}

.outline-part-box.part-conclusion {
  border-left-color: #0d9488;
  background: #f0fdfa;
}

.outline-part-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: #0f172a;
}

.outline-item-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.outline-item-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.8rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.outline-item-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand-orange);
  font-weight: 900;
}

.translation-text {
  color: #0d9488;
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Script Box */
.script-box {
  background: #fdfefe;
  border: 1px solid var(--brand-blue-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #0f172a;
  position: relative;
  white-space: pre-line;
}

.script-vn-box {
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #166534;
  margin-top: 0.75rem;
  white-space: pre-line;
}

/* Personal Speech Editor Box */
.editor-section-card {
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(245, 130, 32, 0.08);
}

.speech-custom-textarea {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.8;
  padding: 12px 14px;
  resize: vertical;
  min-height: 160px;
  transition: all 0.2s ease;
}

.speech-custom-textarea:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 0.25rem rgba(245, 130, 32, 0.15);
  outline: none;
}

.stat-pill {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.btn-tts {
  background: #ffffff;
  border: 1px solid var(--brand-blue-border);
  color: var(--brand-blue);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 3px 10px;
  transition: all 0.15s ease;
}

.btn-tts:hover, .btn-tts.speaking-active {
  background: var(--brand-blue);
  color: #ffffff;
}

/* ==========================================================================
   Video Submission Sidebar (Right Column)
   ========================================================================== */
.video-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 85px;
}

.video-feed-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 0.9rem;
  transition: all 0.2s ease;
}

.video-feed-item:hover {
  border-color: var(--brand-orange-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.video-thumb-container {
  position: relative;
  background: #0f172a;
  height: 125px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.3s;
}

.video-thumb-container:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.video-play-badge {
  position: absolute;
  width: 44px;
  height: 44px;
  background: rgba(245, 130, 32, 0.9);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.video-thumb-container:hover .video-play-badge {
  transform: scale(1.15);
  background: #ea580c;
}

.video-feed-info {
  padding: 10px 12px;
}

.video-student-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 2px;
}

.video-school-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ==========================================================================
   Course Info Feature Box on index.php
   ========================================================================== */
.course-info-card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: #ffffff;
}

.timeline-badge-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  background: #ffffff;
  height: 100%;
  transition: all 0.2s ease;
}

.timeline-badge-card.highlight {
  border: 2px solid var(--brand-orange);
  background: var(--brand-orange-light);
}

/* Footer */
footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.version-tag {
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Spin animation */
.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Responsive Utilities */
@media (max-width: 991px) {
  .sticky-mindmap-box, .video-sidebar-card {
    position: static;
  }
}
