/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    margin: 0 auto;
    padding: 0 20px;
    width: 1350px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
    max-width:1350px;
    width:100%;
}

.nav-container .nav-menu {
    margin-left: auto;
    margin-right: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* max-width: calc(100% - 200px); */
    /* padding: 0 50px;  */
}

.nav-menu-container {
    display: flex;
    gap: 30px;
    transition: transform 0.3s ease;
    align-items: center;
}
/* .nav-menu-container a{
    width: 90px;
    text-align: center;
}
.nav-menu-container a.active{
    width: 100px;
    text-align: center;
    background-color: red;
    color: #fff;
    padding: 10px;
} */

.nav-arrow {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    font-size: 14px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #2563eb;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.nav-arrow-left {
    left: 4px;
}

.nav-arrow-right {
    right: -6px;
}

.nav-arrow.hidden {
    display: block;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform:uppercase;
    line-height: 2.3rem;
    white-space: nowrap;
}

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

/* More Menu Dropdown Styles */
.nav-more-container {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-more-btn {
    background: none;
    border: none;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: baseline;
    gap: 5px;
  font-size: 16px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.nav-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-more-btn.active i {
    transform: rotate(180deg);
}

.nav-more-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-more-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-more-dropdown .nav-link {
    display: block;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.nav-more-dropdown .nav-link:last-child {
    border-bottom: none;
}

.nav-more-dropdown .nav-link:hover {
    background-color: #f8fafc;
    color: #2563eb;
    padding-left: 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.hero-container {
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1350px;
    width:100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: #fbbf24;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #fff;
    color: #1e293b;
    border: 2px solid white;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #1e293b;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.formula-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
  
}

.formula {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fbbf24;
}

.formula-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1f2937;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.about-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    background: #f8fafc;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-icon {
    width: 80px;
    height: 80px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.about-icon i {
    font-size: 2rem;
    color: white;
}

.about-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
}

.about-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Topics Section */
.topics {
    padding: 80px 0;
    background: #f8fafc;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.topic-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.footer-logo img{
    width: 200px;
}
.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.topic-icon {
    width: 60px;
    height: 60px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* .topic-card:hover .topic-icon {
    background-color: #6db1b6;
} */


.topic-icon i {
    font-size: 1.5rem;
   color: #fff;
}

.topic-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
}

.topic-card p {
    color: #1f2937;
    margin-bottom: 20px;
    line-height: 1.6;
}

.topic-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.example {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #475569;
}

.topic-arrow {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #667eea;
    transition: all 0.3s ease;
}

.topic-card:hover .topic-arrow {
    color: #667eea;
    transform: translateX(5px);
}

/* Footer */
.footer {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fbbf24;
}

.footer-logo i {
    margin-right: 10px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-section p {
    color: #fff;
    margin-bottom: 8px;
}

.footer-section i {
    margin-right: 8px;
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid #fff;
    padding-top: 5px;
    text-align: center;
    color: #fff;
}

/* .topic-card:hover{
    background-color: #f59e0b;
} */
.topic-card:hover p{
    color: #1f2937;
}
/* .topic-card:hover .example{
    background-color: #f1bd63;
} */
.topic-card:hover .example .MathJax.CtxtMenu_Attached_0{
    color: #1e293b;
}
.topic-card .example .MathJax.CtxtMenu_Attached_0{
    color: #1e293b;
}
.MathJax.CtxtMenu_Attached_0{
    color: #1e293b;
}
ul.topic-nav a:hover {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
/* .topic-header.algebra-header-banner{
    background-image: url(../Images/image\ \(3\).png);
} */

/* Responsive Design */

.text-footer-code p,
.footer-icon-code .footer-code-inner p{
    color:#fff;
    font-size:16px;
}

.footer-icon-code .footer-code-inner p a svg{
width:20px;
position:relative;
top:6px;
}

.footer-icon-code .footer-code-inner p a .linkdin-icon{
    width:24px!important;
}


    .nav-logo img {
        width: 260px;
       height: auto;
    }
    .search-input:focus-visible {
        outline:none;
        border:1px solid #1F2937!important;
    }
    
    #search-input {
  width: 200px;
}

#search-input {
  height: 32px;
  outline: none;
}
.nav-container {
  gap: 10px;
}



.stats-card {
  display: flex;
 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  padding: 48px 32px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
}
.stat-value {
  font-size: 45px;
  font-weight: 700;
  /* line-height: 1.1; */
  color: #fff;
}
.value-blue { color: #fbbf24; }
.value-green { color: #18ae4b; }
.value-orange { color: #fbbf24; }

.stat-label {
  font-size: 18px;
  color: #fff;
  margin-top: 12px;
}
.divider {
  width: 2px;
  height: 60px;
  background: #adadaac7;
  margin: 0 32px;
  border-radius: 2px;
}
.stats-card .stat-item:nth-child(5) .stat-value {
  color: #fff; /* for the 100% value */
}
.d-none {
    display:none!important;
}


@media (max-width: 1024px) {
  #search-input {
    width: 150px !important;
  }
}


    
    /*Tools design*/

  .tools h1{text-align:center;margin-top:30px;font-weight:600;color:#1e3a8a}
  .tools .tabs{display:flex;justify-content:center;flex-wrap:wrap;border-bottom:1px solid #ededed;margin-top:20px}
  .tools .tab{
      padding: 20px;
    margin: 0px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
    border: 1px solid #dedede;
    /*background: -webkit-linear-gradient(white, white) padding-box, -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;*/
    /*background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;*/
    width: 20%;
    color: #1F2937;
        font-size: 16px;
        background-color:#fff;
  }
  .tools .tab.active{
      border-bottom: 1px solid transparent;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /*-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);*/
  }
  .tools .tab-content{display:none;margin:0 auto;background:#fff;border-radius:0 0 12px 12px;box-shadow:0 4px 14px rgba(0,0,0,.08);padding:25px;margin-bottom:40px}
  .tools .tab-content.active{display:block}
  .tools .tab-content h2 {
      font-weight: 600;
      
  }
  .tools .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
  .tools label{display:block;font-weight:500;margin-bottom:6px}
  .tools input{width:100%;padding:8px;border:1px solid #d1d5db;border-radius:6px;font-size:15px}
  .tools input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.2)}
  .tools .clear-btn{display:block;padding:10px 20px;background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:#fff;font-weight:600;border:2px solid transparent;border-radius:10px;cursor:pointer;transition:.2s}
  .tools .clear-btn:hover{
  background: 
    -webkit-linear-gradient(white, white) padding-box, 
    -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
  background: 
    linear-gradient(white, white) padding-box, 
    linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    color: #1F2937;
  }
.tab-head-btn {
    display:flex;
    justify-content:space-between;
    margin-bottom: 20px;
    align-items:center;
}
@media (max-width: 1024px) {
    .tools .tab{
        font-size:14px;
}

/* ===== Tabs or Accordion Styles (Mobile) ===== */
@media (max-width: 767px) {
  .accordion-header {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-weight: 600;
    border: 1px solid #dedede;
    border-radius: 10px;
    background-color: #fff;
    cursor: pointer;
    transition: all .3s ease;
    margin-bottom: 10px;
    color: #1F2937;
    font-size: 15px;
  }

  .accordion-header.active {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 0px;
    border-radius: 10px 10px 0 0;
  }

  .tab-content {
    display: none;
    margin-top: 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
  }

  .tab-content.active {
    display: block;
    margin-bottom: 15px;
  }

  .tabs {
    display: none !important;
  }
}



@media (max-width: 1200px) {
    
    div.nav-container {
    width: auto;
}
    .container {
        padding: 0 15px;
        width: auto;
    }
.formula-card{
    overflow-x: auto;
}
    .hero-container {
        gap: 50px;
    }
    

    .topics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    .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: 20px; 
    }
    .nav-menu-container{
        gap: 10px;
    }
    .nav-container .nav-link {
        padding: 10px 15px;
        margin: 0;
        font-size: 0.9rem;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .nav-arrow-left {
        left: -45px;
    }
    
    .nav-arrow-right {
        right: -45px;
    }
        .nav-logo img {
        width: 160px;
       height: auto;
    }
}

@media (max-width: 992px) {
    .nav-menu {
        max-width: calc(100% - 100px);
    }
    
    .nav-container .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .nav-arrow-left {
        left: -40px;
    }
    
    .nav-arrow-right {
        right: -40px;
    }
    .nav-menu-container{
        gap: 10px;
    }
}
@media (max-width: 991px) {
    
    
     .nav-container div.nav-menu {
        max-width: 100%;
    }
    .nav-container a.nav-link {
        padding: 10px;
    }
    button.nav-more-btn {
    padding: 6px 10px;
    }
    .hero-container {
        display:flex;
        flex-direction:column;
    }
    .hero-visual {
       width: 100%;
    }
   
}

@media (max-width: 768px) {
    
         .nav-container div.nav-menu {
        width: 200px;
    }
    
    /* Ensure navbar is always visible */
    /*.navbar {*/
    /*    position: fixed;*/
    /*    top: 0;*/
    /*    width: 100%;*/
    /*    z-index: 1000;*/
    /*    background: #fff;*/
    /*    box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
    /*}*/

    .nav-container {
        padding: 0 15px;
        height: 70px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .nav-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .nav-logo img {
        width: 200px;
       height: auto;
    }

    /* Hide desktop nav-menu on mobile */
    /*.nav-container .nav-menu {*/
    /*    display: none;*/
    /*}*/

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        /*padding: 20px 0;*/
        z-index: 999;
        max-width: none;
        overflow: visible;
    }

    .nav-menu.active {
right: 0;    }

    .nav-menu-container {
        flex-direction: column;
        gap: 0;
        transform: none !important;
        width:100%;
    }
   
    .nav-link {
        display: block;
        padding: 15px 20px;
        color: #64748b;
        text-decoration: none;
        font-weight: 500;
        border-bottom: 1px solid #dddddd;
        transition: all 0.3s ease;
        width:100%;
    }

    .nav-link:hover {
        background-color: #f8fafc;
        color: #2563eb;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-more-container {
        display: none;
    }

    .nav-arrow {
        display: none !important;
    }

    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 8px;
        background: none;
        border: none;
        z-index: 1001;
        position: relative;
    }

    .nav-toggle .bar {
        width: 20px;
        height: 3px;
        background-color: #333;
        margin: 3px 0;
        transition: 0.3s;
        display: block;
    }
    

    /* Hamburger animation */
    .nav-toggle.open .bar:nth-child(1) {
        transform: rotate(45deg) translate(7px, 5px);
    }

    .nav-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        padding: 100px 0 60px;
    }
.container{
    width: auto;
}
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .about {
        padding: 60px 0;
    }

    .topics {
        padding: 60px 0;
    }

    .topics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .topic-card {
        padding: 25px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .stats-card {
        flex-direction: column;
        padding: 28px 8px;
        max-width: 90vw;
        min-width: unset;
     }
    .divider {
        width: 70%;
        height: 2px;
        margin: 16px auto;
    }
    .stat-value {
        font-size: 32px;
    }
   .stat-label {
        font-size: 16px;
        margin-top: 8px;
    }
    .hero-container {
        width: auto;

}

#search-input {
    order: 2;
    margin-left: auto!important;
}
#nav-toggle {
    order: 3;
    gap: 0;
}




}

@media (max-width: 480px) {
    
     .nav-container div.nav-menu {
        width: 180px;
    }
    

    .container {
        padding: 0 10px;
        width: auto;
    }
    .formula-display.trigno-table{
        font-size: 14px;
    }
    .nav-container .nav-logo img {
        width: 150px;
    }

    .hero {
        padding: 90px 0 50px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .topic-card {
        padding: 20px;
    }

    .topic-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .topic-icon i {
        font-size: 1.2rem;
    }

    .topic-card h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .topic-examples {
        gap: 8px;
        margin-bottom: 15px;
    }

    .example {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .about-card {
        padding: 25px 15px;
    }

    .about-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .about-icon i {
        font-size: 1.5rem;
    }

    .formula-card {
        margin-bottom: 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-logo i {
        font-size: 1.5rem;
    }

    .stats-card {
        flex-direction: column;
        padding: 28px 8px;
        max-width: 90vw;
        min-width: unset;
     }
    .divider {
        width: 70%;
        height: 2px;
        margin: 16px auto;
    }
    .stat-value {
        font-size: 32px;
    }
   .stat-label {
        font-size: 16px;
        margin-top: 8px;
    }
    
    .footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }


    .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: 5px 20px;
        margin: 0;
    }
}
@media (max-width: 380px) {
    .nav-container {
        padding: 0 10px;
        gap: 5px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .topic-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .about-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Increase touch targets */
    .nav-link {
        padding: 15px 20px;
        margin: 5px 0;
    }

    .topic-card {
        min-height: 200px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-visual .formula-card {
        border-width: 0.5px;
    }
}

/* 
.stats-card {
  display: flex;
  background: #fafafc;
  border-radius: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  padding: 48px 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
*/



