


      /* Hero Section */

      @media (max-width: 768px) {
        .hero {
          min-height: 280px;
        }
      }

      .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        pointer-events: none;
        opacity: 0.92;
      }





      /* Main Content */
      .main-content {
        padding: 3rem 0;
        background: var(--bg-secondary);
        min-height: calc(100vh - 400px);
      }

      .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 1.5rem;
      }

      /* Quick Filters */
      .quick-filters {
        background: var(--bg-primary);
        border-radius: var(--radius-lg);
        padding: 2rem;
        margin-bottom: 3rem;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border-light);
      }

      .quick-filters h3 {
        font-family: "Poppins", sans-serif;
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }

      .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
      }

      .filter-btn {
        background: var(--bg-tertiary);
        border: 2px solid var(--border-light);
        color: var(--text-secondary);
        padding: 0.625rem 1rem;
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.875rem;
        font-weight: 500;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }

      .filter-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(70, 187, 229, 0.1);
        transform: translateY(-1px);
      }

      .filter-btn.active {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
        box-shadow: var(--shadow-md);
      }

      /* Search Controls */
      .search-controls {
        display: flex;
        gap: 1rem;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-between;
      }

      .search-container {
        position: relative;
        flex: 1;
        max-width: 400px;
        min-width: 250px;
      }

      .search-input {
        width: 100%;
        padding: 0.875rem 3rem 0.875rem 3rem;
        border: 2px solid var(--border-light);
        border-radius: var(--radius);
        background: var(--bg-primary);
        color: var(--text-primary);
        font-size: 0.875rem;
        transition: var(--transition);
      }

      .search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(70, 187, 229, 0.1);
      }

      .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
      }

      .clear-search {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 50%;
        transition: var(--transition);
        display: none;
      }

      .clear-search:hover {
        color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
      }

      /* Worksheets Grid */
      .worksheets-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 2rem;
        padding: 0;
        margin: 0;
      }

      @media (min-width: 768px) {
        .worksheets-grid {
          grid-template-columns: repeat(3, 1fr);
        }
      }

      @media (min-width: 1024px) {
        .worksheets-grid {
          grid-template-columns: repeat(4, 1fr);
        }
      }

      @media (min-width: 1400px) {
        .worksheets-grid {
          grid-template-columns: repeat(5, 1fr);
        }
      }

      /* Worksheet Card */
      .worksheet-card {
        background: var(--bg-primary);
        border: 2px solid transparent;
        border-radius: 20px;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        height: 100%;
        position: relative;
        background: linear-gradient(
          145deg,
          var(--bg-primary),
          rgba(255, 255, 255, 0.98)
        );
      }

      .worksheet-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
          135deg,
          rgba(70, 187, 229, 0.05) 0%,
          rgba(16, 185, 129, 0.05) 50%,
          rgba(245, 158, 11, 0.05) 100%
        );
        border-radius: 20px;
        z-index: 0;
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
      }

      .worksheet-card:hover {
        transform: translateY(-12px) scale(1.03);
        box-shadow: 0 25px 50px rgba(70, 187, 229, 0.25),
          0 12px 35px rgba(0, 0, 0, 0.15);
        border-color: rgba(70, 187, 229, 0.3);
      }

      .worksheet-card:hover::before {
        opacity: 1;
      }

      .worksheet-image-container {
        position: relative;
        height: 180px;
        overflow: hidden;
        background: linear-gradient(
          135deg,
          var(--primary-color) 0%,
          var(--secondary-color) 100%
        );
        flex-shrink: 0;
        z-index: 2;
        border-radius: 16px 16px 0 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .worksheet-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 3;
        transition: all 0.5s ease;
      }

      .worksheet-card:hover .worksheet-image {
        transform: scale(1.1);
      }

      .worksheet-placeholder {
        font-size: 5rem;
        color: white;
        opacity: 0.9;
        z-index: 3;
      }

      .worksheet-content {
        padding: 1.5rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        z-index: 5;
        background: var(--bg-primary);
        position: relative;
        border-radius: 0 0 20px 20px;
      }

      .worksheet-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin: 0 0 0.75rem 0;
        color: var(--text-primary);
        line-height: 1.3;
        font-family: "Poppins", sans-serif;
      }

      .worksheet-description {
        color: var(--text-secondary);
        font-size: 0.875rem;
        line-height: 1.5;
        margin: 0 0 auto 0;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .worksheet-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-light);
      }

      .worksheet-category {
        background: linear-gradient(
          135deg,
          rgba(70, 187, 229, 0.15),
          rgba(16, 185, 129, 0.15)
        );
        color: var(--primary-color);
        padding: 0.4rem 0.875rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 700;
        border: 2px solid rgba(70, 187, 229, 0.3);
        text-transform: uppercase;
      }

      .btn-view {
        background: linear-gradient(
          135deg,
          var(--primary-color) 0%,
          var(--secondary-color) 100%
        );
        color: white !important;
        border: none;
        padding: 0.625rem 1.25rem;
        border-radius: 25px;
        font-size: 0.875rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.4s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        box-shadow: 0 6px 20px rgba(70, 187, 229, 0.3);
        text-decoration: none;
      }

      .btn-view:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(70, 187, 229, 0.5);
      }

      /* No Results */
      .no-results {
        text-align: center;
        padding: 4rem 2rem;
        color: var(--text-secondary);
        background: var(--bg-primary);
        border-radius: var(--radius-lg);
        border: 2px dashed var(--border-light);
        display: none;
      }

      .no-results i {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.4;
        color: var(--primary-color);
      }

      .no-results h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
      }

      /* Mobile Responsive */
      @media (max-width: 768px) {
        body {
          padding-top: 70px;
        }

        .hero {
          min-height: 350px;
          padding: 4rem 1.5rem 3rem;
        }

        .hero-title {
          font-size: 2rem;
        }

        .hero-subtitle {
          font-size: 1.1rem;
        }

        .main-content {
          padding: 2rem 0;
        }

        .quick-filters {
          padding: 1.5rem;
          margin-bottom: 2rem;
        }

        .filter-buttons {
          gap: 0.5rem;
        }

        .filter-btn {
          font-size: 0.8rem;
          padding: 0.5rem 0.75rem;
        }

        .worksheets-grid {
          grid-template-columns: 1fr;
          gap: 1.5rem;
        }

        .search-controls {
          flex-direction: column;
          gap: 1rem;
        }

        .search-container {
          max-width: 100%;
        }
      }

      /* Ensure mobile dropdowns work properly */
      @media (max-width: 768px) {
        /* FORCE mobile menu to display full width */
        .nav-links,
        #navLinks,
        ul.nav-links {
          display: flex !important;
          position: fixed !important;
          top: 70px !important;
          left: 0 !important;
          right: 0 !important;
          bottom: 0 !important;
          width: 100vw !important;
          height: auto !important;
          min-height: calc(100vh - 70px) !important;
        }

        .nav-links.active,
        #navLinks.active,
        ul.nav-links.active {
          display: flex !important;
          max-height: calc(100vh - 70px) !important;
          height: auto !important;
        }

        /* Make sure nav links with dropdowns are clearly tappable */
        .nav-item .nav-link {
          position: relative;
          user-select: none;
          -webkit-user-select: none;
          -webkit-tap-highlight-color: rgba(70, 187, 229, 0.2);
          cursor: pointer;
        }

        /* Ensure chevron is visible and clickable */
        .nav-link .fa-chevron-down {
          transition: transform 0.3s ease !important;
          opacity: 1 !important;
          pointer-events: none; /* Let clicks go through to parent link */
        }

        /* Visual feedback when dropdown is open */
        .nav-item.mobile-open > .nav-link,
        .nav-item.mobile-dropdown-open > .nav-link {
          background: rgba(70, 187, 229, 0.15) !important;
          border-color: var(--primary-color, #46bbe5) !important;
        }

        /* Make dropdowns smoother */
        .dropdown {
          transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        /* Ensure dropdown items are visible when parent is open */
        .nav-item.mobile-open .dropdown,
        .nav-item.mobile-dropdown-open .dropdown {
          display: block !important;
          visibility: visible !important;
          opacity: 1 !important;
          pointer-events: auto !important;
        }

        /* Ensure dropdown items are clickable */
        .dropdown-item,
        .dropdown > a {
          pointer-events: auto !important;
          touch-action: manipulation !important;
          user-select: none;
          -webkit-user-select: none;
        }
      }

