/* Topic Page Specific Styles */

/* Topic Header */
.topic-header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 60px;
    margin-top: 10px;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 10px;
}

.topic-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.topic-title i {
    font-size: 2.5rem;
    color: #fbbf24;
}

.topic-description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Content Layout */
.topic-content {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sidebar h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.topic-nav {
    list-style: none;
    margin-bottom: 30px;
}

.topic-nav li {
    margin-bottom: 12px;
}

.topic-nav a {
    color: #64748b;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
}

.topic-nav a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.sidebar-card {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
}

.sidebar-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.sidebar-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Main Content */
.main-content {
    max-width: none;
}

.formula-section {
    margin-bottom: 60px;
}

.formula-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1e293b;
}

.section-intro {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Formula Cards */
.formula-card {
    background:#fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
     border-left: 4px solid #764ba2 ; 
}

.formula-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.formula-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.copy-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
}

.formula-display {
    background: #edebffa8;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
        
    font-size: 1.2rem;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.formula-explanation {
    margin-bottom: 20px;
}

.formula-explanation p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.formula-explanation ul {
    margin: 15px 0;
    padding-left: 20px;
}

.formula-explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.formula-example {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
     border-left: 4px solid #caa4f1; 
}

.formula-example h4 {
    color: #0c4a6e;
    margin-bottom: 15px;
    font-weight: 600;
}

.solution-steps {
    margin-top: 15px;
}

.solution-steps p {
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e0f2fe;
}

/* Formula Grid */
.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.formula-grid .formula-card {
    margin-bottom: 0;
}

/* Active Navigation Link */
.skip-link {
    display: none;
}

/* MathJax Styling */
.MathJax {
    font-size: 1.2em !important;
    line-height: 2rem !important;
    overflow-y: hidden;
}

 /* ----------------------------
       ðŸ”¹ Base Styles
    -----------------------------*/
   
    .navbar {
      background-color: #fff;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      /*position: sticky;*/
      top: 0;
      z-index: 1000;
    }

    .nav-container {
      /*position: relative;*/
    }


    /* ----------------------------
       ðŸ”¹ Scrollable Menu Section
    -----------------------------*/
    .scroll-menu {
      display: flex;
      align-items: center;
      position: relative;
      flex: 1;
      margin: 0 10px;
    }

    .nav-menu-container {
      display: flex;
      white-space: nowrap;
      overflow-x: auto;
      scroll-behavior: smooth;
      scrollbar-width: none;
      flex: 1;
    }

    .nav-menu-container::-webkit-scrollbar {
      display: none;
    }

    .nav-link {
      padding: 10px 15px;
    }

    .nav-link:hover {
      color: #1e293b;
    }

    /* ----------------------------
       ðŸ”¹ Arrow Buttons
    -----------------------------*/
    .nav-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 50%;
      font-size: 16px;
      cursor: pointer;
      padding: 6px;
      color: #333;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      z-index: 10;
      transition: opacity 0.3s ease, background 0.3s;
    }

    .nav-arrow:hover {
      background: #f0f0f0;
    }

    .nav-arrow-left {
      left: 0;
    }

    .nav-arrow-right {
      right: 0;
    }

   
    /* ----------------------------
       ðŸ”¹ Mobile Menu Button
    -----------------------------*/
    .nav-toggle {
      display: none;
      flex-direction: column;
      cursor: pointer;
    }

    @media (max-width: 768px) {
      .scroll-menu {
        display: none;
      }
      .nav-toggle {
        display: flex;
      }
    }

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        order: -1;
    }
    
    .sidebar-content {
        padding: 20px;
    }
    
    .topic-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .topic-nav li {
        margin-bottom: 0;
    }
    .topic-content .content-grid {
        display: block;
    }
    .solution-steps p,
    .formula-card .MathJax.CtxtMenu_Attached_0{
        overflow-x: auto;
    }
    .nav-container .nav-menu {
        display: flex;
        gap: 0px; 
    }
    .nav-container .nav-link {
        padding: 10px 10px;
        margin: 0;
    }
}
@media (max-width: 1024px) {
   .navbar-internal .scroll-menu .nav-arrow.nav-arrow-right {
     right: 155px;
    }
}
@media (max-width: 768px) {
    .topic-title {
        font-size: 2.2rem;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .topic-title i {
        font-size: 2rem;
    }
    
    .formula-card {
        padding: 20px;
    }
    
    .formula-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .formula-display {
        font-size: 14px;
        padding: 15px;
        overflow-x: auto;
    }
    
    .formula-grid {
        grid-template-columns: 1fr;
    }

  
}

@media (max-width: 480px) {
    .topic-header {
        padding: 100px 0 40px;
    }
    
    .topic-title {
        font-size: 1.8rem;
    }
    
    .topic-description {
        font-size: 1rem;
    }
    
    .formula-section h2 {
        font-size: 1.5rem;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .topic-nav {
        flex-direction: column;
    }
}


/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .footer,
    .copy-btn {
        display: none;
    }
    
    .topic-header {
        background: none;
        color: black;
        padding: 20px 0;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .formula-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/*--Added by Seema on 9 Oct 2025-----*/

.navbar-internal {
  background: #fff;
  border-bottom: 1px solid #ddd;
  /*position: relative;*/
  z-index: 10;
}

.scroll-menu {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  overflow: hidden;
  padding-left: 5px;
}

/* Menu wrapper */
.navbar-internal .nav-menu {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding-inline: 40px 260px; /* space for arrows & search */
}

/* Menu container */
.navbar-internal .nav-menu-container {
  display: inline-block;
  align-items: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 0px;
  text-align: right;
  padding-right: 215px;
}

.navbar-internal .nav-menu-container::-webkit-scrollbar {
  display: none;
}

.navbar-internal .nav-link {
  white-space: nowrap;
}

/* Arrows */
.navbar-internal .nav-arrow {
  background: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-internal .nav-arrow.hidden {
  display: none;

}

.navbar-internal .nav-arrow-left {
  margin-right: 4px;
      margin-left: 4px;
}

/* Right arrow fixed before search */
.navbar-internal .nav-arrow-right {
  position: absolute;
  right: 205px;
  top: 50%;
  transform: translateY(-50%);
}

/* Search input fixed at right */
#search-input {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  z-index:2;
}

/* Extra space so last links don’t hide behind search */
.navbar-internal .nav-menu-container::after {
 
  /*flex: 0 0 230px;*/
      content: "";
    background: #fff;
    width: 220px;
    display: inline-block;
    position: absolute;
    height: 100%;
    left: auto;
    right: 0;
    z-index: 1;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
@media (max-width:1024px) {

    .navbar-internal .nav-menu-container {
        padding-right:165px;
    }
    .navbar-internal .nav-menu-container::after {
 
     width: 170px;
   }
}
/* Mobile view */
@media (max-width: 768px) {
  .scroll-menu {
    position:fixed;
    top:70px;
    right:0px;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    margin: 0;
  }
   .navbar-internal .nav-menu-container {
        padding-right:0px;
    }
  .nav-menu {
    position: absolute;
    top: 60px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    flex-direction: column;
    padding: 10px;
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    padding: 10px;
    display: block;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  
}
@media only screen and (max-height: 768px) and (orientation: landscape) {
    .scroll-menu {
        overflow-y: auto;
    }
}
 
