/* RESPONSIVE - Consolidated Breakpoints */

/* TABLET */
@media(max-width:991px) {
  .menu-toggle {
    display: block
  }

  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    height: calc(100vh - 80px);
    background: #ffffff;
    text-align: center;
    border-top: 1px solid var(--border-light);
    display: none;
    overflow-y: auto;
    z-index: 998;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .nav.active {
    display: block
  }

  .menu {
    flex-direction: column;
    padding: 24px;
    gap: 0
  }

  .menu li {
    padding: 0
  }

  .menu a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
  }

  .submenu {
    position: static;
    background: rgba(255, 255, 255, .03);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: auto
  }

  .submenu li a {
    padding: 10px 16px;
    border-bottom: none
  }

  .header-actions {
    display: none
  }

  .hero-flex {
    flex-direction: column;
    text-align: center
  }

  .hero-left h1 {
    font-size: 32px
  }

  .hero-left>p {
    margin-left: auto;
    margin-right: auto
  }

  .hero-right {
    flex: 0 0 auto;
    max-width: 320px
  }

  .search-box {
    flex-direction: column
  }

  .search-box select,
  .search-box input {
    min-width: auto
  }

  .trust-badges {
    justify-content: center
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .tf-grid {
    grid-template-columns: 1fr
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center
  }

  .search-layout {
    grid-template-columns: 1fr
  }

  .filters {
    position: static
  }

  .inst-top {
    grid-template-columns: 1fr
  }

  .inst-details {
    grid-template-columns: 1fr
  }

  .about-flex {
    flex-direction: column;
    text-align: center
  }

  .mission-vision {
    grid-template-columns: 1fr
  }

  .contact-grid {
    grid-template-columns: 1fr
  }

  .blog-layout {
    grid-template-columns: 1fr
  }

  .blog-posts {
    grid-template-columns: 1fr
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .app-flex {
    flex-direction: column;
    text-align: center
  }

  .cta-section h2 {
    font-size: 26px
  }

  .grid-2-1 {
    grid-template-columns: 1fr;
  }

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

  .qv-body-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .mobile-only-actions {
    display: flex !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
  }

  .floating-whatsapp {
    bottom: 20px !important;
  }

  .scroll-to-top {
    bottom: 20px !important;
  }

  body {
    padding-bottom: 40px !important;
  }

  .main-footer {
    padding-bottom: 40px !important;
  }

  /* Homepage Search Box mobile/tablet styling */
  .search-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 16px !important;
  }

  .search-box select,
  .search-box input {
    width: 100% !important;
    border-left: none !important;
    border-top: 1px solid var(--border-light) !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 !important;
  }

  .search-box button[type="submit"] {
    width: 100% !important;
    margin-top: 10px !important;
    justify-content: center !important;
  }

  .hero-search-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .hero-search-box .search-field {
    width: 100% !important;
  }

  .hero-search-box .search-btn {
    width: 100% !important;
    margin-top: 4px !important;
    justify-content: center !important;
    display: inline-flex !important;
  }

  /* Filters sidebar styling - Grid layout on tablets */
  .filters {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    padding: 20px !important;
  }

  .filters h3,
  .filters .filter-tabs,
  .filters button[type="submit"] {
    grid-column: 1 / -1 !important;
  }

  .filters .filter-tabs {
    margin-bottom: 0 !important;
  }

  .filters .filter-group {
    margin-bottom: 0 !important;
  }

  /* Details page spacing card overrides */
  .inst-details>div>div {
    padding: 20px !important;
    border-radius: var(--radius-md) !important;
  }

  .claim-profile-card {
    padding: 16px !important;
  }

  /* OFFERS BANNER RESPONSIVENESS */
  .inst-offers-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 20px;
    padding: 20px;
  }

  .offers-list {
    grid-template-columns: 1fr;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
  }

  .offers-right {
    display: flex;
    justify-content: center;
  }

  .btn-quick-enroll {
    width: 100%;
    justify-content: center;
  }

  .inst-gallery,
  .inst-right,
  .inst-details>div {
    min-width: 0 !important;
  }

  .inst-badges {
    flex-wrap: wrap !important;
  }

  .location {
    flex-wrap: wrap !important;
  }

  .map iframe {
    width: 100% !important;
  }

  #compare-banner {
    bottom: 80px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 30px) !important;
    max-width: 420px !important;
    justify-content: space-between !important;
    padding: 10px 16px !important;
    border-radius: var(--radius-md) !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  #compare-banner .btn-accent {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }

  #compare-banner span {
    font-size: 13.5px !important;
  }

  body.compare-active .floating-whatsapp {
    bottom: 155px !important;
  }

  body.compare-active .scroll-to-top {
    bottom: 155px !important;
  }

  .hero-shape-1,
  .hero-shape-2,
  .hero-shape-3,
  .hero-blob-1,
  .hero-blob-2,
  .hero-grid-pattern,
  .hero-line-art-left,
  .hero-line-art-right {
    display: none !important;
  }

  .section-decor::before,
  .section-decor::after,
  .decor-lines-left::before,
  .decor-lines-right::after,
  .decor-circles-left::before,
  .decor-circles-right::after {
    display: none !important;
  }

  /* Dashboard Tab Bar Horizontal Scrolling & Responsive Layout */
  .dashboard-tabs-container {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 6px 12px 6px !important;
    /* Extra bottom padding for scrollbar space */
    border-radius: var(--radius-md) !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(25, 50, 123, 0.2) transparent !important;
  }

  .dashboard-tabs-container::-webkit-scrollbar {
    height: 4px !important;
    display: block !important;
  }

  .dashboard-tabs-container::-webkit-scrollbar-thumb {
    background: rgba(25, 50, 123, 0.25) !important;
    border-radius: 4px !important;
  }

  .dashboard-tabs-container::-webkit-scrollbar-track {
    background: transparent !important;
  }

  .dashboard-tabs-container .tab-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    width: auto !important;
    padding: 10px 18px !important;
    margin: 0 !important;
  }

  /* Responsive card padding adjustments on mobile/tablet */
  .dashboard-card {
    padding: 20px 44px !important;
  }

  /* Responsive empty state padding to prevent text cutoff on small widths */
  .dashboard-empty-state {
    padding: 40px 16px !important;
  }

  .dashboard-empty-state h3,
  .dashboard-empty-state p {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Responsive table wrapper and minimum width settings */
  .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-top: 10px;
  }

  .table-responsive table,
  div[style*="overflow-x: auto"] table,
  div[style*="overflow-x:auto"] table {
    min-width: 800px !important;
    /* Ensure layout remains aligned and readable on tiny screens */
  }
}

/* MOBILE */
@media(max-width:576px) {
  .hero {
    padding: 60px 0 40px !important;
  }

  .hero-shape-1,
  .hero-shape-2,
  .hero-shape-3,
  .hero-blob-1,
  .hero-blob-2,
  .hero-grid-pattern,
  .hero-line-art-left,
  .hero-line-art-right {
    display: block !important;
  }

  .hero-left h1 {
    font-size: 26px !important;
    font-weight: 800 !important;
    font-family: var(--font-display) !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
  }

  .hero-left h1 span#rotating-category {
    font-size: 26px !important;
    font-weight: 800 !important;
    display: inline-block !important;
  }

  .hero-left p {
    font-size: 14.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 24px !important;
    opacity: 0.95 !important;
  }

  /* How It Works section mobile adjustments */
  .how-it-works-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .how-it-works-card {
    padding: 12px 8px !important;
  }

  .how-it-works-card div[style*="width: 60px"] {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 10px auto !important;
  }

  .how-it-works-card h3 {
    font-size: 14px !important;
    margin-bottom: 6px !important;
    font-weight: 700 !important;
  }

  .how-it-works-card p {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }

  /* Showcase decorative line art visibility & styling on mobile */
  .decor-lines-left::before {
    display: block !important;
    width: 80px !important;
    height: 80px !important;
    top: 15px !important;
    left: auto !important;
    right: 16px !important;
    opacity: 0.55 !important;
    z-index: 1 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cline x1='0' y1='15' x2='85' y2='95' stroke='%230d9488' stroke-width='4'/%3E%3Cline x1='15' y1='15' x2='100' y2='95' stroke='%2314b8a6' stroke-width='3'/%3E%3Cline x1='30' y1='15' x2='115' y2='95' stroke='%23ea580c' stroke-width='2'/%3E%3C/svg%3E") !important;
  }

  .decor-lines-right::after {
    display: block !important;
    width: 80px !important;
    height: 80px !important;
    bottom: auto !important;
    top: 15px !important;
    left: auto !important;
    right: 16px !important;
    opacity: 0.55 !important;
    z-index: 1 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cline x1='100' y1='15' x2='15' y2='95' stroke='%23ea580c' stroke-width='4'/%3E%3Cline x1='85' y1='15' x2='0' y2='95' stroke='%23f59e0b' stroke-width='3'/%3E%3Cline x1='70' y1='15' x2='-15' y2='95' stroke='%230d9488' stroke-width='2'/%3E%3C/svg%3E") !important;
  }

  /* Showcase header stacking & visual balance for mobile view */
  .showcase-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
    text-align: left !important;
    position: relative !important;
    z-index: 2 !important;
  }

  .showcase-header>div {
    max-width: calc(100% - 90px) !important;
  }

  .showcase-header h2 {
    font-size: 22px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
  }

  .showcase-header h2 span {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }

  .showcase-header p {
    font-size: 13.5px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin-top: 6px !important;
    color: #0d1116 !important;
  }

  .showcase-header .btn {
    align-self: flex-start !important;
    margin-top: 8px !important;
    padding: 10px 20px !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center;
    border-radius: var(--radius-md) !important;
  }

  .section-header h2 {
    font-size: 24px
  }

  .how-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .card-grid {
    grid-template-columns: 1fr
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .stat-card h2 {
    font-size: 28px
  }

  .footer-grid {
    grid-template-columns: 1fr
  }

  .team-grid {
    grid-template-columns: 1fr
  }

  .page-hero h1 {
    font-size: 26px
  }

  .page-hero {
    padding: 50px 0
  }

  .review-card {
    min-width: 270px
  }

  .inst-actions {
    flex-direction: column
  }

  .inst-actions .btn {
    width: 100%;
    justify-content: center
  }

  .faq-question h3 {
    font-size: 14px
  }

  .role-select {
    flex-direction: column
  }

  /* Stacking sidebar filters on small screens */
  .filters {
    grid-template-columns: 1fr !important;
  }

  /* Stack inline grid rows in forms on mobile */
  form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* login container padding */
  .auth-box {
    padding: 24px !important;
  }

  /* main gallery image height control */
  .inst-gallery img.main-img {
    height: 220px !important;
  }

  .floating-whatsapp {
    bottom: 80px !important;
    left: 15px !important;
    right: auto !important;
    width: 44px;
    height: 44px;
  }

  .scroll-to-top {
    bottom: 80px !important;
    right: 15px !important;
    width: 40px;
    height: 40px;
  }

  body.compare-active .floating-whatsapp {
    bottom: 155px !important;
    left: 15px !important;
    right: auto !important;
  }

  body.compare-active .scroll-to-top {
    bottom: 155px !important;
  }
}

@media (max-width:768px){
    .grid-2-1{
        display:block !important;
    }
    .table-responsive{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .table-responsive table{
        min-width:750px;
    }


    .dashboard-scroll-wrapper{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        width:100%;
        margin-bottom: 10px;
    }
    .dashboard-content-wrapper{
      padding-bottom: 10px;
    }

      .dashboard-tabs-container{
        overflow-x:auto;
        flex-wrap:nowrap !important;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
    }

    .dashboard-tabs-container::-webkit-scrollbar{
        display:none;
    }

    .dashboard-tabs-container .tab-btn{
        flex:none !important;
        min-width:180px;
        white-space:nowrap;
    }

    
}
