/* ==========================================================================
   TeenLearners Global Enhancements & Modern Layout Stylesheet
   The Teen Files Ecosystem • Greater Noida HQ • EST. 2026
   ========================================================================== */

/* 1. Full-Width Wide Layout Overrides (1440px max width) */
.landing-wrap, 
.wrap, 
.editorial-page .wrap, 
.page-hero .wrap, 
.ui-section .wrap, 
.site-footer .wrap, 
.nav-wrap .wrap {
  max-width: 1440px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(16px, 3.5vw, 44px) !important;
  padding-right: clamp(16px, 3.5vw, 44px) !important;
  box-sizing: border-box !important;
}

/* 2. Absolute Prevention of Horizontal Scrolling */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

/* Ensure wide screen grids stretch naturally */
.prem-demo-grid,
.showcase-grid,
.prem-phase-grid,
.curriculum-highlights-grid,
.syllabus-grid,
.prem-exams-grid {
  width: 100% !important;
}

@media (min-width: 1024px) {
  .prem-hero-intro {
    max-width: 820px !important;
  }
}

/* 3. Top Scroll Progress Bar */
#tl-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #f59e0b 100%);
  z-index: 100000;
  width: 0%;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
  pointer-events: none;
}

/* 4. Floating Back to Top Button */
#tl-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
}

#tl-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#tl-back-to-top:hover {
  background: rgba(28, 28, 36, 0.95);
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.3);
}

#tl-back-to-top svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* 5. Floating Ask Doubt / Contact Button */
#tl-floating-contact {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(15, 16, 20, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 9980;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  transition: all 0.22s ease;
}

#tl-floating-contact:hover {
  background: rgba(24, 25, 32, 0.96);
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.3);
}

#tl-floating-contact .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: tl-pulse 2s infinite;
}

@keyframes tl-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #f59e0b; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

@media (max-width: 640px) {
  #tl-floating-contact {
    bottom: 16px;
    left: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }
  #tl-back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* 6. Quick Search & Side Search Header Button */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 4px;
}

.nav-search-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-search-btn kbd {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: ui-monospace, monospace;
}

@media (max-width: 768px) {
  .nav-search-btn span, .nav-search-btn kbd {
    display: none;
  }
  .nav-search-btn {
    padding: 6px 8px;
  }
}

/* 7. Modal System (Search & Doubt Modals) */
.tl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.tl-modal-card {
  width: 100%;
  max-width: 620px;
  background: #111216;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-modal-overlay.open .tl-modal-card {
  transform: scale(1) translateY(0);
}

.tl-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tl-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.tl-modal-close {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tl-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tl-modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

/* Search Modal Specifics */
.tl-search-input-box {
  position: relative;
  margin-bottom: 16px;
}

.tl-search-input-box input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.tl-search-input-box input:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.07);
}

.tl-search-input-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a1aa;
  width: 18px;
  height: 18px;
}

.tl-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.tl-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #e4e4e7;
  transition: all 0.15s ease;
}

.tl-search-item:hover, .tl-search-item:focus {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #ffffff;
  transform: translateX(3px);
}

.tl-search-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tl-search-item-title {
  font-size: 13.5px;
  font-weight: 600;
}

.tl-search-item-meta {
  font-size: 11.5px;
  color: #a1a1aa;
}

.tl-search-item-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  font-weight: 600;
}

/* Doubt Modal Specifics */
.tl-doubt-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tl-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-form-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a1a1aa;
}

.tl-form-input, .tl-form-select, .tl-form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.tl-form-input:focus, .tl-form-select:focus, .tl-form-textarea:focus {
  border-color: #f59e0b;
  background: rgba(255, 255, 255, 0.07);
}

.tl-form-textarea {
  min-height: 90px;
  resize: vertical;
}

.tl-form-submit {
  padding: 12px;
  border-radius: 10px;
  background: #f59e0b;
  color: #000000;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tl-form-submit:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.tl-contact-direct-bar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #a1a1aa;
}

.tl-direct-link {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tl-direct-link:hover {
  text-decoration: underline;
  color: #fbbf24;
}

/* 8. Modern Toast Notifications */
#tl-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100050;
  pointer-events: none;
  max-width: 380px;
  width: calc(100vw - 40px);
}

.tl-toast {
  pointer-events: auto;
  background: #18191f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transform: translateX(50px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

.tl-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.tl-toast-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.tl-toast.success {
  border-left: 4px solid #10b981;
}
.tl-toast.success .tl-toast-icon {
  color: #10b981;
}

.tl-toast.error {
  border-left: 4px solid #ef4444;
}
.tl-toast.error .tl-toast-icon {
  color: #ef4444;
}

.tl-toast.info {
  border-left: 4px solid #3b82f6;
}
.tl-toast.info .tl-toast-icon {
  color: #3b82f6;
}

.tl-toast-content {
  flex: 1;
}

.tl-toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.tl-toast-msg {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.45;
}

.tl-toast-close {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 2px;
}

.tl-toast-close:hover {
  color: #ffffff;
}

/* 9. Expandable FAQ Accordion Styles */
.faq-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-accordion-item.active {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.faq-accordion-btn {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.faq-accordion-chevron {
  width: 18px;
  height: 18px;
  color: #a1a1aa;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-accordion-item.active .faq-accordion-chevron {
  transform: rotate(180deg);
  color: #f59e0b;
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 20px;
  color: #d1d5db;
  font-size: 13.5px;
  line-height: 1.65;
}

.faq-accordion-item.active .faq-accordion-content {
  max-height: 300px;
  padding: 0 20px 18px;
}

/* 10. Light Mode Theme Harmonization */
html.light-mode body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light-mode .tl-body,
html.light-mode .landing-root,
html.light-mode .editorial-page {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light-mode .nav-wrap {
  background: rgba(248, 250, 252, 0.9) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html.light-mode .site-footer {
  background: #f1f5f9 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html.light-mode .tl-modal-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light-mode .tl-modal-title {
  color: #0f172a !important;
}

html.light-mode .tl-toast {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

html.light-mode .tl-toast-title {
  color: #0f172a !important;
}

html.light-mode .tl-toast-msg {
  color: #64748b !important;
}

html.light-mode .tl-search-item {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: #1e293b !important;
}

html.light-mode .tl-search-item:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

html.light-mode .tl-search-input-box input,
html.light-mode .tl-form-input,
html.light-mode .tl-form-select,
html.light-mode .tl-form-textarea {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light-mode #tl-back-to-top {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

html.light-mode #tl-floating-contact {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
}
